Page 1 of 1

Failing to build apache 32 bit in a 64 bit O/S

Posted: 2012/03/19 12:00:56
by didds
CentOS release 5.6 (Final) 64 bit
gcc version 4.1.2
apache httpd-2.2.22

Trying to build a 32 bit version of apache because we have a 32 bit library that needs using (libbvapache.so FTR) - this library is ONLY availbale as 32 bit.
If I try and start the 32 bit installation from source for apache httpd-2.2.22 it fails

export CFLAGS=-m32;export CPPFLAGS=-m32
./configure --prefix=/opt/apache/apache-2.2.22 --enable-ssl --enable-so --enable-mods-shared="proxy cache ssl all"
...
checking for working mkdir -p... yes
APR Version: 1.4.5
checking for chosen layout... apr
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/tmp/httpd-2.2.22/srclib/apr':
configure: error: C compiler cannot create executables
See `config.log' for more details.
configure failed for srclib/apr

config.log is not very helpful (?) - see below.

FTR without
export CFLAGS=-m32
export CPPFLAGS=-m32

the ./configure runs to completion successfully.

ian

Re: Failing to build apache 32 bit in a 64 bit O/S

Posted: 2012/03/19 12:02:59
by didds
config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64. Invocation command line was

$ ./configure --prefix=/opt/apache/apache-2.2.22 --enable-ssl --enable-so --enable-mods-shared=proxy cache ssl all

## --------- ##
## Platform. ##
## --------- ##

hostname = dopey
uname -m = x86_64
uname -r = 2.6.18-238.el5
uname -s = Linux
uname -v = #1 SMP Thu Jan 13 15:51:15 EST 2011

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/kerberos/sbin
PATH: /usr/kerberos/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2782: checking for chosen layout
configure:2784: result: Apache
configure:3587: checking for working mkdir -p
configure:3603: result: yes
configure:3618: checking build system type
configure:3632: result: x86_64-unknown-linux-gnu
configure:3652: checking host system type
configure:3665: result: x86_64-unknown-linux-gnu
configure:3685: checking target system type
configure:3698: result: x86_64-unknown-linux-gnu
configure:3769: checking for APR
configure:3848: result: reconfig

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

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-m32
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-m32
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_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=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_mkdir_p=yes
ac_cv_target=x86_64-unknown-linux-gnu

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

APACHECTL_ULIMIT=''
APR_BINDIR=''
APR_CONFIG=''
APR_INCLUDEDIR=''
APR_VERSION=''
APU_BINDIR=''
APU_CONFIG=''
APU_INCLUDEDIR=''
APU_VERSION=''
AP_BUILD_SRCLIB_DIRS=''
AP_CLEAN_SRCLIB_DIRS=''
AP_LIBS=''
AWK=''
BUILTIN_LIBS=''
CC=''
CFLAGS='-m32'
CORE_IMPLIB=''
CORE_IMPLIB_FILE=''
CPP=''
CPPFLAGS='-m32'
CRYPT_LIBS=''
CXX=''
CXXFLAGS=''
DEFS=''
DSO_MODULES=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXTRA_CFLAGS=''
EXTRA_CPPFLAGS=''
EXTRA_CXXFLAGS=''
EXTRA_INCLUDES=''
EXTRA_LDFLAGS=''
EXTRA_LIBS=''

GREP=''
HTTPD_LDFLAGS=''
HTTPD_VERSION=''
INCLUDES=''
INSTALL=''
INSTALL_DSO=''
INSTALL_PROG_FLAGS=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTCFLAGS=''
LTFLAGS=''
LTLIBOBJS=''
LT_LDFLAGS=''
LYNX_PATH=''
MKDEP=''
MKINSTALLDIRS=''
MK_IMPLIB=''
MODULE_CLEANDIRS=''
MODULE_DIRS=''
MOD_ACTIONS_LDADD=''
MOD_ALIAS_LDADD=''
MOD_ASIS_LDADD=''
MOD_AUTHNZ_LDAP_LDADD=''
MOD_AUTHN_ALIAS_LDADD=''
MOD_AUTHN_ANON_LDADD=''
MOD_AUTHN_DBD_LDADD=''
MOD_AUTHN_DBM_LDADD=''
MOD_AUTHN_DEFAULT_LDADD=''
MOD_AUTHN_FILE_LDADD=''
MOD_AUTHZ_DBM_LDADD=''
MOD_AUTHZ_DEFAULT_LDADD=''
MOD_AUTHZ_GROUPFILE_LDADD=''
MOD_AUTHZ_HOST_LDADD=''
MOD_AUTHZ_OWNER_LDADD=''
MOD_AUTHZ_USER_LDADD=''
MOD_AUTH_BASIC_LDADD=''
MOD_AUTH_DIGEST_LDADD=''
MOD_AUTOINDEX_LDADD=''
MOD_BUCKETEER_LDADD=''
MOD_CACHE_LDADD=''
MOD_CASE_FILTER_IN_LDADD=''
MOD_CASE_FILTER_LDADD=''
MOD_CERN_META_LDADD=''
MOD_CGID_LDADD=''
MOD_CGI_LDADD=''
MOD_CHARSET_LITE_LDADD=''
MOD_DAV_FS_LDADD=''
MOD_DAV_LDADD=''
MOD_DAV_LOCK_LDADD=''
MOD_DBD_LDADD=''
MOD_DEFLATE_LDADD=''
MOD_DIR_LDADD=''
MOD_DISK_CACHE_LDADD=''
MOD_DUMPIO_LDADD=''
MOD_ECHO_LDADD=''
MOD_ENV_LDADD=''
MOD_EXAMPLE_LDADD=''
MOD_EXPIRES_LDADD=''
MOD_EXT_FILTER_LDADD=''
MOD_FILE_CACHE_LDADD=''
MOD_FILTER_LDADD=''
MOD_HEADERS_LDADD=''
MOD_HTTP_LDADD=''
MOD_IDENT_LDADD=''
MOD_IMAGEMAP_LDADD=''
MOD_INCLUDE_LDADD=''
MOD_INFO_LDADD=''
MOD_ISAPI_LDADD=''
MOD_LDAP_LDADD=''
MOD_LOGIO_LDADD=''
MOD_LOG_CONFIG_LDADD=''
MOD_LOG_FORENSIC_LDADD=''
MOD_MEM_CACHE_LDADD=''
MOD_MIME_LDADD=''
MOD_MIME_MAGIC_LDADD=''
MOD_NEGOTIATION_LDADD=''
MOD_OPTIONAL_FN_EXPORT_LDADD=''
MOD_OPTIONAL_FN_IMPORT_LDADD=''
MOD_OPTIONAL_HOOK_EXPORT_LDADD=''
MOD_OPTIONAL_HOOK_IMPORT_LDADD=''
MOD_PROXY_AJP_LDADD=''
MOD_PROXY_BALANCER_LDADD=''
MOD_PROXY_CONNECT_LDADD=''
MOD_PROXY_FTP_LDADD=''
MOD_PROXY_HTTP_LDADD=''
MOD_PROXY_LDADD=''
MOD_PROXY_SCGI_LDADD=''
MOD_REQTIMEOUT_LDADD=''
MOD_REWRITE_LDADD=''
MOD_SETENVIF_LDADD=''
MOD_SO_LDADD=''
MOD_SPELING_LDADD=''
MOD_SSL_LDADD=''
MOD_STATUS_LDADD=''
MOD_SUBSTITUTE_LDADD=''
MOD_SUEXEC_LDADD=''
MOD_UNIQUE_ID_LDADD=''
MOD_USERDIR_LDADD=''
MOD_USERTRACK_LDADD=''
MOD_VERSION_LDADD=''
MOD_VHOST_ALIAS_LDADD=''
MPM_LIB=''
MPM_NAME=''
MPM_SUBDIR_NAME=''
NONPORTABLE_SUPPORT=''
NOTEST_CFLAGS=''
NOTEST_CPPFLAGS=''
NOTEST_CXXFLAGS=''
NOTEST_LDFLAGS=''
NOTEST_LIBS=''
OBJEXT=''
OS=''
OS_DIR=''
OS_SPECIFIC_VARS=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PCRE_CONFIG=''
PICFLAGS=''
PILDFLAGS=''
PKGCONFIG=''
PORT=''
POST_SHARED_CMDS=''
PRE_SHARED_CMDS=''
RANLIB=''
RM=''
RSYNC=''
SHELL='/bin/sh'
SHLIBPATH_VAR=''
SHLTCFLAGS=''
SH_LDFLAGS=''
SH_LIBS=''
SH_LIBTOOL=''
SSLPORT=''
SSL_LIBS=''
UTIL_LDFLAGS=''
ab_LTFLAGS=''
abs_srcdir=''
ac_ct_CC=''
ap_make_delimiter=''
ap_make_include=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
cgidir='${datadir}/cgi-bin'
checkgid_LTFLAGS=''
datadir='${prefix}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
errordir='${datadir}/error'
exec_prefix='${prefix}'
exp_bindir='/opt/apache/apache-2.2.22/bin'
exp_cgidir='/opt/apache/apache-2.2.22/cgi-bin'
exp_datadir='/opt/apache/apache-2.2.22'
exp_errordir='/opt/apache/apache-2.2.22/error'
exp_exec_prefix='/opt/apache/apache-2.2.22'
exp_htdocsdir='/opt/apache/apache-2.2.22/htdocs'
exp_iconsdir='/opt/apache/apache-2.2.22/icons'
exp_includedir='/opt/apache/apache-2.2.22/include'
exp_installbuilddir='/opt/apache/apache-2.2.22/build'
exp_libdir='/opt/apache/apache-2.2.22/lib'
exp_libexecdir='/opt/apache/apache-2.2.22/modules'
exp_localstatedir='/opt/apache/apache-2.2.22'
exp_logfiledir='/opt/apache/apache-2.2.22/logs'
exp_mandir='/opt/apache/apache-2.2.22/man'
exp_manualdir='/opt/apache/apache-2.2.22/manual'
exp_proxycachedir='/opt/apache/apache-2.2.22/proxy'
exp_runtimedir='/opt/apache/apache-2.2.22/logs'
exp_sbindir='/opt/apache/apache-2.2.22/bin'
exp_sysconfdir='/opt/apache/apache-2.2.22/conf'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'


htcacheclean_LTFLAGS=''
htdbm_LTFLAGS=''
htdigest_LTFLAGS=''
htdocsdir='${datadir}/htdocs'
htmldir='${docdir}'
htpasswd_LTFLAGS=''
httxt2dbm_LTFLAGS=''
iconsdir='${datadir}/icons'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
installbuilddir='${datadir}/build'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/modules'
localedir='${datarootdir}/locale'
localstatedir='${prefix}'
logfiledir='${localstatedir}/logs'
logresolve_LTFLAGS=''
mandir='${prefix}/man'
manualdir='${datadir}/manual'
nonssl_listen_stmt_1=''
nonssl_listen_stmt_2=''
oldincludedir='/usr/include'
other_targets=''
pdfdir='${docdir}'
perlbin=''
prefix='/opt/apache/apache-2.2.22'
progname=''
program_transform_name='s,x,x,'
proxycachedir='${localstatedir}/proxy'
psdir='${docdir}'
rel_bindir='bin'
rel_cgidir='cgi-bin'
rel_datadir=''
rel_errordir='error'
rel_exec_prefix=''
rel_htdocsdir='htdocs'
rel_iconsdir='icons'
rel_includedir='include'
rel_installbuilddir='build'
rel_libdir='lib'
rel_libexecdir='modules'
rel_localstatedir=''
rel_logfiledir='logs'
rel_mandir='man'
rel_manualdir='manual'
rel_proxycachedir='proxy'
rel_runtimedir='logs'
rel_sbindir='bin'
rel_sysconfdir='conf'
rotatelogs_LTFLAGS=''
runtimedir='${localstatedir}/logs'
sbindir='${exec_prefix}/bin'
shared_build=''
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/conf'
target='x86_64-unknown-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='unknown'

configure: exit 1

Re: Failing to build apache 32 bit in a 64 bit O/S

Posted: 2012/03/19 12:06:36
by didds
I've also thought about using a 32 bit version of gcc, but I can;t find I can;t find a binary via yum install, or an rpm.

I tried to build a 32 bit gcc from source... but gort a very similar failure

$ ./configure --prefix=/tmp/gcc32bit
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/tmp/gcc-4.6.3':
configure: error: C compiler cannot create executables
See `config.log' for more details.


config.log for this attempt ends in

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77

Re: Failing to build apache 32 bit in a 64 bit O/S

Posted: 2012/03/19 12:08:49
by didds
So - how do I build a 32 bit version of apache?

I've also tried httpd-2.4.1, with the same error.

Aklternatively direction to a 32 bit apache httpd from yum or rpm may be a solution for now, but ultimately the ability to build from source is best.

regards and TIA

ian

Failing to build apache 32 bit in a 64 bit O/S

Posted: 2012/03/19 14:22:38
by pschaff
You should not be building Apache at all, nor should be running an obsolete and unsupported release. 5.8 is the current release. See the [url=http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.8]CentOS 5.8 Release Notes[/url] for details. By not updating you are implicitly accepting that you will live with numerous bugs and security issues (and associated known exploits) that have subsequently been fixed.

Please read about [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]Installing Software[/url] and [url=http://wiki.centos.org/AdditionalResources/Repositories]Repositories[/url], and note the warnings and advice about installing and configuring the [url=http://wiki.centos.org/PackageManagement/Yum/Priorities]yum priorities plugin[/url]. Non-core repos should have a higher numeric value, which is a lower priority. Lower is "better" as in golf scores.

Pay particular attention to the evils of [url=http://wiki.centos.org/PackageManagement/SourceInstalls]Source Installs[/url]. Source installs as root are particularly dangerous.

All you should need to do is to enable the 32-bit repos and install the 32-bit httpd with yum; however, there may be a good reason that the 32-bit package is not in 64-bit repos any more, and rebuilding the library for 64-bit might be a better approach.