Hide Forgot
Created attachment 1146286 [details] part of reproducer: minimal module Description of problem: Building httpd module with apxs tool generates symlink to php (for example from php55 collection), even if module don't need php. This is nothing serious, but I can see no reason why apxs should create such symlink. Version-Release number of selected component (if applicable): httpd24-httpd-devel-2.4.18-7 How reproducible: always Steps to Reproduce: requires: httpd24-httpd-devel, php55-php 1. ls -l /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp* 2. apxs -ci mod_dummy.c 3. Actual results: 1) -rwxr-xr-x. 1 root root 4353016 Jun 10 2015 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so 3) -rwxr-xr-x. 1 root root 4353016 Jun 10 2015 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so lrwxrwxrwx. 1 root root 16 Apr 12 04:11 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp5.so -> libphp55-php5.so Expected results: 1) -rwxr-xr-x. 1 root root 4353016 Jun 10 2015 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so 3) -rwxr-xr-x. 1 root root 4353016 Jun 10 2015 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so Additional info:
The reasons are that: a) apxs runs instdso.sh to install the module DSO, which runs libtool --mode=install, which runs "ldconfig -n" on the directory after copying. b) libphp*.so is installed with a different filename to the module SONAME. # readelf -d /opt/rh/httpd24/root/usr/lib64/httpd/modules/librh-php70-php7.so | grep SONAME 0x000000000000000e (SONAME) Library soname: [libphp7.so] ... so ldconfig creates a symlink from libphp7.so to librh-php70-php7.so Remi. I don't suppose that (b) is trivial to fix? We could probably work around (a) as well, e.g by preventing libtool running ldconfig somehow (not clear how), but it seems low priority, I'm going to defer this.
Actually CC'ing Remi for question in comment 1.
I suppose in theory somebody could depend on the ldconfig behaviour to create the "right" module name to reference in LoadModule. I'm a bit reluctant to touch this to maybe break something, probably we should fix this in Fedora first and see what happens.
I can't see any way around this without major surgery to libtool to not run ldconfig for modules, which seems correct but overkill.