RE: Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

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

 



Hi, Rainer:
The following is the output of make,  after I run a "make clean" first.
Jin
--------------------------------------------------------
# make clean
Making clean in test
rm -f *.o *.lo *.slo *.obj *.a *.la
rm -rf .libs
Making clean in srclib
Making clean in apr-util
Making clean in test
rm -f ./*.o ./*.lo ./*.a ./*.la ./*.so ./*.obj
rm -rf ./.libs
rm -f manyfile.bin testfile.txt data/sqlite*.db dbd testall
rm -rf autom4te.cache
......
......

# make
Making all in srclib
Making all in apr
/usr/local/apache2/install/httpd-2.4.20/srclib/apr/build/mkdir.sh tools
/bin/bash /usr/local/apache2/install/httpd-2.4.20/srclib/apr/libtool --silent --mode=compile gcc -m64 -g -O2   -DHAVE_CONFIG_H  -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT   -I./include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include/arch/unix -I./include/arch/unix -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include/arch/unix -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include/private -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include/private  -o tools/gen_test_char.lo -c tools/gen_test_char.c && touch tools/gen_test_char.lo
/bin/bash /usr/local/apache2/inst
......
......
pd-2.4.20/modules/ssl -I/usr/local/apache2/install/httpd-2.4.20/modules/test -I/usr/local/apache2/install/httpd-2.4.20/server -I/usr/local/apache2/install/httpd-2.4.20/modules/arch/unix -I/usr/local/apache2/install/httpd-2.4.20/modules/dav/main -I/usr/local/apache2/install/httpd-2.4.20/modules/generators -I/usr/local/apache2/install/httpd-2.4.20/modules/mappers  -prefer-non-pic -static -c util_xml.c && touch util_xml.lo
/usr/local/apache2/install/httpd-2.4.20/srclib/apr/libtool --silent --mode=compile gcc -m64 -std=gnu99  -g -O2      -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT     -I. -I/usr/local/apache2/install/httpd-2.4.20/os/unix -I/usr/local/apache2/install/httpd-2.4.20/include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr-util/include -I/usr/local/apache2/pcre2/include -I/usr/local/apache2/install/httpd-2.4.20/modules/aaa -I/usr/local/apache2/install/httpd-2.4.20/modules/cache -I/usr/local/apache2/install/httpd-2.4.20/modules/core -I/usr/local/apache2/install/httpd-2.4.20/modules/database -I/usr/local/apache2/install/httpd-2.4.20/modules/filters -I/usr/local/apache2/install/httpd-2.4.20/modules/ldap -I/usr/local/apache2/install/httpd-2.4.20/modules/loggers -I/usr/local/apache2/install/httpd-2.4.20/modules/lua -I/usr/local/apache2/install/httpd-2.4.20/modules/proxy -I/usr/local/apache2/install/httpd-2.4.20/modules/session -I/usr/local/apache2/install/httpd-2.4.20/modules/ssl -I/usr/local/apache2/install/httpd-2.4.20/modules/test -I/usr/local/apache2/install/httpd-2.4.20/server -I/usr/local/apache2/install/httpd-2.4.20/modules/arch/unix -I/usr/local/apache2/install/httpd-2.4.20/modules/dav/main -I/usr/local/apache2/install/httpd-2.4.20/modules/generators -I/usr/local/apache2/install/httpd-2.4.20/modules/mappers  -prefer-non-pic -static -c util_filter.c && touch util_filter.lo
/usr/local/apache2/install/httpd-2.4.20/srclib/apr/libtool --silent --mode=compile gcc -m64 -std=gnu99  -g -O2      -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT     -I. -I/usr/local/apache2/install/httpd-2.4.20/os/unix -I/usr/local/apache2/install/httpd-2.4.20/include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr/include -I/usr/local/apache2/install/httpd-2.4.20/srclib/apr-util/include -I/usr/local/apache2/pcre2/include -I/usr/local/apache2/install/httpd-2.4.20/modules/aaa -I/usr/local/apache2/install/httpd-2.4.20/modules/cache -I/usr/local/apache2/install/httpd-2.4.20/modules/core -I/usr/local/apache2/install/httpd-2.4.20/modules/database -I/usr/local/apache2/install/httpd-2.4.20/modules/filters -I/usr/local/apache2/install/httpd-2.4.20/modules/ldap -I/usr/local/apache2/install/httpd-2.4.20/modules/loggers -I/usr/local/apache2/install/httpd-2.4.20/modules/lua -I/usr/local/apache2/install/httpd-2.4.20/modules/proxy -I/usr/local/apache2/install/httpd-2.4.20/modules/session -I/usr/local/apache2/install/httpd-2.4.20/modules/ssl -I/usr/local/apache2/install/httpd-2.4.20/modules/test -I/usr/local/apache2/install/httpd-2.4.20/server -I/usr/local/apache2/install/httpd-2.4.20/modules/arch/unix -I/usr/local/apache2/install/httpd-2.4.20/modules/dav/main -I/usr/local/apache2/install/httpd-2.4.20/modules/generators -I/usr/local/apache2/install/httpd-2.4.20/modules/mappers  -prefer-non-pic -static -c util_pcre.c && touch util_pcre.lo
util_pcre.c:49:18: pcre.h: No such file or directory
util_pcre.c: In function `ap_regfree':
util_pcre.c:104: error: `pcre_free' undeclared (first use in this function)
util_pcre.c:104: error: (Each undeclared identifier is reported only once
util_pcre.c:104: error: for each function it appears in.)
util_pcre.c: In function `ap_regcomp':
util_pcre.c:128: error: `PCRE_DUPNAMES' undeclared (first use in this function)
util_pcre.c:131: error: `PCRE_CASELESS' undeclared (first use in this function)
util_pcre.c:133: error: `PCRE_MULTILINE' undeclared (first use in this function)
util_pcre.c:135: error: `PCRE_DOTALL' undeclared (first use in this function)
util_pcre.c:138: warning: implicit declaration of function `pcre_compile2'
util_pcre.c:138: warning: assignment makes pointer from integer without a cast
util_pcre.c:151: warning: implicit declaration of function `pcre_fullinfo'
util_pcre.c:151: error: syntax error before "pcre"
util_pcre.c: In function `ap_regexec_len':
util_pcre.c:189: error: `PCRE_NOTBOL' undeclared (first use in this function)
util_pcre.c:191: error: `PCRE_NOTEOL' undeclared (first use in this function)
util_pcre.c:207: warning: implicit declaration of function `pcre_exec'
util_pcre.c:207: error: syntax error before "pcre"
util_pcre.c:230: error: `PCRE_ERROR_NOMATCH' undeclared (first use in this function)
util_pcre.c:232: error: `PCRE_ERROR_NULL' undeclared (first use in this function)
util_pcre.c:234: error: `PCRE_ERROR_BADOPTION' undeclared (first use in this function)
util_pcre.c:236: error: `PCRE_ERROR_BADMAGIC' undeclared (first use in this function)
util_pcre.c:238: error: `PCRE_ERROR_UNKNOWN_NODE' undeclared (first use in this function)
util_pcre.c:240: error: `PCRE_ERROR_NOMEMORY' undeclared (first use in this function)
util_pcre.c: In function `ap_regname':
util_pcre.c:269: error: syntax error before "pcre"
util_pcre.c:271: error: syntax error before "pcre"
util_pcre.c:273: error: syntax error before "pcre"
*** Error code 1
make: Fatal error: Command failed for target `util_pcre.lo'
Current working directory /usr/local/apache2/install/httpd-2.4.20/server
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list='  mpm'; \
for i in $list; do \
    if test -d "$i"; then \
        target="$otarget"; \
        echo "Making $target in $i"; \
        if test "$i" = "."; then \
                made_local=yes; \
                target="local-$target"; \
        fi; \
        (cd $i && make $target) || exit 1; \
    fi; \
done; \
if test "$otarget" = "all" && test -z 'delete-exports libmain.la  export_vars.h httpd.exp'; then \
    made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
    make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
Current working directory /usr/local/apache2/install/httpd-2.4.20/server
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list='  srclib os server modules support'; \
for i in $list; do \
    if test -d "$i"; then \
        target="$otarget"; \
        echo "Making $target in $i"; \
        if test "$i" = "."; then \
                made_local=yes; \
                target="local-$target"; \
        fi; \
        (cd $i && make $target) || exit 1; \
    fi; \
done; \
if test "$otarget" = "all" && test -z 'httpd shared-build '; then \
    made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
    make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
#


-----Original Message-----
From: Huang, Jinhui (OST) 
Sent: Thursday, April 28, 2016 1:51 PM
To: rainer.jung@xxxxxxxxxxx; users@xxxxxxxxxxxxxxxx
Subject: RE:  Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

Hi, Rainer:
Thank you for your reply.
Enclosed please find the screen capture (text file) for configure and make.
Please note, I just tried to run a make clean and it seems give me different error. I will post that later.
Jin

-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@xxxxxxxxxxx]
Sent: Thursday, April 28, 2016 1:25 PM
To: users@xxxxxxxxxxxxxxxx
Cc: Huang, Jinhui (OST)
Subject: Re:  Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

Am 28.04.2016 um 18:56 schrieb Jinhui.Huang.CTR@xxxxxxx:
> I am following the "Compilling and Installing" guide from 
> [url]http://httpd.apache.org/docs/2.4/install.html[/url]
>
> The configure running OK:
>
> # export CC="gcc -m64"
>
> # ./configure \
>
> --prefix=/usr/local/apache2/httpd-2.4.20 \
>
> --with-port=80 \
>
> --with-mpm=worker \
>
> --enable-mods-shared=most \
>
> --enable-ssl \
>
> --with-ssl=/usr/local/ssl \
>
> --enable-proxy \
>
> --disable-example \
>
> --with-included-apr \
>
> --with-pcre=/usr/local/apache2/pcre2/bin/pcre2-config
>
> But got a fatal error when run make:
>
> # make
>
> ....
>
> ....
>
> Making all in generators
>
> Making all in dav/fs
>
> Making all in mappers
>
> Making all in support
>
> /usr/local/apache2/install/httpd-2.4.20/srclib/apr/libtool --silent
> --mode=link gcc -m64 -std=gnu99  -g -O2   -L/usr/local/ssl/lib -lssl
> -lcrypto -luuid -lsendfile -lrt -lsocket -lnsl -lpthread  \
>
>           -o ab  ab.lo
> /usr/local/apache2/install/httpd-2.4.20/srclib/apr-util/libaprutil-1.l
> a -lexpat
> /usr/local/apache2/install/httpd-2.4.20/srclib/apr/libapr-1.la
> -luuid -lsendfile -lrt -lsocket -lnsl -lpthread -lm
>
> ld: fatal: file ab.o: wrong ELF class: ELFCLASS32
>
> ld: fatal: file processing errors. No output written to .libs/ab
>
> collect2: ld returned 1 exit status
>
> *** Error code 1
>
> make: Fatal error: Command failed for target `ab'
>
> Current working directory
> /usr/local/apache2/install/httpd-2.4.20/support
>
> *** Error code 1
>
> The following command caused the error:
>
> otarget=`echo all-recursive|sed s/-recursive//`; \
>
> list='  '; \
>
> for i in $list; do \
>
> .....
>
> .....
>
> After searching online, I think the issue is related to the 32-bit 
> class (ELFCLASS32). I am trying to add some compile/link flags. But 
> there are many options to try. Is there anyone have this experience?
> Thank you very much if you can give my any hint or clue.

The object file ab.o is 32 bit but you want to compile a 64 bit "ab" binary.

How does the make output line look, which compiles ab.c into ab.o (libtool ... mode=compile)?

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux