Bug 66562 - apxs does not respect slibtool
Summary: apxs does not respect slibtool
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.4.56
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-09 19:22 UTC by orbea
Modified: 2024-03-11 23:21 UTC (History)
2 users (show)



Attachments
Build fix workaround for mod_musicindex (894 bytes, patch)
2023-04-09 19:22 UTC, orbea
Details | Diff
mod_musicindex build log (62.20 KB, text/x-log)
2023-04-09 19:22 UTC, orbea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description orbea 2023-04-09 19:22:09 UTC
Created attachment 38536 [details]
Build fix workaround for mod_musicindex

When building a project that depends upon apxs it will call /usr/lib/apache2/build/instdso.sh and then /usr/share/apr/build/libtool. This is a problem when the user is also using slibtool as mixing and matching libtool implementations is not going to work.

For example in an arbitrary example of mod_musicindex it will build the project with slibtool and then fail during the install target because it calls /usr/share/apr/build/libtool instead.

/usr/sbin/apxs -S LIBEXECDIR="/var/tmp/portage/www-apache/mod_musicindex-1.4.1-r3/image/usr/lib/apache2/modules" -i -n musicindex mod_musicindex.la
/usr/lib/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr/build/libtool' mod_musicindex.la /var/tmp/portage/www-apache/mod_musicindex-1.4.1-r3/image/usr/lib/apache2/modules
/usr/share/apr/build/libtool --mode=install install mod_musicindex.la /var/tmp/portage/www-apache/mod_musicindex-1.4.1-r3/image/usr/lib/apache2/modules/
libtool: install: install .libs/mod_musicindex.so /var/tmp/portage/www-apache/mod_musicindex-1.4.1-r3/image/usr/lib/apache2/modules/mod_musicindex.so
libtool: install: install .libs/mod_musicindex.lai /var/tmp/portage/www-apache/mod_musicindex-1.4.1-r3/image/usr/lib/apache2/modules/mod_musicindex.la
libtool: install: install .libs/libmod_musicindex.a /var/tmp/portage/www-apache/mod_musicindex-1.4.1-r3/image/usr/lib/apache2/modules/libmod_musicindex.a
install: cannot stat '.libs/libmod_musicindex.a': No such file or directory
install-xattr: failed to stat /var/tmp/portage/www-apache/mod_musicindex-1.4.1-r3/image/usr/lib/apache2/modules/libmod_musicindex.a: No such file or directory
apxs:Error: Command failed with rc=65536
.
make[1]: *** [Makefile:766: install] Error 1

In this case simply using the default autotools install target works easily enough, but perhaps it would be better if apxs allowed using slibtool when its set?

Ideally it should be respected as part of the MAKEFLAGS env variable, for example:

export MAKEFLAGS='LIBTOOL=rlibtool'

Where rlibtool should be the default slibtool symlink that correctly respects the --enable/disable-shared/static flags as set in the libtool generated by autotools.

As I don't know perl I would greatly appreciate any help that can be offered here.

One of the bug reports made for Gentoo can be seen here. https://bugs.gentoo.org/778566
Comment 1 orbea 2023-04-09 19:22:33 UTC
Created attachment 38537 [details]
mod_musicindex build log
Comment 2 Michael Orlitzky 2024-03-11 23:21:08 UTC
This is a problem for PHP as well. I spent the day yesterday trying to simplify the way we install PHP on Gentoo by using more of the upstream install targets. But the PHP build system uses apxs to install mod_php, so I eventually ran into this wall: when slibtool is used to build PHP, the call to apxs eventually fails.

The alternative is to manually find and install the module (a libtool library), which can be done, but is over-complicated because we have to worry about some implementation details that libtool would otherwise handle for us. In that regard it would be nice if we could just "make install" and have apxs do its thing.