Page MenuHomeFreeBSD

www/apache24: Fix some warnings
Needs ReviewPublic

Authored by joneum on Jun 11 2019, 4:09 PM.

Details

Reviewers
brnrd
Summary

www/apache24: Fix some warnings:

Error: /usr/local/bin/ab is linked to /usr/local/lib/libdb-5.3.so.0 from databases/db5 but it is not declared as a dependency
Warning: you need USES+=bdb
Error: /usr/local/bin/ab is linked to /usr/local/lib/libgdbm.so.6 from databases/gdbm but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libgdbm.so:databases/gdbm

PR: 238490

Test Plan

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24816
Build 23568: arc lint + arc unit

Event Timeline

joneum created this revision.Jun 11 2019, 4:09 PM
brnrd added inline comments.Jun 12 2019, 8:33 AM
www/apache24/Makefile
22

Isn't this only when we're using a specific authn or autz module?

DBD=on: Apache DBD Framework

The linking is then actually via apr if I'm not mistaken.

On my local config

work/stage/usr/local/bin/ab:
        libaprutil-1.so.0 => /usr/local/lib/libaprutil-1.so.0 (0x800253000)
        libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x800282000)
        libapr-1.so.0 => /usr/local/lib/libapr-1.so.0 (0x8002ae000)
        libm.so.5 => /lib/libm.so.5 (0x8002ea000)
        libssl.so.47 => /usr/lib/libssl.so.47 (0x80031c000)
        libcrypto.so.45 => /lib/libcrypto.so.45 (0x800384000)
        libcrypt.so.5 => /lib/libcrypt.so.5 (0x80057d000)
        libthr.so.3 => /lib/libthr.so.3 (0x80059f000)
        libc.so.7 => /lib/libc.so.7 (0x8005ca000)

so we need to figure out what triggers this, possibly more than just the BDB option

It is definitely a standard option. The patch would solve the Q/A problem.

brnrd added a comment.EditedJul 21 2019, 9:18 AM

from configure stage:

configure: Configuring Apache Portable Runtime Utility library...                                             
configure:
checking for APR-util... yes                                                                               
  adding "-L/usr/lib" to LDFLAGS                                                                        
  adding "-L/usr/local/lib" to LDFLAGS                                                                          
  adding "-L/usr/local/lib/db5" to LDFLAGS

So we need to check if APR was built with bdb support. Probably easiest to check

$ apu-1-config --libs
  -ldb-5.3 -lgdbm  -lexpat

and set the depends accordingly. Something like

APU_LIBS!=      ${APU_CONFIG} --libs
.if ${APU_LIBS:Mldb-[0-9]}
USES+=          bdb
.endif
.if ${APU_LIBS:Mlgdbm}
LIB_DEPENDS+=   libgdbm.so:databases/gdbm
.endif

Ordering is an issue here... Not sure how to fix that.

Not adding the check will create a dependency that does not exist if apr-util was built with BDB and GDBM options OFF. I'd rather have the QA issue than unnecessary depends...