HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Invalid linker options during build of Apache
Operating System - HP-UX
1833302
Members
2781
Online
110051
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2004 06:53 PM
05-06-2004 06:53 PM
Invalid linker options during build of Apache
Hello C coders,
I had to build my custom Apache to accomodate support for most DSO standard Apache modules as well as statically loaded mod_perl, and dynamically loaded PHP support.
This was necessary because the Apache build HP distributes as precompiled depot wasn't usable at all for me because it was built with threading Perl support (opposed to my Perl build for Oracle OCI compatibility), and it
seems to be built with gcc.
Thus, I configured the mod_perl, php, and finally Apache as outlined in the INSTALL and README.configure
The make went well for the mod_perl, php, and the creation of object files of apache.
But finally the linker bailed out with the below error messages.
ld -b -o libphp4.so mod_php4.so-o libmodphp4.a -L/usr/local/lib -L/usr/local/mysql/lib -L/u
sr/local/lib -L/usr/local/mysql/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4
-L/usr/local/lib -L/usr/local/mysql/lib -lexpat -lmysqlclient -lz -lm -lnsl -lm -lpthread -Wl,-E
-Wl,-B,deferred -L/usr/local/lib /opt/perl5/lib/5.8.0/PA-RISC2.0/auto/DynaLoader/DynaLoader.a -L/op
t/perl5/lib/5.8.0/PA-RISC2.0/CORE -lperl -lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcry
pt -lsec -lm -L/usr/local/lib -L/usr/local/mysql/lib -L/usr/local/lib -L/usr/local/mysql/lib -Lmodul
es/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -L/usr/local/lib -L/usr/local/mysql/lib
-lexpat -lmysqlclient -lz -lm -lnsl -lm -lpthread -Wl,-E -Wl,-B,deferred -L/usr/local/lib /opt/pe
rl5/lib/5.8.0/PA-RISC2.0/auto/DynaLoader/DynaLoader.a -L/opt/perl5/lib/5.8.0/PA-RISC2.0/CORE -lperl -l
cl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt -lsec
ld: Unrecognized argument: -Wl,-E
ld: Usage: ld [options] [flags] files
*** Error exit code 1
Stop.
*** Error exit code 1
The message sounds plausible to me though I'm not a C hacker, and thus lack ld familiarity.
The make of the modules must have squeezed in some syntactically strange comma separated options like -Wl,-E etc.
Only this string alone is dispersed in several Makefiles in the source tree of apache itself.
# find . -type f -name Makefile|xargs grep -l -- '-Wl,-E'
./src/ap/Makefile
./src/lib/expat-lite/Makefile
./src/lib/Makefile
./src/main/Makefile
./src/modules/standard/Makefile
./src/modules/perl/Makefile
./src/modules/php4/Makefile
./src/modules/Makefile
./src/os/unix/Makefile
./src/support/Makefile
./src/Makefile
For instance just the 1st occurance in the Makefile in the src subdir
# grep -n -- '-Wl,-E' src/Makefile|head -1
48:PERL_LIBS=-Wl,-E -Wl,-B,deferred -L/usr/local/lib /opt/perl5/lib/5.8.0/PA-RISC2.0/auto/DynaLoader
/DynaLoader.a -L/opt/perl5/lib/5.8.0/PA-RISC2.0/CORE -lperl -lcl -lpthread -lnsl -lnm -lmalloc -ldld -
lm -lc -lndir -lcrypt -lsec
Is this correct syntax in Makefile parlance?
Would it help if I substituted all occurrences of ',' by \040 (whitespace)?
How could I remedy the broken link phase whithout having to go through all the hassle of reconfiguring and remaking the other Apache module stuff that already passed successfully again?
Rgds.
Ralph
I had to build my custom Apache to accomodate support for most DSO standard Apache modules as well as statically loaded mod_perl, and dynamically loaded PHP support.
This was necessary because the Apache build HP distributes as precompiled depot wasn't usable at all for me because it was built with threading Perl support (opposed to my Perl build for Oracle OCI compatibility), and it
seems to be built with gcc.
Thus, I configured the mod_perl, php, and finally Apache as outlined in the INSTALL and README.configure
The make went well for the mod_perl, php, and the creation of object files of apache.
But finally the linker bailed out with the below error messages.
ld -b -o libphp4.so mod_php4.so-o libmodphp4.a -L/usr/local/lib -L/usr/local/mysql/lib -L/u
sr/local/lib -L/usr/local/mysql/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4
-L/usr/local/lib -L/usr/local/mysql/lib -lexpat -lmysqlclient -lz -lm -lnsl -lm -lpthread -Wl,-E
-Wl,-B,deferred -L/usr/local/lib /opt/perl5/lib/5.8.0/PA-RISC2.0/auto/DynaLoader/DynaLoader.a -L/op
t/perl5/lib/5.8.0/PA-RISC2.0/CORE -lperl -lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcry
pt -lsec -lm -L/usr/local/lib -L/usr/local/mysql/lib -L/usr/local/lib -L/usr/local/mysql/lib -Lmodul
es/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -L/usr/local/lib -L/usr/local/mysql/lib
-lexpat -lmysqlclient -lz -lm -lnsl -lm -lpthread -Wl,-E -Wl,-B,deferred -L/usr/local/lib /opt/pe
rl5/lib/5.8.0/PA-RISC2.0/auto/DynaLoader/DynaLoader.a -L/opt/perl5/lib/5.8.0/PA-RISC2.0/CORE -lperl -l
cl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt -lsec
ld: Unrecognized argument: -Wl,-E
ld: Usage: ld [options] [flags] files
*** Error exit code 1
Stop.
*** Error exit code 1
The message sounds plausible to me though I'm not a C hacker, and thus lack ld familiarity.
The make of the modules must have squeezed in some syntactically strange comma separated options like -Wl,-E etc.
Only this string alone is dispersed in several Makefiles in the source tree of apache itself.
# find . -type f -name Makefile|xargs grep -l -- '-Wl,-E'
./src/ap/Makefile
./src/lib/expat-lite/Makefile
./src/lib/Makefile
./src/main/Makefile
./src/modules/standard/Makefile
./src/modules/perl/Makefile
./src/modules/php4/Makefile
./src/modules/Makefile
./src/os/unix/Makefile
./src/support/Makefile
./src/Makefile
For instance just the 1st occurance in the Makefile in the src subdir
# grep -n -- '-Wl,-E' src/Makefile|head -1
48:PERL_LIBS=-Wl,-E -Wl,-B,deferred -L/usr/local/lib /opt/perl5/lib/5.8.0/PA-RISC2.0/auto/DynaLoader
/DynaLoader.a -L/opt/perl5/lib/5.8.0/PA-RISC2.0/CORE -lperl -lcl -lpthread -lnsl -lnm -lmalloc -ldld -
lm -lc -lndir -lcrypt -lsec
Is this correct syntax in Makefile parlance?
Would it help if I substituted all occurrences of ',' by \040 (whitespace)?
How could I remedy the broken link phase whithout having to go through all the hassle of reconfiguring and remaking the other Apache module stuff that already passed successfully again?
Rgds.
Ralph
Madness, thy name is system administration
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2004 09:15 PM
05-06-2004 09:15 PM
Re: Invalid linker options during build of Apache
Well, I sed-ed a substitute of s/-Wl,/ /g in all the above mentioned Makefiles.
That caused make to continue until it again aborted,
this time with an "invalid loader fixup" error.
Tail of this time's make
: libperl.a
<=== src/modules/perl
===> src/modules/php4
rm -f libphp4.so
ld -b -o libphp4.so mod_php4.so-o libmodphp4.a -L/usr/local/lib -L/usr/local/mysql/lib -L/u
sr/local/lib -L/usr/local/mysql/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4
-L/usr/local/lib -L/usr/local/mysql/lib -lexpat -lmysqlclient -lz -lm -lnsl -lm -lpthread -E -
B,deferred -L/usr/local/lib /opt/perl5/lib/5.8.0/PA-RISC2.0/auto/DynaLoader/DynaLoader.a -L/opt/perl
5/lib/5.8.0/PA-RISC2.0/CORE -lperl -lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt -ls
ec -lm -L/usr/local/lib -L/usr/local/mysql/lib -L/usr/local/lib -L/usr/local/mysql/lib -Lmodules/php
4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -L/usr/local/lib -L/usr/local/mysql/lib -lexpa
t -lmysqlclient -lz -lm -lnsl -lm -lpthread -E -B,deferred -L/usr/local/lib /opt/perl5/lib/5.8.
0/PA-RISC2.0/auto/DynaLoader/DynaLoader.a -L/opt/perl5/lib/5.8.0/PA-RISC2.0/CORE -lperl -lcl -lpthread
-lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt -lsec
ld: (Warning) Unsupported keyword -B,deferred to -B,deferred option - both ignored
ld: (Warning) Unsupported keyword -B,deferred to -B,deferred option - both ignored
ld: Invalid loader fixup in text space needed in output file for symbol "$00000018" in input file: "li
bmodphp4.a(main.o)". Make sure it was compiled with +z/+Z.
*** Error exit code 1
Stop.
It seems to require a PIC flag like +Z.
Is there a chance to proceed from here, or will I have to redo all this time trying the +Z CCFLAG?
That caused make to continue until it again aborted,
this time with an "invalid loader fixup" error.
Tail of this time's make
: libperl.a
<=== src/modules/perl
===> src/modules/php4
rm -f libphp4.so
ld -b -o libphp4.so mod_php4.so-o libmodphp4.a -L/usr/local/lib -L/usr/local/mysql/lib -L/u
sr/local/lib -L/usr/local/mysql/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4
-L/usr/local/lib -L/usr/local/mysql/lib -lexpat -lmysqlclient -lz -lm -lnsl -lm -lpthread -E -
B,deferred -L/usr/local/lib /opt/perl5/lib/5.8.0/PA-RISC2.0/auto/DynaLoader/DynaLoader.a -L/opt/perl
5/lib/5.8.0/PA-RISC2.0/CORE -lperl -lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt -ls
ec -lm -L/usr/local/lib -L/usr/local/mysql/lib -L/usr/local/lib -L/usr/local/mysql/lib -Lmodules/php
4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -L/usr/local/lib -L/usr/local/mysql/lib -lexpa
t -lmysqlclient -lz -lm -lnsl -lm -lpthread -E -B,deferred -L/usr/local/lib /opt/perl5/lib/5.8.
0/PA-RISC2.0/auto/DynaLoader/DynaLoader.a -L/opt/perl5/lib/5.8.0/PA-RISC2.0/CORE -lperl -lcl -lpthread
-lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt -lsec
ld: (Warning) Unsupported keyword -B,deferred to -B,deferred option - both ignored
ld: (Warning) Unsupported keyword -B,deferred to -B,deferred option - both ignored
ld: Invalid loader fixup in text space needed in output file for symbol "$00000018" in input file: "li
bmodphp4.a(main.o)". Make sure it was compiled with +z/+Z.
*** Error exit code 1
Stop.
It seems to require a PIC flag like +Z.
Is there a chance to proceed from here, or will I have to redo all this time trying the +Z CCFLAG?
Madness, thy name is system administration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2004 10:00 PM
05-06-2004 10:00 PM
Re: Invalid linker options during build of Apache
OK, I also solved the PIC issue by simply doing a make distclean, and rerunning configure this time with mod_php as not enabled as shared, i.e. statically linked.
Running the make after this produced absolutely no errors, and everything went fine.
Running the make after this produced absolutely no errors, and everything went fine.
Madness, thy name is system administration
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP