I
I
ink2012-12-15 15:34:01
linux
ink, 2012-12-15 15:34:01

How to compile correctly?

Cross compile apache httpd with arm-none-linux-gnueabi
Compiled prce, apr, apr-lib, go to apache compilation and get this error
/usr/local/apache/httpd/apr/build-1/libtool --silent - -mode=link gcc -std=gnu99 -g -O2 -L/usr/local/apache/httpd/xml/lib -lpthread -o htpasswd htpasswd.lo /usr/local/apache/httpd/apr/lib/libaprutil- 1.la -lexpat /usr/local/apache/httpd/apr/lib/libapr-1.la -lrt -lcrypt -ldl -lcrypt
/usr/local/apache/httpd/xml/lib/libexpat.so: could not read symbols: File in wrong format
And I can't figure out what's wrong. No matter what I do, I always get this error.
I work under ubuntu 64bit

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
theaspin, 2012-12-15
@theaspin

libexpat.so is most likely compiled for x86. You need to look at which compiler the system calls during assembly and dig towards errors in the Makefile, or variables not passed to build scripts.

M
Maxim Moseychuk, 2012-12-17
@fshp

/usr/local/apache/httpd/xml/lib/libexpat.so is a dynamic library, and you are linking it as a static one.
gcc -L /usr/local/apache/httpd/xml/lib -lexpat *.o

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question