Summary: | apache2 fails to start with apr error when compiled with LDFLAGS="-Wl,--as-needed" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Kim Nilsson <gentoo.bug> |
Component: | [OLD] Server | Assignee: | Apache Team - Bugzilla Reports <apache-bugs> |
Status: | RESOLVED NEEDINFO | ||
Severity: | normal | CC: | flameeyes, genstef, jakub, patrizio.bassi, rockoo, tom.gl |
Priority: | High | ||
Version: | 2005.1 | ||
Hardware: | x86 | ||
OS: | Linux | ||
URL: | http://www.gentoo.org/proj/en/qa/asneeded.xml | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 129413 | ||
Attachments: |
files/apr-util-0.9.12-as-needed.patch
apr-util-0.9.12-ebuild.patch |
Description
Kim Nilsson
2006-04-02 05:09:05 UTC
Need to look into this at some point. Attaching the URL that might help fix it. same here. Apache and apr-util rebuild and then start fine with the gdbm USE flag turned off but with LDFLAGS="-Wl,--as-needed". (In reply to comment #3) > Apache and apr-util rebuild and then start fine with the gdbm USE flag turned > off but with LDFLAGS="-Wl,--as-needed". OK, so it only breaks when you emerge dev-libs/apr-util with USE="gdbm" and --as-needed? no jacub, i tried to compiled without as-needed apr and aprutils, and apache with that flag. fails. only apache must filter it (or better...fix the linking). The numerous unresolved symbols in libaprutil-0.so are easy to fix (i will attach a patch). It is a required step toward building apache with --as-needed, since this flag (with recent binutils) prevents linking against an incomplete library. But then there is a much more serious issue: none of the apache modules are linked to any of the libs they use. They instead rely on apache2 providing all the symbols they need. Usually, apache2 is linked to all the libraries used by at least one module, and loading works fine. But if apache is built with --as-needed, some of this libs (the ones apache2 doesn't directly use - libcrypto, libssl and libz here) are dropped, and you get unresolved symbols errors at runtime, when some of the modules are loaded. Fixing that would be, imho, a rather tedious work, for a very minor benefit, and thus filter-ldflags has my vote for this one. Created attachment 86390 [details, diff]
files/apr-util-0.9.12-as-needed.patch
Created attachment 86391 [details, diff]
apr-util-0.9.12-ebuild.patch
--as-needed filtered in apache, apr, and apr-util closing. filtered?? please CC diego and ask him. he told: never filter that linking flag. this is not a solution, this is a bypass. (In reply to comment #10) > filtered?? please CC diego and ask him. > he told: never filter that linking flag. > > this is not a solution, this is a bypass. Did you really read Comment #6 ? sure. --as-needed fix is always boring and long, as comment #6 complains. If deigo (or someone else) wants to figure out all the intradependencies of apache, apr, apr-util, and every single apache module in the tree, and provide patches to make it all work nicely with --as-needed, then I will apply those patches. Right now, --as-needed is a flag in the minority and the effort to make apache work with it is more effort then it is worth. Read again: apache does not link against all the libraries it uses - it relies on apr and/or apr-util exporting many of the symbols, even though apr and apr-util may not use those libraries. Modules to apache have the same relationship to apache and apr and apr-util. It's rather complex. apr and apr-util used to be bundled with apache itself, only recently has it been able to be seperated out. There is still lots of intradependence and linking that needs to be cleaned up. this is not FIXED, CCing Flameeyes. Please leave the filtering in place until it is correctly fixed. later versions >=net-www/apache-2.2.0 are fixed The filter-flags command still exists in apache-tools -> I assume it was just forgotten to be removed? it is also present in apache-2.eclass line 452, is there a problem with it? |