libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when linking on Solaris 64bit shared object using cc, -m64 should be


From: Bob Friesenhahn
Subject: Re: when linking on Solaris 64bit shared object using cc, -m64 should be used
Date: Tue, 10 Jun 2014 09:30:45 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Mon, 9 Jun 2014, Petr Sumbera wrote:

Hi,

I'm often getting following error:

/usr/apr/1.5/build/sparcv9/libtool --silent --mode=link cc -o mod_dtrace.la
-rpath /usr/apache2/2.2/libexec/sparcv9 -module -avoid-version
mod_dtrace.lo
ld: fatal: file .libs/mod_dtrace.o: wrong ELF class: ELFCLASS64
apxs:Error: Command failed with rc=131072

Attached patch fixes the issue.

Normally such options should already be included in CFLAGS (or sometimes works better in CC). All of the software needs to be compiled with the same -m64 option.

When compiling using the Sun compiler and targeting 64-bits, I configure using something like

  ./configure 'CC=/opt/SUNWspro/bin/cc -m64' ...

Libtool is not multilib capable under Solaris. That is, it does not automatically install a library into an architecture-specific subdirectory or search there either. You might notice that the system does support different directories (e.g. '/lib/32', '/lib/64', '/lib/amd64') and GCC is multilib capable, putting its own 64-bit libraries in an architecture-specific subdirectory.

For my own 64-bit compiles under Solaris, I use a different installation prefix in order to make sure that 32-bit and 64-bit libraries/includes are sane.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]