Bug 230980 - net-mgmt/php56-snmp: links with libpkg for no apparent reason (affects all php versions)
Summary: net-mgmt/php56-snmp: links with libpkg for no apparent reason (affects all ph...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Alex Dupre
Depends on:
Reported: 2018-08-28 15:44 UTC by Dmitry Marakasov
Modified: 2018-12-10 14:20 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ale)

Remove extra libs (356 bytes, patch)
2018-08-31 12:23 UTC, Alex Dupre
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer 2018-08-28 15:44:13 UTC
For some strange reason, php-snmp (with all php versions) links with libpkg:

===>  Building for php56-snmp-5.6.37
cc -shared  .libs/snmp.o  -L/usr/lib -lssl -L/usr/local/lib -L/lib -lnetsnmp -lm -lkvm -ldevstat -lcrypto -lelf    -lpkg    -lssp_nonshared  -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/lib -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,snmp.so -o ./.libs/snmp.so
====> Running Q/A tests (stage-qa)                                                                                                                                                                                                                                     
Error: /usr/local/lib/php/20131226/snmp.so is linked to /usr/local/lib/libpkg.so.4 from ports-mgmt/pkg but it is not declared as a dependency                                                                                                                          
Warning: you need LIB_DEPENDS+=libpkg.so:ports-mgmt/pkg                                                                                                                                                                                                                
=>> Checking shared library dependencies                                                                                                                                                                                                                               
 0x0000000000000001 NEEDED               Shared library: [libpkg.so.4]

This doesn't seem needed nor right, creates a hidden dependency on pkg and breaks the module when libpkg.so version changes. This may also affect other or all php modules.
Comment 1 Alex Dupre freebsd_committer 2018-08-31 11:55:35 UTC
It's not a hidden dependency, it's an explicit dependency of net-snmp:

Comment 2 Alex Dupre freebsd_committer 2018-08-31 11:58:04 UTC
Let me rephrase, it's not a php-snmp issue, if there is an issue it's caused by net-snmp and should be fixed there.
Comment 3 Alex Dupre freebsd_committer 2018-08-31 12:23:04 UTC
Created attachment 196744 [details]
Remove extra libs

If you use the snmp php module, can you check if it still works with this patch, please?
Comment 4 Alex Dupre freebsd_committer 2018-08-31 12:24:06 UTC
It may be a php issue, after all.
Comment 5 Alex Dupre freebsd_committer 2018-11-26 08:32:01 UTC
Dmitry can you check if the patch fixes the issue while keeping php56-snmp working as intended?
Comment 6 commit-hook freebsd_committer 2018-12-10 14:20:29 UTC
A commit references this bug:

Author: ale
Date: Mon Dec 10 14:19:23 UTC 2018
New revision: 487169
URL: https://svnweb.freebsd.org/changeset/ports/487169

  Update to 5.6.39 release [1].

  - clean up CONFLICTS [2]
  - don't link with libpkg [3]
  - fix recode ordering issue [4]

  PR:		233847 [1], 226534 [2], 230980 [3], 211794 [4]
  Submitted by:	Pascal Christen <pascal.christen@hostpoint.ch> [1],
  		brnrd [2], amdmi3 [3], jaretbartsch@yahoo.ca [4]