LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-25-2017, 04:24 PM   #1
Applesoup
LQ Newbie
 
Registered: Aug 2017
Posts: 1

Rep: Reputation: Disabled
Cross compiling Apache with ARM


I'm using apr-1.6.2 apr-util-1.6.0 and pcre-8.41. All of these configure and make and make install fine.

Using httpd-2.4.27. This is my config script:

./configure --build=i686-linux --host=arm-linux --target=arm-linux \
--prefix=/usr/local \
--exec-prefix=/usr/local/src/sysroot \
--with-apr=/usr/local/src/apr-1.6.2 \
--with-apr-util=/usr/local/src/apr-util-1.6.0 \
--with-pcre=/usr/local/src/pcre-8.41/pcre-config \
ac_cv_file__dev_zero=yes \
ac_cv_func_setpgrp_word=yes \
apr_cv_process_shard_works=yes \
ac_cv_sizeof_struct_lovec=8 \
apr_cv_mutex_recursive=yes \
ap_cv_void_ptr_lt_long=8

It configures okay, but when I try to make it gives me this:

Making all in srclib
make[1]: Entering directory `/usr/local/src/httpd-2.4.27/srclib'
make[1]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib'
Making all in os
make[1]: Entering directory `/usr/local/src/httpd-2.4.27/os'
Making all in unix
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/os/unix'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/os/unix'
make[3]: Nothing to be done for `local-all'.
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/os/unix'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/os/unix'
make[1]: Leaving directory `/usr/local/src/httpd-2.4.27/os'
Making all in server
make[1]: Entering directory `/usr/local/src/httpd-2.4.27/server'
Making all in mpm
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/server/mpm'
Making all in event
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/server/mpm/event'
make[4]: Entering directory `/usr/local/src/httpd-2.4.27/server/mpm/event'
make[4]: Nothing to be done for `local-all'.
make[4]: Leaving directory `/usr/local/src/httpd-2.4.27/server/mpm/event'
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/server/mpm/event'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/server/mpm'
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/server'
Found newer headers. Will rebuild exports.c.
rm -f exports.c export_files
( for dir in /usr/local/src/httpd-2.4.27/include /usr/local/src/httpd-2.4.27/os/unix; do \
ls $dir/*.h ; \
done; \
for dir in /usr/local/src/apr-1.6.2/include /usr/local/src/apr-util-1.6.0/include; do \
ls $dir/ap[ru].h $dir/ap[ru]_*.h 2>/dev/null; \
done; \
) | sed -e s,//,/,g | sort -u > export_files
mawk -f /usr/local/src/httpd-2.4.27/build/make_exports.awk `cat export_files` > exports.c
/usr/local/src/apr-1.6.2/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/usr/local/src/httpd-2.4.27/os/unix -I/usr/local/src/httpd-2.4.27/include -I/usr/local/src/apr-1.6.2/include -I/usr/local/src/apr-util-1.6.0/include -I/usr/local/include -I/usr/local/src/httpd-2.4.27/modules/aaa -I/usr/local/src/httpd-2.4.27/modules/cache -I/usr/local/src/httpd-2.4.27/modules/core -I/usr/local/src/httpd-2.4.27/modules/database -I/usr/local/src/httpd-2.4.27/modules/filters -I/usr/local/src/httpd-2.4.27/modules/ldap -I/usr/local/src/httpd-2.4.27/modules/loggers -I/usr/local/src/httpd-2.4.27/modules/lua -I/usr/local/src/httpd-2.4.27/modules/proxy -I/usr/local/src/httpd-2.4.27/modules/session -I/usr/local/src/httpd-2.4.27/modules/ssl -I/usr/local/src/httpd-2.4.27/modules/test -I/usr/local/src/httpd-2.4.27/server -I/usr/local/src/httpd-2.4.27/modules/arch/unix -I/usr/local/src/httpd-2.4.27/modules/dav/main -I/usr/local/src/httpd-2.4.27/modules/generators -I/usr/local/src/httpd-2.4.27/modules/mappers -prefer-non-pic -static -c exports.c && touch exports.lo
/usr/local/src/apr-1.6.2/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -o libmain.la -static config.lo log.lo main.lo vhost.lo util.lo util_fcgi.lo util_script.lo util_md5.lo util_cfgtree.lo util_ebcdic.lo util_time.lo connection.lo listen.lo util_mutex.lo mpm_common.lo mpm_unix.lo util_charset.lo util_cookies.lo util_debug.lo util_xml.lo util_filter.lo util_pcre.lo util_regex.lo exports.lo scoreboard.lo error_bucket.lo protocol.lo core.lo request.lo provider.lo eoc_bucket.lo eor_bucket.lo core_filters.lo util_expr_parse.lo util_expr_scan.lo util_expr_eval.lo
mawk -f /usr/local/src/httpd-2.4.27/build/make_var_export.awk `cat export_files` > export_vars.h
gcc -E -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/usr/local/src/httpd-2.4.27/os/unix -I/usr/local/src/httpd-2.4.27/include -I/usr/local/src/apr-1.6.2/include -I/usr/local/src/apr-util-1.6.0/include -I/usr/local/include -I/usr/local/src/httpd-2.4.27/modules/aaa -I/usr/local/src/httpd-2.4.27/modules/cache -I/usr/local/src/httpd-2.4.27/modules/core -I/usr/local/src/httpd-2.4.27/modules/database -I/usr/local/src/httpd-2.4.27/modules/filters -I/usr/local/src/httpd-2.4.27/modules/ldap -I/usr/local/src/httpd-2.4.27/modules/loggers -I/usr/local/src/httpd-2.4.27/modules/lua -I/usr/local/src/httpd-2.4.27/modules/proxy -I/usr/local/src/httpd-2.4.27/modules/session -I/usr/local/src/httpd-2.4.27/modules/ssl -I/usr/local/src/httpd-2.4.27/modules/test -I/usr/local/src/httpd-2.4.27/server -I/usr/local/src/httpd-2.4.27/modules/arch/unix -I/usr/local/src/httpd-2.4.27/modules/dav/main -I/usr/local/src/httpd-2.4.27/modules/generators -I/usr/local/src/httpd-2.4.27/modules/mappers exports.c | grep "ap_hack_" | grep -v apr_ | sed -e 's/^.*[)]\(.*\);$/\1/' >> httpd.exp
gcc -E -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/usr/local/src/httpd-2.4.27/os/unix -I/usr/local/src/httpd-2.4.27/include -I/usr/local/src/apr-1.6.2/include -I/usr/local/src/apr-util-1.6.0/include -I/usr/local/include -I/usr/local/src/httpd-2.4.27/modules/aaa -I/usr/local/src/httpd-2.4.27/modules/cache -I/usr/local/src/httpd-2.4.27/modules/core -I/usr/local/src/httpd-2.4.27/modules/database -I/usr/local/src/httpd-2.4.27/modules/filters -I/usr/local/src/httpd-2.4.27/modules/ldap -I/usr/local/src/httpd-2.4.27/modules/loggers -I/usr/local/src/httpd-2.4.27/modules/lua -I/usr/local/src/httpd-2.4.27/modules/proxy -I/usr/local/src/httpd-2.4.27/modules/session -I/usr/local/src/httpd-2.4.27/modules/ssl -I/usr/local/src/httpd-2.4.27/modules/test -I/usr/local/src/httpd-2.4.27/server -I/usr/local/src/httpd-2.4.27/modules/arch/unix -I/usr/local/src/httpd-2.4.27/modules/dav/main -I/usr/local/src/httpd-2.4.27/modules/generators -I/usr/local/src/httpd-2.4.27/modules/mappers export_vars.h | grep -v apr_ | sed -e 's/^\#[^!]*//' | sed -e '/^$/d' >> httpd.exp
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/server'
make[1]: Leaving directory `/usr/local/src/httpd-2.4.27/server'
Making all in modules
make[1]: Entering directory `/usr/local/src/httpd-2.4.27/modules'
Making all in aaa
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/aaa'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/aaa'
Making all in cache
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/cache'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/cache'
Making all in core
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/core'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/modules/core'
make[3]: Nothing to be done for `local-all'.
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/core'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/core'
Making all in database
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/database'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/database'
Making all in debugging
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/debugging'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/debugging'
Making all in filters
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/filters'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/filters'
Making all in http
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/http'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/modules/http'
make[3]: Nothing to be done for `local-all'.
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/http'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/http'
Making all in loggers
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/loggers'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/loggers'
Making all in metadata
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/metadata'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/metadata'
Making all in proxy
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/proxy'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/proxy'
Making all in session
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/session'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/session'
Making all in slotmem
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/slotmem'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/slotmem'
Making all in proxy/balancers
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/proxy/balancers'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/proxy/balancers'
Making all in arch/unix
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/arch/unix'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/arch/unix'
Making all in dav/main
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/dav/main'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/dav/main'
Making all in generators
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/generators'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/generators'
Making all in dav/fs
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/dav/fs'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/dav/fs'
Making all in mappers
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/modules/mappers'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/modules/mappers'
make[1]: Leaving directory `/usr/local/src/httpd-2.4.27/modules'
Making all in support
make[1]: Entering directory `/usr/local/src/httpd-2.4.27/support'
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/support'
/usr/local/src/apr-1.6.2/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -o htpasswd htpasswd.lo passwd_common.lo /usr/local/src/apr-util-1.6.0/libaprutil-1.la /usr/local/src/apr-1.6.2/libapr-1.la -lrt -lcrypt -ldl -lcrypt
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_GetErrorCode'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_SetEntityDeclHandler'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_ParserCreate'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_SetCharacterDataHandler'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_ParserFree'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_SetUserData'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_StopParser'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_Parse'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_ErrorString'
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_SetElementHandler'
collect2: error: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.4.27/support'
make: *** [all-recursive] Error 1

Any ideas as to what is going on here? When I 'apt-get install expat libexpat1-dev' it says that libexpat1-dev is already the newest version.
 
Old 08-26-2017, 02:16 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 756

Rep: Reputation: 144Reputation: 144
I always find it best to focus on the very first error. Fix that and retry. And repeat.

The first error I see is this:
Code:
/usr/local/src/apr-util-1.6.0/.libs/libaprutil-1.so: undefined reference to `XML_GetErrorCode'
It looks like libaprutil-1.so is expecting to find symbol XML_GetErrorCode but couldn't find it. Googling reveals that symbol is in libexpat. You have to figure out how to add that library for your compiler.

You have libexpat1-dev installed for your host compiler. But you need it for your ARM compiler.

Also, the command above the error has libraries "-lrt -lcrypt -ldl -lcrypt". There should be a "-lexpat" in that list.

Last edited by KenJackson; 08-26-2017 at 02:21 PM.
 
Old 08-27-2017, 02:13 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Try adding
Code:
--with-expat=builtin
to your configure script.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cross-compiling for ARM xiongnu Linux - Embedded & Single-board computer 1 11-23-2016 04:51 AM
cross compiling apache-2.4.12 for arm MagicPhoton Linux - Newbie 5 06-07-2015 04:23 PM
cross compiling apache-2.0.54 for arm jkeertir Linux - Newbie 3 09-11-2014 01:35 PM
Cross Compiling For ARM ExternalUse Linux - Software 1 06-27-2014 01:39 AM
Cross compiling for ARM Hachaso Programming 1 06-26-2009 06:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration