LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-16-2008, 03:27 AM   #1
jkeertir
Member
 
Registered: Mar 2008
Posts: 75

Rep: Reputation: 15
cross compiling apache-2.0.54 for arm


Dear ALL,
I am trying to cross compile apache-2.0.54 for ARM,I cannot configure it .I get error related to srclib/apr(apache portable runtime).so,I am cross compiling apr package.I am not able to configure it.

Can anyone,Please help me to solve the problem.

With Regards,
Keerti
 
Old 03-25-2009, 04:16 PM   #2
ghbf123
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
Hello,

I have similar problem. I am trying to cross compile httpd-2.2.11 for ARM. Wish some experts here can help. Thanks!

I successfully compiled apr and apr-util. The following are my configurations for both.

For apr, compile in apr source directory

./configure --prefix=/usr/local/apr --host=arm-unknown-linux-gnu ac_cv_file__dev_zero="yes" ac_cv_func_setpgrp_void="yes" apr_cv_process_shared_works="yes" apr_cv_mutex_robust_shared="no" apr_cv_tcp_nodelay_with_cork="yes" ac_cv_sizeof_struct_iovec="8" apr_cv_mutex_recursive="yes" CPPFLAGS=-I/tmp/usr/includ


For apr-util, compile in apr-util directory

./configure --prefix=/usr/local/apr-util --host=arm-unknown-linux-gnu --with-apr=/usr/local/apr

After that, I try to compile the httpd-2.2.11. However I got a error related to void * pointer and long. The config for httpd-2.2.11 is

./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-ssl --host=arm-unknown-linux-gnu

The output is

root@hbpc:/home/addin/httpd-2.2.11# ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --host=arm-unknown-linux-gnu
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
configure: loading cache /dev/null
/dev/null: line 1: ./configure:: No such file or directory
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking target system type... arm-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... yes
setting CPP to "arm-unknown-linux-gnu-gcc -E"
setting CFLAGS to " -g -O2"
setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE"
setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

checking for APR-util... yes
checking for arm-unknown-linux-gnu-gcc... arm-unknown-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-unknown-linux-gnu-gcc accepts -g... yes
checking for arm-unknown-linux-gnu-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... arm-unknown-linux-gnu-gcc -E
configure: Configuring PCRE regular expression library
configuring package in srclib/pcre now
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
configure: loading cache /dev/null
/dev/null: line 1: /home/addin/httpd-2.2.11/srclib/pcre/configure:: No such file or directory
checking for arm-unknown-linux-gnu-gcc... arm-unknown-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-unknown-linux-gnu-gcc accepts -g... yes
checking for arm-unknown-linux-gnu-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... arm-unknown-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for bcopy... yes
checking for memmove... yes
checking for strerror... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pcre.h
config.status: creating pcre-config
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
srclib/pcre configured properly
configure: loading cache /dev/null
setting AP_LIBS to "/home/addin/httpd-2.2.11/srclib/pcre/libpcre.la"
setting INCLUDES to "-I$(top_builddir)/srclib/pcre"

Configuring Apache httpd ...

adding "-I." to INCLUDES
adding "-I$(top_srcdir)/os/$(OS_DIR)" to INCLUDES
adding "-I$(top_srcdir)/server/mpm/$(MPM_SUBDIR_NAME)" to INCLUDES
adding "-I$(top_srcdir)/modules/http" to INCLUDES
adding "-I$(top_srcdir)/modules/filters" to INCLUDES
adding "-I$(top_srcdir)/modules/proxy" to INCLUDES
adding "-I$(top_srcdir)/include" to INCLUDES
adding "-I$(top_srcdir)/modules/generators" to INCLUDES
adding "-I$(top_srcdir)/modules/mappers" to INCLUDES
adding "-I$(top_srcdir)/modules/database" to INCLUDES
adding "-I/usr/local/apr/include/apr-1" to INCLUDES
adding "-I/usr/local/apr-util/include/apr-1" to INCLUDES

Applying OS-specific hints for httpd ...

forcing SINGLE_LISTEN_UNSERIALIZED_ACCEPT to "1"
forcing AP_NONBLOCK_WHEN_MULTI_LISTEN to "1"
checking for rm... /bin/rm
checking for pkg-config... no
checking for rsync... no
checking for gawk... gawk
checking whether ln -s works... yes
checking for arm-unknown-linux-gnu-ranlib... arm-unknown-linux-gnu-ranlib
checking for lynx... no
checking for links... no
checking for elinks... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for APR version 1.2.0 or later... yes
checking for APR-util version 1.2.0 or later... yes
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for strings.h... (cached) yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking sys/processor.h usability... no
checking sys/processor.h presence... no
checking for sys/processor.h... no
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for an ANSI C-conforming const... yes
checking for library containing sqrt... -lm
checking for getpwnam... yes
checking for getgrnam... yes
checking for initgroups... yes
checking for bindprocessor... no
checking for prctl... yes
checking for timegm... yes
checking for getpgid... yes
checking for void pointer length... yes
configure: error: Size of "void *" is less than size of "long"


Pieces of config.log showing the error and environment are here,

.....

configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_STRING_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_PRCTL_H 1
| #define HAVE_SYS_SEM_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_GETPWNAM 1
| #define HAVE_GETGRNAM 1
| #define HAVE_INITGROUPS 1
| /* end confdefs.h. */
| /* Define bindprocessor to an innocuous variant, in case <limits.h> declares bindprocessor.
| For example, HP-UX 11i <limits.h> declares gettimeofday. */
| #define bindprocessor innocuous_bindprocessor
|
| /* System header to define __stub macros and hopefully few prototypes,
| which can conflict with char bindprocessor (); below.
| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
| <limits.h> exists even on freestanding compilers. */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef bindprocessor
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char bindprocessor ();
| /* The GNU C library defines this for functions which it implements
| to always fail with ENOSYS. Some functions are actually named
| something starting with __ and the normal name is an alias. */
| #if defined __stub_bindprocessor || defined __stub___bindprocessor
| choke me
| #endif
|
| int
| main ()
| {
| return bindprocessor ();
| ;
| return 0;
| }
configure:7776: result: no
configure:7691: checking for prctl
configure:7747: arm-unknown-linux-gnu-gcc -o conftest -g -O2 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE conftest.c -lm >&5
configure:7754: $? = 0
configure:7776: result: yes
configure:7691: checking for timegm
configure:7747: arm-unknown-linux-gnu-gcc -o conftest -g -O2 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE conftest.c -lm >&5
configure:7754: $? = 0
configure:7776: result: yes
configure:7691: checking for getpgid
configure:7747: arm-unknown-linux-gnu-gcc -o conftest -g -O2 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE conftest.c -lm >&5
configure:7754: $? = 0
configure:7776: result: yes
configure:7791: checking for void pointer length
configure:7848: result: yes
configure:7852: error: Size of "void *" is less than size of "long"

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_c_const=yes
ac_cv_env_CC_set=set
ac_cv_env_CC_value=arm-unknown-linux-gnu-gcc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=arm-unknown-linux-gnu
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_bindprocessor=no
ac_cv_func_getgrnam=yes
ac_cv_func_getpgid=yes
ac_cv_func_getpwnam=yes
ac_cv_func_initgroups=yes
ac_cv_func_prctl=yes
ac_cv_func_timegm=yes
ac_cv_header_grp_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_limits_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_minix_config_h=no
ac_cv_header_pwd_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_prctl_h=yes
ac_cv_header_sys_processor_h=no
ac_cv_header_sys_sem_h=yes
ac_cv_header_sys_socket_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_sys_wait_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=arm-unknown-linux-gnu
ac_cv_mkdir_p=yes
ac_cv_objext=o
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_GREP=/bin/grep
ac_cv_path_RM=/bin/rm
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=arm-unknown-linux-gnu-gcc
ac_cv_prog_CPP='arm-unknown-linux-gnu-gcc -E'
ac_cv_prog_RANLIB=arm-unknown-linux-gnu-ranlib
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_safe_to_define___extensions__=yes
ac_cv_search_sqrt=-lm
ac_cv_search_strerror='none required'
ac_cv_target=arm-unknown-linux-gnu
ap_cv_aprver12=yes
ap_cv_apuver12=yes
ap_cv_void_ptr_lt_long=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

APACHECTL_ULIMIT=''
APR_BINDIR='/usr/local/apr/bin'
APR_CONFIG='/usr/local/apr/bin/apr-1-config'
APR_INCLUDEDIR='/usr/local/apr/include/apr-1'
APR_VERSION='1.3.3'
APU_BINDIR='/usr/local/apr-util/bin'
APU_CONFIG='/usr/local/apr-util/bin/apu-1-config'
APU_INCLUDEDIR='/usr/local/apr-util/include/apr-1'
APU_VERSION='1.3.4'
AP_BUILD_SRCLIB_DIRS=' pcre'
AP_CLEAN_SRCLIB_DIRS=' pcre'
AP_LIBS='/home/addin/httpd-2.2.11/srclib/pcre/libpcre.la'
AWK='gawk'
BUILTIN_LIBS=''
CC='arm-unknown-linux-gnu-gcc'
CFLAGS=' -g -O2'
CORE_IMPLIB=''
CORE_IMPLIB_FILE=''
CPP='arm-unknown-linux-gnu-gcc -E'
CPPFLAGS=' -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE'
CXX='arm-unknown-linux-gnu-g++'
CXXFLAGS=''
DEFS=''
DSO_MODULES=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
EXEEXT=''
EXTRA_CFLAGS=''
EXTRA_CPPFLAGS=''
EXTRA_CXXFLAGS=''
EXTRA_INCLUDES=''
EXTRA_LDFLAGS=''
EXTRA_LIBS=''
GREP='/bin/grep'
HTTPD_LDFLAGS=''
HTTPD_VERSION=''
INCLUDES='-I$(top_builddir)/srclib/pcre -I. -I$(top_srcdir)/os/$(OS_DIR) -I$(top_srcdir)/server/mpm/$(MPM_SUBDIR_NAME) -I$(top_srcdir)/modules/http -I$(top_srcdir)/modules/filters -I$(top_srcdi
r)/modules/proxy -I$(top_srcdir)/include -I$(top_srcdir)/modules/generators -I$(top_srcdir)/modules/mappers -I$(top_srcdir)/modules/database -I/usr/local/apr/include/apr-1 -I/usr/local/apr-util
/include/apr-1'
INSTALL='$(LIBTOOL) --mode=install $(abs_srcdir)/build/install.sh -c'
INSTALL_DSO=''
INSTALL_PROG_FLAGS=''
LDFLAGS=' '
LIBOBJS=''
LIBS='-lm '
LIBTOOL='/usr/local/apr/build-1/libtool $(LTFLAGS)'
LN_S='ln -s'
LTCFLAGS='-prefer-non-pic -static'
LTFLAGS='--silent'
LTLIBOBJS=''
LT_LDFLAGS=''
LYNX_PATH='lynx'
MKDEP='$(CC) -MM'
MKINSTALLDIRS='$(abs_srcdir)/build/mkdir.sh'
MK_IMPLIB=''
MODULE_CLEANDIRS=''
MODULE_DIRS=''

.......
 
Old 04-28-2011, 03:20 AM   #3
daniil
LQ Newbie
 
Registered: Sep 2009
Posts: 28

Rep: Reputation: 0
Quote:
Originally Posted by jkeertir View Post
Dear ALL,
I am trying to cross compile apache-2.0.54 for ARM,I cannot configure it .I get error related to srclib/apr(apache portable runtime).so,I am cross compiling apr package.I am not able to configure it.

Can anyone,Please help me to solve the problem.

With Regards,
Keerti
I have the same error.
configure: error: Size of "void *" is less than size of "long"

How did you fixed that.
 
Old 09-11-2014, 01:35 PM   #4
dhowey
LQ Newbie
 
Registered: Sep 2014
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by daniil View Post
I have the same error.
configure: error: Size of "void *" is less than size of "long"

How did you fixed that.
You have to specify the size of void * by hand. I added "ap_cv_void_ptr_lt_long=4" to my config options, e.g., "./config ap_cv_void_ptr_lt_long=4" Note that a long just happened to be 4 bytes for my target (powerpc) and it could be different for yours. Look for the following lines whiz by when running ./configure to find the right size:

Code:
checking for inline... inline
checking for an ANSI C-conforming const... yes
checking whether setpgrp takes no argument... (cached) no
checking for socklen_t... yes
checking size of void*... 4
checking size of char... 1
checking size of int... 4
checking size of long... 4
checking size of short... 2
checking size of long long... 8
checking for INT64_C... yes
checking size of pid_t... 8
checking whether ssize_t and int are the same... yes
 
  


Reply



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 Bluez-utils for ARM deshu Linux - Software 1 03-06-2009 01:29 PM
Cross compiling utftpd on arm linux SachinTCS Linux - Software 1 04-13-2007 10:03 PM
Cross compiling utftpd on x86 for arm SachinTCS Linux - Software 1 04-13-2007 09:50 PM
Cross compiling utftpd for arm SachinTCS Linux - Desktop 1 04-13-2007 02:11 AM
cross compiling packages like PWLIB for ARM Anurag_Arjun Programming 0 01-18-2006 12:16 AM

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

All times are GMT -5. The time now is 01:38 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