You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2012/03/01 10:51:19 UTC

DO NOT REPLY [Bug 52802] New: Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

             Bug #: 52802
           Summary: Unable to Build Apache 2.4.1 on Solaris/X86 - Linker
                    Problem
           Product: Apache httpd-2
           Version: 2.4.1
          Platform: PC
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Build
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: fabian.dahms@gmx.net
    Classification: Unclassified


Hello,

i have some trouble with built the Apache 2.4.1 under Solaris X86 with OpenSSL
OpenSSL 1.0.0g 18
My System is a X86 DEll System with SunSolaris 10
uname -a:
SunOS uzktr 5.10 Generic_147441-01 i86pc i386 i86pc

It seems that there is a problem in the Makefile with linking the OpenSSL
objects.
The follow configure options are used:

./configure \
--disable-nls \
--with-apxs2 \
--enable-fastcgi \
--disable-short-tags \
--with-openssl \
--with-zlib \
--with-imap-ssl \
--with-mysql \
--with-mysqli \
--with-pdo-pgsql \
--with-pdo-sqlite \
--with-pgsql \
--with-readline \
--enable-soap \
--enable-sockets \
--enable-sqlite-utf8 \
--enable-zip \
--with-zend-vm \
--enable-static-support \
--enable-static-htpasswd \
--enable-static-rotatelogs \
--enable-static-logresolve \
--enable-static-htdbm \
--enable-static-ab \
--enable-static-checkgid \
--enable-static-htcacheclean \
--enable-static-httxt2dbm \
--enable-ssl \
--with-ssl=/opt/ae \
--prefix=/opt/fd/apache2 \
--with-apr=/opt/ae

Here the output from the Configure:
http://www.wholewildworld.de/portal/upload/fabi65/configure_echo

Then i try to build the sources. But  the try to link the openssl libs he
doesn't find round about 17.000 symbols!?

The output from gmake:
http://www.wholewildworld.de/portal/upload/fabi65/gmake_echo

By the way: The Apache 2.2.22 is buildable on my system.

Thanks for you help!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #5 from Fabian <fa...@gmx.net> 2012-03-07 11:00:42 UTC ---
Hello,

Here the output with the exactly same configure options under 2.2.22:
http://www.wholewildworld.de/portal/upload/fabi65/output_configure_2

And here the output from gmake with the 2.2.22:
http://www.wholewildworld.de/portal/upload/fabi65/gmake_2_2_22


I have add the line in the "-Wl,-Bsymbolic ", but unfortunately it doesent
work.
Heres the Output from gmake:
http://www.wholewildworld.de/portal/upload/fabi65/output_gmake_2

Thanks for your Help

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #10 from Kaspar Brand <as...@velox.ch> 2012-03-09 06:09:35 UTC ---
(In reply to comment #9)
> But for the further the configure script should  detect these option, dont you
> think?

Not really. Whether modules should be statically or dynamically linked is
something you *tell* configure, not something it will figure out.

It might also be an issue with the specific combination of compiler and linker
you're using - what compiler did you use for compiling OpenSSL, actually?

On at least two other platforms I tried, I was successful in linking a shared
mod_ssl version with static OpenSSL libraries (which failed in your case, as
seen from the "gmake_echo" output).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

Kaspar Brand <as...@velox.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Kaspar Brand <as...@velox.ch> 2012-03-03 09:10:47 UTC ---
The relevant snippets are basically:

/opt/ae/build-1/libtool --silent --mode=link gcc -std=gnu99 -g -O2          -o
mod_ssl.la -rpath /opt/fd/apache2/modules -module -avoid-version  mod_ssl.lo
ssl_engine_config.lo ssl_engine_dh.lo ssl_engine_init.lo ssl_engine_io.lo
ssl_engine_kernel.lo ssl_engine_log.lo ssl_engine_mutex.lo
ssl_engine_pphrase.lo ssl_engine_rand.lo ssl_engine_vars.lo ssl_scache.lo
ssl_util_stapling.lo ssl_util.lo ssl_util_ssl.lo ssl_engine_ocsp.lo
ssl_util_ocsp.lo  -L/opt/ae/lib -lssl -lcrypto -luuid -lsendfile -lrt -lsocket
-lnsl -lpthread -export-symbols-regex ssl_module
Text relocation remains                     referenced
    against symbol            offset    in file
SSLv3_server_method_data.0          0x1          
/opt/ae/lib/libssl.a(s3_srvr.o)
SSLv3_server_method_data.0          0x11         
/opt/ae/lib/libssl.a(s3_srvr.o)
.rodata (section)                   0x177        
/opt/ae/lib/libssl.a(s3_srvr.o)
.rodata (section)                   0x5b3        
/opt/ae/lib/libssl.a(s3_srvr.o)
.rodata (section)                   0x5e9        
/opt/ae/lib/libssl.a(s3_srvr.o)
[...]
ld: fatal: relocations remain against allocatable but non-writable sections


I think that's the same issue which was mentioned quite some time ago here:

http://mail-archives.apache.org/mod_mbox/httpd-users/200511.mbox/%3C868b524f0511031831uc343f15iac0e8b3fcc159ba1@mail.gmail.com%3E

... i.e., not specific to 2.4 most likely - I assume you did not link 2.2.22
against that same OpenSSL version, or did you?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #8 from Kaspar Brand <as...@velox.ch> 2012-03-08 06:03:50 UTC ---
(In reply to comment #7)
> Smehow I doubt, that this is the only thing responsible for the observed
> problem, because the misisng symbols are not only coming from the ssl libs, but
> are also httpd and apr symbols referenced in mod_ssl files.

Yes, this additional issue shows up with "-Wl,-Bsymbolic"  (output referenced
in comment 5), but there were no errors with undefined symbols in the original
output, actually (as seen from comment 1).

To be clear: my suggestion is to *not* add "-Wl,-Bsymbolic" when trying the
options suggested in comment 6.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #7 from Rainer Jung <ra...@kippdata.de> 2012-03-07 20:22:19 UTC ---
For Apache 2.2 static module linking was default, for 2.4 shared module linking
is default.

Smehow I doubt, that this is the only thing responsible for the observed
problem, because the misisng symbols are not only coming from the ssl libs, but
are also httpd and apr symbols referenced in mod_ssl files. Something more
fundamental seems to be wrong here.

Rainer

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #3 from Kaspar Brand <as...@velox.ch> 2012-03-07 08:39:55 UTC ---
(In reply to comment #2)
> for the compilation i have use a gcc version 3.4.6 with GNU Make 3.81 and the
> Solaris Linker.

Ok - as far as I understand, it seems that you need to add "-Wl,-Bsymbolic " to
the line in modules/ssl/ starting with "$(SH_LINK)" when using GCC and the Sun
linker. Did you try that? Does it fix the problem?

> And i used the same Openssl Version for both compilations ( Apache 2.2.22 and
> 2.4.1). So i think that theres a problem with the Apache 2.4.1 Makefile?

Can you provide the output of the configure command for 2.2.22 as well?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

Kaspar Brand <as...@velox.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |INVALID

--- Comment #11 from Kaspar Brand <as...@velox.ch> 2012-04-04 13:10:16 UTC ---
(In reply to comment #10)
> It might also be an issue with the specific combination of compiler and linker
> you're using - what compiler did you use for compiling OpenSSL, actually?

Ok, after some more digging it turns out that the behavior shown in comment 1
is the consequence of turning on a feature in Sun/Oracle's ld - see
http://docs.oracle.com/cd/E19963-01/html/821-1461/ld-1.html:

-z text
    In dynamic mode only, forces a fatal error if any relocations against
    non-writable, allocatable sections remain. [...]

(see also
http://docs.oracle.com/cd/E19963-01/html/819-0690/chapter4-10454.html#chapter4-29405)

libtool 2.x is calling Sun's ld with "-z text" by default, so on Solaris a
build failure is expected when trying to compile a shared mod_ssl version
against a static build of OpenSSL (for solutions to this problem, see comment
6).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #9 from Fabian <fa...@gmx.net> 2012-03-08 08:18:20 UTC ---
Hello,

thanks for you help, the Option --enable-mods-static=ssl works for me.
Thanks!

But for the further the configure script should  detect these option, dont you
think?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #4 from Kaspar Brand <as...@velox.ch> 2012-03-07 08:44:18 UTC ---
(In reply to comment #3)
> the line in modules/ssl/ starting with "$(SH_LINK)"

should read "modules/ssl/modules.mk"

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #6 from Kaspar Brand <as...@velox.ch> 2012-03-07 17:20:11 UTC ---
(In reply to comment #5)
> And here the output from gmake with the 2.2.22:
> http://www.wholewildworld.de/portal/upload/fabi65/gmake_2_2_22

Ok, the difference to 2.2.22 is that in this case, you're compiling/linking a
static version of mod_ssl:

/opt/ae/build-1/libtool --silent --mode=link gcc -g -O2   -static 
-L/opt/ae/lib -R/opt/ae/lib   -o libmod_ssl.la mod_ssl.lo ssl_engine_config.lo
ssl_engine_dh.lo ssl_engine_init.lo ssl_engine_io.lo ssl_engine_kernel.lo
ssl_engine_log.lo ssl_engine_mutex.lo ssl_engine_pphrase.lo ssl_engine_rand.lo
ssl_engine_vars.lo ssl_expr.lo ssl_expr_eval.lo ssl_expr_parse.lo
ssl_expr_scan.lo ssl_scache.lo ssl_scache_dbm.lo ssl_scache_shmcb.lo
ssl_scache_dc.lo ssl_util.lo ssl_util_ssl.lo  -lssl -lcrypto -lsocket -lnsl
-ldl

... which is then statically linked with the httpd binary in the last step.

I think there are two solutions to your problem:

a) also compile shared libraries for OpenSSL (see its "shared" config option),
and leave the configure command for httpd 2.4 unchanged - i.e., you will end up
with a shared mod_ssl version

b) use the static OpenSSL libraries, but add "--enable-mods-static=ssl" to the
httpd 2.4 configure command (will get you httpd with a static version of
mod_ssl)

Can you give these options a try?

(My current guess is that this is the consequence of the changes in r952007.)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 52802] Unable to Build Apache 2.4.1 on Solaris/X86 - Linker Problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52802

--- Comment #2 from Fabian <fa...@gmx.net> 2012-03-06 08:09:39 UTC ---
Hello,

for the compilation i have use a gcc version 3.4.6 with GNU Make 3.81 and the
Solaris Linker.

And i used the same Openssl Version for both compilations ( Apache 2.2.22 and
2.4.1). So i think that theres a problem with the Apache 2.4.1 Makefile?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org