Bug 612454 - nss build fails on s390x with --target=s390
nss build fails on s390x with --target=s390
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nss (Show other bugs)
5.5
s390x Linux
low Severity medium
: rc
: ---
Assigned To: Elio Maldonado Batiz
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-08 05:26 EDT by Aleš Mareček
Modified: 2013-02-28 14:23 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-28 14:23:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aleš Mareček 2010-07-08 05:26:30 EDT
Description of problem:
When I am trying to create packages for s390 on s390x machine, using --target=s390 --target=s390x, it fails with following:
$ rpmbuild --rebuild --target=s390 --target=s390x nss-3.12.*.src.rpm
...
/usr/bin/ld: warning: s390:31-bit architecture of input file `Linux2.6_s390x_glibc_PTH_OPT.OBJ/nssinit.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `Linux2.6_s390x_glibc_PTH_OPT.OBJ/nssver.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `Linux2.6_s390x_glibc_PTH_OPT.OBJ/utilwrap.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `../certhigh/Linux2.6_s390x_glibc_PTH_OPT.OBJ/certhtml.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `../certhigh/Linux2.6_s390x_glibc_PTH_OPT.OBJ/certreq.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `../certhigh/Linux2.6_s390x_glibc_PTH_OPT.OBJ/crlv2.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `../certhigh/Linux2.6_s390x_glibc_PTH_OPT.OBJ/ocsp.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `../certhigh/Linux2.6_s390x_glibc_PTH_OPT.OBJ/certhigh.o' is incompatible with s390:64-bit output
...
../certdb/Linux2.6_s390x_glibc_PTH_OPT.OBJ/alg1485.o: In function `CERT_GetOidString':
/usr/src/redhat/BUILD/nss-3.12.6/mozilla/security/nss/lib/certdb/alg1485.c:733: undefined reference to `__udivdi3'
collect2: ld returned 1 exit status
make[2]: *** [Linux2.6_s390x_glibc_PTH_OPT.OBJ/libnss3.so] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/nss-3.12.6/mozilla/security/nss/lib/nss'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/nss-3.12.6/mozilla/security/nss/lib'
make: *** [libs] Error 2
make: Leaving directory `/usr/src/redhat/BUILD/nss-3.12.6/mozilla/security/nss'
error: Bad exit status from /var/tmp/rpm-tmp.49463 (%build)
...
$ echo $?
1

Version-Release number of selected component (if applicable):
nss-3.12.6* (tested also with 3.12.5.99*)

How reproducible:
Always

Steps to Reproduce:
1. Download and rebuild (rpmbuild --rebuild --target=s390 --target=s390x nss-3.12.*.src.rpm) nss source package on s390x machine
  
Actual results:
Rebuilding fails.

Expected results:
Successful rebuild.

Additional info:
Rebuild without --target=s390 passes but it will generate only 64-bit packages.
Comment 2 RHEL Product and Program Management 2010-08-09 15:16:11 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 3 Kai Engert (:kaie) 2013-02-19 10:55:32 EST
Is this still a issue?

Given that apparently we have correct builds for both s390 and s390x in brew for NSS on RHEL 5.x, why is this a problem?
Comment 4 Aleš Mareček 2013-02-26 05:23:11 EST
Hi Kai, Elio,
yes, this is still a problem, now with segfault:
i:s390x|m:s390x root@ibm-z10-03 [src]# rpmbuild --target=s390 --target=s390x -ba /usr/src/redhat/SPECS/nspr.spec 
Building target platforms: s390,s390x
Building for target s390
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.28545
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf nspr-4.9.1
+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/nspr-4.9.1.tar.bz2
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nspr-4.9.1
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ cp ./mozilla/nsprpub/config/nspr-config.in ./mozilla/nsprpub/config/nspr-config-pc.in
+ echo 'Patch #1 (nspr-config-pc.patch):'
Patch #1 (nspr-config-pc.patch):
+ patch -p0 -s
+ echo 'Patch #2 (nspr-633519.patch):'
Patch #2 (nspr-633519.patch):
+ patch -p0 -s
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.1953
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd nspr-4.9.1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ ./mozilla/nsprpub/configure --prefix=/usr --libdir=/usr/lib --includedir=/usr/include/nspr4 '--enable-optimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31' --disable-debug
creating cache ./config.cache
checking host system type... s390x-ibm-linux-gnu
checking target system type... s390x-ibm-linux-gnu
checking build system type... s390x-ibm-linux-gnu
checking for whoami... /usr/bin/whoami
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for as... /usr/bin/as
checking for ar... /usr/bin/ar
checking for ld... /usr/bin/ld
checking for strip... /usr/bin/strip
checking for windres... no
checking for gcc -pipe support... no
checking whether C compiler supports -fprofile-generate... no
checking for visibility(hidden) attribute... yes
checking for visibility pragma support... yes
checking for perl5... no
checking for perl... /usr/bin/perl
checking for dlopen in -ldl... yes
checking for dlfcn.h... yes
checking whether gcc needs -traditional... no
checking for lchown... yes
checking for strerror... yes
checking for dladdr... yes
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lpthread... yes
checking whether gcc accepts -pthread... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config/Makefile
creating config/autoconf.mk
creating config/nsprincl.mk
creating config/nsprincl.sh
creating config/nspr-config
creating config/nspr.pc
creating lib/Makefile
creating lib/ds/Makefile
creating lib/libc/Makefile
creating lib/libc/include/Makefile
creating lib/libc/src/Makefile
creating lib/tests/Makefile
creating pkg/Makefile
creating pr/Makefile
creating pr/include/Makefile
creating pr/include/md/Makefile
creating pr/include/obsolete/Makefile
creating pr/include/private/Makefile
creating pr/src/Makefile
creating pr/src/io/Makefile
creating pr/src/linking/Makefile
creating pr/src/malloc/Makefile
creating pr/src/md/Makefile
creating pr/src/md/unix/Makefile
creating pr/src/memory/Makefile
creating pr/src/misc/Makefile
creating pr/src/threads/Makefile
creating pr/tests/Makefile
creating pr/tests/dll/Makefile
creating pkg/linux/Makefile
creating pr/src/pthreads/Makefile
+ make
make -C config export
make[1]: Entering directory `/usr/src/redhat/BUILD/nspr-4.9.1/config'
gcc -o now.o -c      -Wall -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31 -fPIC  -UDEBUG  -DNDEBUG=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1 -D_GNU_SOURCE=1 -DHAVE_FCNTL_FILE_LOCKING=1 -DLINUX=1 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1 -DHAVE_DLADDR=1 -D_REENTRANT=1  -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM   .././mozilla/nsprpub/config/now.c
gcc  now.o   -o now
/usr/bin/ld: warning: s390:31-bit architecture of input file `now.o' is incompatible with s390:64-bit output
gcc -o nsinstall.o -c      -Wall -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31 -fPIC  -UDEBUG  -DNDEBUG=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1 -D_GNU_SOURCE=1 -DHAVE_FCNTL_FILE_LOCKING=1 -DLINUX=1 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1 -DHAVE_DLADDR=1 -D_REENTRANT=1  -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM   .././mozilla/nsprpub/config/nsinstall.c
gcc  nsinstall.o   -o nsinstall
/usr/bin/ld: warning: s390:31-bit architecture of input file `nsinstall.o' is incompatible with s390:64-bit output
rm -f nfspwd; cp .././mozilla/nsprpub/config/nfspwd.pl nfspwd; chmod +x nfspwd
rm -f ../dist/bin/nspr-config
make[1]: Leaving directory `/usr/src/redhat/BUILD/nspr-4.9.1/config'
make -C pr export
make[1]: Entering directory `/usr/src/redhat/BUILD/nspr-4.9.1/pr'
make -C include export
make[2]: Entering directory `/usr/src/redhat/BUILD/nspr-4.9.1/pr/include'
make -C md export
make[3]: Entering directory `/usr/src/redhat/BUILD/nspr-4.9.1/pr/include/md'
../../../config/./nsinstall -R -m 444 ../../.././mozilla/nsprpub/pr/include/md/_aix32.cfg ../../.././mozilla/nsprpub/pr/include/md/_aix64.cfg ../../.././mozilla/nsprpub/pr/include/md/_beos.cfg ../../.././mozilla/nsprpub/pr/include/md/_bsdi.cfg ../../.././mozilla/nsprpub/pr/include/md/_darwin.cfg ../../.././mozilla/nsprpub/pr/include/md/_dgux.cfg ../../.././mozilla/nsprpub/pr/include/md/_freebsd.cfg ../../.././mozilla/nsprpub/pr/include/md/_hpux32.cfg ../../.././mozilla/nsprpub/pr/include/md/_hpux64.cfg ../../.././mozilla/nsprpub/pr/include/md/_irix32.cfg ../../.././mozilla/nsprpub/pr/include/md/_irix64.cfg ../../.././mozilla/nsprpub/pr/include/md/_linux.cfg ../../.././mozilla/nsprpub/pr/include/md/_ncr.cfg ../../.././mozilla/nsprpub/pr/include/md/_nec.cfg ../../.././mozilla/nsprpub/pr/include/md/_netbsd.cfg ../../.././mozilla/nsprpub/pr/include/md/_nextstep.cfg ../../.././mozilla/nsprpub/pr/include/md/_nto.cfg ../../.././mozilla/nsprpub/pr/include/md/_openbsd.cfg ../../.././mozilla/nsprpub/pr/include/md/_os2.cfg ../../.././mozilla/nsprpub/pr/include/md/_osf1.cfg ../../.././mozilla/nsprpub/pr/include/md/_qnx.cfg ../../.././mozilla/nsprpub/pr/include/md/_reliantunix.cfg ../../.././mozilla/nsprpub/pr/include/md/_riscos.cfg ../../.././mozilla/nsprpub/pr/include/md/_scoos.cfg ../../.././mozilla/nsprpub/pr/include/md/_solaris.cfg ../../.././mozilla/nsprpub/pr/include/md/_sony.cfg ../../.././mozilla/nsprpub/pr/include/md/_sunos4.cfg ../../.././mozilla/nsprpub/pr/include/md/_symbian.cfg ../../.././mozilla/nsprpub/pr/include/md/_unixware.cfg ../../.././mozilla/nsprpub/pr/include/md/_unixware7.cfg ../../.././mozilla/nsprpub/pr/include/md/_win95.cfg ../../.././mozilla/nsprpub/pr/include/md/_winnt.cfg ../../../dist/include/nspr/md
make[3]: *** [export] Segmentation fault
make[3]: Leaving directory `/usr/src/redhat/BUILD/nspr-4.9.1/pr/include/md'
make[2]: *** [export] Error 2
make[2]: Leaving directory `/usr/src/redhat/BUILD/nspr-4.9.1/pr/include'
make[1]: *** [export] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/nspr-4.9.1/pr'
make: *** [export] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.1953 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.1953 (%build)
Comment 5 Aleš Mareček 2013-02-26 05:25:55 EST
Of course, same for: rpmbuild --target=s390 --target=s390x --rebuild nspr-4.9.1-6.el5.src.rpm

Now trying nss (which is the real subject of this bug)...
Comment 6 Aleš Mareček 2013-02-26 06:02:12 EST
Nss rebuild failed also.

i:s390x|m:s390x root@ibm-z10-03 [src]# rpmbuild --target=s390 --target=s390x -ba /usr/src/redhat/SPECS/nss.spec

- SNIP -

/usr/bin/ld: warning: s390:31-bit architecture of input file `../libpkix/pkix_pl_nss/module/Linux2.6_s390x_glibc_PTH_OPT.OBJ/pkix_pl_ldapdefaultclient.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `../libpkix/pkix_pl_nss/module/Linux2.6_s390x_glibc_PTH_OPT.OBJ/pkix_pl_nsscontext.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `../libpkix/pkix_pl_nss/module/Linux2.6_s390x_glibc_PTH_OPT.OBJ/pkix_pl_pk11certstore.o' is incompatible with s390:64-bit output
/usr/bin/ld: warning: s390:31-bit architecture of input file `../libpkix/pkix_pl_nss/module/Linux2.6_s390x_glibc_PTH_OPT.OBJ/pkix_pl_socket.o' is incompatible with s390:64-bit output
../certdb/Linux2.6_s390x_glibc_PTH_OPT.OBJ/alg1485.o: In function `CERT_GetOidString':
/usr/src/redhat/BUILD/nss-3.13.5/mozilla/security/nss/lib/certdb/alg1485.c:740: undefined reference to `__udivdi3'
collect2: ld returned 1 exit status
make[2]: *** [Linux2.6_s390x_glibc_PTH_OPT.OBJ/libnss3.so] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/nss-3.13.5/mozilla/security/nss/lib/nss'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/nss-3.13.5/mozilla/security/nss/lib'
make: *** [libs] Error 2
make: Leaving directory `/usr/src/redhat/BUILD/nss-3.13.5/mozilla/security/nss'
error: Bad exit status from /var/tmp/rpm-tmp.7956 (%build)


i:s390x|m:s390x root@ibm-z10-03 [src]# rpmbuild --target=s390 --target=s390x --rebuild nss-3.13.5-8.el5.src.rpm 

- SNIP -

../certdb/Linux2.6_s390x_glibc_PTH_OPT.OBJ/alg1485.o: In function `CERT_GetOidString':
/usr/src/redhat/BUILD/nss-3.13.5/mozilla/security/nss/lib/certdb/alg1485.c:740: undefined reference to `__udivdi3'
collect2: ld returned 1 exit status
make[2]: *** [Linux2.6_s390x_glibc_PTH_OPT.OBJ/libnss3.so] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/nss-3.13.5/mozilla/security/nss/lib/nss'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/nss-3.13.5/mozilla/security/nss/lib'
make: *** [libs] Error 2
make: Leaving directory `/usr/src/redhat/BUILD/nss-3.13.5/mozilla/security/nss'
error: Bad exit status from /var/tmp/rpm-tmp.43099 (%build)


RPM build errors:
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    user mockbuild does not exist - using root
    group mockbuild does not exist - using root
    Bad exit status from /var/tmp/rpm-tmp.43099 (%build)
i:s390x|m:s390x root@ibm-z10-03 [src]# echo $?
1
Comment 7 Elio Maldonado Batiz 2013-02-26 17:01:16 EST
On an s390x system and I have built various ways:

1) rpmbuild --rebuild nsr-4.9.1-6.el5.src.rpm                  -- okay
2) rpmbuild --target=s390 --target=s390x -ba .nspr.spec        -- segfault
3) rpmbuild --target=s390 -ba .nspr.spec                       -- segfault
4) rpmbuild --target=s390x -ba /usr/src/redhat/SPECS/nspr.spec -- okay

On cases 2) and 3) we trying to build --target=s390 in an s390x system. The build system uses essentially method (1) on a mock chroot environment in a virtual machine of the same arch as the target arch so it never runs into such problem.
Comment 8 Kai Engert (:kaie) 2013-02-26 17:09:03 EST
So the answer is that 2) and 3) are unsupported build configurations and aren't required? If that's the case, this bug is WONTFIX.
Comment 9 Elio Maldonado Batiz 2013-02-28 14:23:00 EST
Yes, they are unsupported build configurations and not required.

Note You need to log in before you can comment on or make changes to this bug.