You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2013/06/11 17:24:14 UTC

[Bug 55090] New: Bundled apr.spec doesn't allow to build 32-bit RPM on 64-bit machine

https://issues.apache.org/bugzilla/show_bug.cgi?id=55090

            Bug ID: 55090
           Summary: Bundled apr.spec doesn't allow to build 32-bit RPM on
                    64-bit machine
           Product: APR
           Version: HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: APR
          Assignee: bugs@apr.apache.org
          Reporter: vitus@wagner.pp.ru

When build apr-1.4.6 using command
rpmbuild -tb --target i386-redhat-linux-gnu apr-1.4.6.tar.bz2 on 64-bit RHEL5
machine following step fails:

%check 
 # Run non-interactive tests
 pushd test
 make %{?_smp_mflags} all CFLAGS=-fno-strict-aliasing
 make check || exit 1
 popd

because test executables are compiled into 64-bit object files and cannot be
linked with correctly build 32-bit shared library.

Investigation shows that it is due to overriding of CFLAGS environment
variable, which removes -m32 switch placed into CFLAGS by configure script.

Changing this line to 

make %{?_smp_mflags} all EXTRA_CFLAGS="-pthread  -fno-strict-aliasing"

fixes this problem and allows to build both 32-bit and 64-bit RPMs on same
machine. "-phread" is copied from the original value of EXTRA_CFLAGS in the
build/apr_rules.mk

P.S. Same problem with same fix exists in the apr-util-1.5.2

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 55090] Bundled apr.spec doesn't allow to build 32-bit RPM on 64-bit machine

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55090

--- Comment #1 from Graham Leggett <mi...@sharp.fm> ---
I doubt this is the correct fix - when you're cross compiling (which is what
you've be doing if attempting to build code for a 32 bit machine on a 64 bit
machine), you can't really run the test suite, because the test suite, which
runs locally, doesn't have a local 64 bit library to bind to.

I think cross compiling should cause the test suite to be suppressed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org