On Mon, 9 Jun 2014, Petr Sumbera wrote:
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
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.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/