Created attachment 193152 [details] patch Currently USE_LDCONFIG adds "@postexec ${LDCONFIG} -m ${USE_LDCONFIG}" to pkg-plist. This command appends the path in USE_LDCONFIG to the list of ldconfig directories. On reboot /etc/rc.d/ldconfig uses "sort -u" on the list of paths which may give a different order. The patch replaces the postexec with "@postexec /usr/sbin/service ldconfig restart" which reruns the rc.d script so the order after a package install is the same as after a reboot.
This looks good to me.
A commit references this bug: Author: tijl Date: Mon May 14 19:15:38 UTC 2018 New revision: 469956 URL: https://svnweb.freebsd.org/changeset/ports/469956 Log: Run "/usr/sbin/service ldconfig restart" for USE_LDCONFIG instead of "ldconfig -m <path>" so the order of ldconfig search directories after package installation is the same as after a reboot. The original command simply appends the path to the list of directories while the ldconfig rc.d script uses "sort -u". Bump lang/gcc* which are known to install libraries with exactly the same name so the library loaded at runtime depends on the order of the search directories. PR: 228046 Approved by: portmgr (antoine) Changes: head/Mk/bsd.port.mk head/lang/gcc47/Makefile head/lang/gcc48/Makefile head/lang/gcc49/Makefile head/lang/gcc5/Makefile head/lang/gcc6/Makefile head/lang/gcc6-devel/Makefile head/lang/gcc7/Makefile head/lang/gcc7-devel/Makefile head/lang/gcc8-devel/Makefile head/lang/gcc9-devel/Makefile