|Summary:||Mk/Scripts/qa.sh: badlibmix -- Sanity check linking for SSL, GCC and gfortran libraries|
|Product:||Ports & Packages||Reporter:||Yuri Victorovich <yuri>|
|Component:||Ports Framework||Assignee:||Port Management Team <portmgr>|
|Severity:||Affects Only Me||CC:||ports-bugs|
Description Yuri Victorovich 2017-08-01 04:51:19 UTC
Created attachment 184880 [details] patch Reports such errors which often lead to later crashes. One caveat that I know of is when executable is linked to the shared library by its absolute path. Such library isn't normally found by ldd in a stage directory until installed. Maybe somebody can suggest a solution to this. In case of relative shared library links, and in case of inter-package links it should work fine. Testing performed: * I artificially linked one executable to both SSLs and got this error: > Error: /usr/local/bin/qtox is linked to /usr/local/lib/libssl.so.9 from security/openssl but it is not declared as a dependency Open to suggestions.
Comment 1 Yuri Victorovich 2017-08-01 04:53:06 UTC
Correction, the error message is: > Error: /usr/local/bin/qtox is linked to both base and port SSL libraries: /usr/lib/libssl.so.8 /lib/libcrypto.so.8 and /usr/local/lib/libssl.so.9 /usr/local/lib/libcrypto.so.9
Comment 4 Yuri Victorovich 2017-08-01 17:23:07 UTC
It needs to be generalized to include the mix of libgcc_s.so from the base and from gfortran.
Comment 5 Yuri Victorovich 2017-08-01 19:25:58 UTC
Created attachment 184925 [details] patch Added libgcc_s check. It might fail for many ports including fortran parts because many of them are broken.
Comment 7 Mathieu Arnold 2017-08-01 20:50:26 UTC
Could you create a review on phabricator ? it feels like the we're back in the stone age trying to review this here.
Comment 9 Yuri Victorovich 2017-10-15 16:30:36 UTC
For the record, /lib/libedit.so.7 can also conflict with the port's version /usr/local/lib/libedit.so.0. This pair needs to be added to the check.