Page MenuHomeFreeBSD

www/apache24: Fix some warnings

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



www/apache24: Fix some warnings:

Error: /usr/local/bin/ab is linked to /usr/local/lib/ 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/ from databases/gdbm but it is not declared as a dependency
Warning: you need

PR: 238490

Test Plan

Diff Detail

rP FreeBSD ports repository
No Linters Available
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

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: => /usr/local/lib/ (0x800253000) => /usr/local/lib/ (0x800282000) => /usr/local/lib/ (0x8002ae000) => /lib/ (0x8002ea000) => /usr/lib/ (0x80031c000) => /lib/ (0x800384000) => /lib/ (0x80057d000) => /lib/ (0x80059f000) => /lib/ (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...                                             
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
.if ${APU_LIBS:Mlgdbm}

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...

koobs requested changes to this revision.Mar 10 2020, 4:51 AM
This revision now requires changes to proceed.Mar 10 2020, 4:51 AM
brnrd commandeered this revision.Mar 15 2020, 11:43 AM
brnrd edited reviewers, added: joneum; removed: brnrd.

Commaneering so I can close this review

brnrd abandoned this revision.Mar 15 2020, 11:43 AM

You are seeing the Q/A warning because of the devel/apr1 dependency.
If you build devel/apr1 with any of the "Database support" options (BDB and GDMB are selected by default), you will have a that is linked against the respective database shared libs.
The Apache build uses the output of apu-1-config for the compiling and linking of a.o. support/ab. Thus the ab utility is linked with libdb-5 and libgdbm.