NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
misc/53923: build.sh and MKLINT fails for 32 bit host/64 bit target
>Number: 53923
>Category: misc
>Synopsis: build.sh and MKLINT fails for 32 bit host/64 bit target
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 29 19:40:00 +0000 2019
>Originator: scole_mail
>Release: 8.0 host/current target
>Organization:
none
>Environment:
NetBSD dstar 8.0_STABLE NetBSD 8.0_STABLE (GENERIC) #0: Thu Jan 3 13:28:10 PST 2019 scole@dstar:/home/scole/nbsd/cvs/8_0/obj/sys/arch/i386/compile/GENERIC i386
>Description:
Trying to build.sh with MKLINT and a 64 bit target on a 32 bit host fails:
...
dependall ===> lib/../crypto/external/bsd/openssl/lib
dependall ===> lib/../crypto/external/bsd/openssl/lib/libcrypto
# compile libcrypto/bn_asm.ln
CC=/home/scole/nbsd/cvs/src/obj/tooldir.NetBSD-8.0_STABLE-i386/bin/ia64--netbsd-gcc /home/scole/nbsd/cvs/src/obj/tooldir.NetBSD-8.0_STABLE-i386/bin/ia64--netbsd-lint -chapbxzgFS -D__int128='long long' -d /home/scole/nbsd/cvs/src/obj/destdir.ia64/usr/include -Dlibcrypto -I. -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/include -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/asn1 -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/evp -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/modes -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/../include -DOPENSSLDIR=\"/etc/openssl\" -DENGINESDIR=\"/usr/lib/openssl\" -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn -i
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: possible pointer alignment problem [135]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(197): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: possible pointer alignment problem [135]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/lhash.h(207): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: possible pointer alignment problem [135]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/openssl/err.h(217): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: possible pointer alignment problem [135]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include/internal/cryptlib.h(52): warning: pointer casts may be troublesome [247]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(28): syntax error 'ret' [249]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(28): warning: shift equal to size of object [267]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(28): warning: expression has null effect [129]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(29): syntax error 'ret' [249]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(29): warning: shift equal to size of object [267]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(29): warning: expression has null effect [129]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(30): syntax error 'ret' [249]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(30): warning: shift equal to size of object [267]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(30): warning: expression has null effect [129]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(31): syntax error 'ret' [249]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(31): warning: shift equal to size of object [267]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(31): warning: expression has null effect [129]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(38): syntax error 'ret' [249]
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(38): cannot recover from previous errors [224]
*** Failed target: bn_asm.ln
*** Failed command: CC=/home/scole/nbsd/cvs/src/obj/tooldir.NetBSD-8.0_STABLE-i386/bin/ia64--netbsd-gcc /home/scole/nbsd/cvs/src/obj/tooldir.NetBSD-8.0_STABLE-i386/bin/ia64--netbsd-lint -chapbxzgFS -D__int128='long long' -d /home/scole/nbsd/cvs/src/obj/destdir.ia64/usr/include -Dlibcrypto -I. -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/include -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/include -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/asn1 -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/evp -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/modes -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/../include -DOPENSSLDIR=\"/etc/openssl\" -DENGINESDIR=\"/usr/lib/openssl\" -DDSO_DLFCN -DHAVE_DLFCN_H -I/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/d
ist/crypto/bn -i /home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c
*** Error code 1
Stop.
nbmake[9]: stopped in /home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/lib/libcrypto
*** Failed target: dependall
*** Failed command: cd "/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/lib/libcrypto"; /home/scole/nbsd/cvs/src/obj/tooldir.NetBSD-8.0_STABLE-i386/bin/nbmake realall
*** Error code 1
This failed for me with an i386/host and both ia64/amd64 targets. The error
/home/scole/nbsd/cvs/src/crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c(28): syntax error 'ret' [249]
is caused by int128 & uint128 not being available on 32 bit hosts.
Mainly for my own future recollections, here is some info from web searching, not sure if it is completely accurate:
- GCC supports built-in __int128 and __uint128 types on 64-bit platforms
- Before version 4.6.0 they were named __int128_t and __uint128_t
- can view #defines in gcc with "gcc -dM -E -x c /dev/null"
- __SIZEOF_INT128__ would be defined if int128 is supported, so
#if defined(__SIZEOF_INT128__)
...
#endif
I included a patch below which allows the build to complete, but it is not correct. It looks like someone was already aware of the issue, but I didn't see an existing PR so I submitted this one.
Also, might want to revisit the xlint build workaround in http://gnats.netbsd.org/53710 if a real solution can be implemented.
>How-To-Repeat:
run build.sh with MKLINT=yes in mk.conf on 32 bit host cross-compiling 64 bit target
i386-host> env MAKECONF=mk.conf ./build.sh -j 6 -U -u -m amd64 -x -X ../xsrc release
>Fix:
This patch allows to the build to complete, but is not a real fix.
Summary of changes: (A/? = New, R/D = Removed, M = Modified)
=============================================================
M Makefile
Apply patch with "cd .../src/crypto/external/bsd/openssl/lib/libcrypto ; patch -s -p0 < .../patchfile"
Index: Makefile
===================================================================
RCS file: /cvsroot/src/crypto/external/bsd/openssl/lib/libcrypto/Makefile,v
retrieving revision 1.19
diff -b -u -r1.19 Makefile
--- Makefile 6 Oct 2018 15:31:09 -0000 1.19
+++ Makefile 29 Jan 2019 19:10:02 -0000
@@ -33,6 +33,9 @@
# XXX Not yet.
LINTFLAGS+=-D__int128='long long'
+LINTFLAGS+=-D__uint128='unsigned long long'
+LINTFLAGS+=-D__int128_t='long long'
+LINTFLAGS+=-D__uint128_t='unsigned long long'
CPPFLAGS+= -Dlib${LIB} -I. -I${OPENSSLSRC}/crypto -I${OPENSSLSRC}
CPPFLAGS+= -I${OPENSSLSRC}/include -I${OPENSSLSRC}/crypto/include
Home |
Main Index |
Thread Index |
Old Index