Page MenuHomeFreeBSD

www/apache24: Fix some warnings
AbandonedPublic

Authored by brnrd on Jun 11 2019, 4:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 15 2024, 8:57 PM
Unknown Object (File)
Dec 22 2023, 1:23 PM
Unknown Object (File)
Dec 20 2023, 12:39 AM
Unknown Object (File)
Oct 21 2023, 1:43 PM
Unknown Object (File)
Oct 19 2023, 11:43 AM
Unknown Object (File)
Oct 13 2023, 5:58 PM
Unknown Object (File)
Oct 13 2023, 5:16 AM
Unknown Object (File)
Sep 21 2023, 1:41 AM
Subscribers

Details

Reviewers
koobs
joneum
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 Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 24816
Build 23568: arc lint + arc unit

Event Timeline

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.

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

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 edited reviewers, added: joneum; removed: brnrd.

Commaneering so I can close this review

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 libaprutil-1.so 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.