Broken build: 32-bit FreeBSD, SmartOS, Solaris

Hello there, Looks one of the recent commits broke the x86 builds on multiple platforms [1][2][3]. The common error message basically is as follows: rts/Linker.c: In function 'mkOc': rts/Linker.c:2372:6: error: 'ObjectCode' has no member named 'symbol_extras' Please fix it! Note that the x86_64 counterparts of the affected builders completed their builds fine -- except for Solaris, but that has been broken already for a long time (relatively). [1] http://haskell.inf.elte.hu/builders/smartos-x86-head/144/10.html [2] http://haskell.inf.elte.hu/builders/freebsd-i386-head/403/10.html [3] http://haskell.inf.elte.hu/builders/solaris-x86-head/191/10.html

On 2014-10-10 at 09:19:31 +0200, Páli Gábor János wrote:
Looks one of the recent commits broke the x86 builds on multiple platforms [1][2][3]. The common error message basically is as follows:
rts/Linker.c: In function 'mkOc': rts/Linker.c:2372:6: error: 'ObjectCode' has no member named 'symbol_extras'
Please fix it!
Note that the x86_64 counterparts of the affected builders completed their builds fine -- except for Solaris, but that has been broken already for a long time (relatively).
[1] http://haskell.inf.elte.hu/builders/smartos-x86-head/144/10.html [2] http://haskell.inf.elte.hu/builders/freebsd-i386-head/403/10.html [3] http://haskell.inf.elte.hu/builders/solaris-x86-head/191/10.html
Fyi, this was the commit, and I'm positive Simon is aware already: https://phabricator.haskell.org/rGHC5300099edf106c1f5938c0793bd6ca199a0eebf0

On 10/10/14 09:19 AM, Páli Gábor János wrote:
Hello there,
Looks one of the recent commits broke the x86 builds on multiple platforms [1][2][3]. The common error message basically is as follows:
rts/Linker.c: In function 'mkOc': rts/Linker.c:2372:6: error: 'ObjectCode' has no member named 'symbol_extras'
It looks like this patch is the culprit: 5300099ed rts/Linker.c (Simon Marlow 2014-10-01 13:15:05 +0100 2372) oc->symbol_extras = NULL;
Note that the x86_64 counterparts of the affected builders completed their builds fine -- except for Solaris, but that has been broken already for a long time (relatively).
Yeah, I'll need to fix that. So far I invested my energy in fixing Solaris/i386 testcase issues... Karel

On 10/10/2014 5:51 PM, Karel Gardas wrote:
It looks like this patch is the culprit:
5300099ed rts/Linker.c (Simon Marlow 2014-10-01 13:15:05 +0100 2372) oc->symbol_extras = NULL;
Yes, that is it and another line is x86_64 only (arch_name is): if (image == NULL) { +#if defined(x86_64_HOST_ARCH) errorBelch("%" PATH_FMT ": failed to allocate memory for image", arch_name); +#endif return NULL;
Note that the x86_64 counterparts of the affected builders completed their builds fine -- except for Solaris, but that has been broken already for a long time (relatively).
I would like to take the chance to ask a question: How can I configure to build x86_64? When I build GHC (with msys2), it always builds i386 and I haven't spotted the option in ./configure to choose a x86_64 release. Thanks, cg

2014-10-10 13:30 GMT+02:00 cg
How can I configure to build x86_64?
When I build GHC (with msys2), it always builds i386 and I haven't spotted the option in ./configure to choose a x86_64 release.
This is implicitly determined by the toolchain you use. So, probably you have the i686 msys2 installed, while you would need the x86_64 version. Given, that your operating system (and thus your hardware) is also x86_64.

likewise, 32bit OS X seems to be broken on HEAD too
http://lpaste.net/112412 is the relevant bit
make[5]: Nothing to be done for `all'.depbase=`echo src/x86/win32.lo |
sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool --mode=compile gcc-4.9 -DHAVE_CONFIG_H -I. -I..
-I. -I../include -Iinclude -I../src -I. -I../include -Iinclude
-I../src -U__i686 -m32 -fno-stack-protector -w -MT src/x86/win32.lo
-MMD -MP -MF $depbase.Tpo -c -o src/x86/win32.lo ../src/x86/win32.S
&&\
mv -f $depbase.Tpo $depbase.Plolibtool: compile: gcc-4.9
-DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I.
-I../include -Iinclude -I../src -U__i686 -m32 -fno-stack-protector -w
-MT src/x86/win32.lo -MMD -MP -MF src/x86/.deps/win32.Tpo -c
../src/x86/win32.S -fno-common -DPIC -o
src/x86/.libs/win32.o../src/x86/win32.S:1283:section difference
relocatable subtraction expression, ".LFE5" minus ".LFB5" using a
symbol at the end of section will not produce an assembly time
constant../src/x86/win32.S:1283:use a symbol with a constant value
created with an assignment instead of the expression, L_const_sym =
.LFE5 - .LFB5../src/x86/win32.S:1275:section difference relocatable
subtraction expression, ".LEFDE5" minus ".LASFDE5" using a symbol at
the end of section will not produce an assembly time
constant../src/x86/win32.S:1275:use a symbol with a constant value
created with an assignment instead of the expression, L_const_sym =
.LEFDE5 - .LASFDE5../src/x86/win32.S:unknown:missing indirect symbols
for section (__IMPORT,__jump_table)make[5]: *** [src/x86/win32.lo]
Error 1
On Fri, Oct 10, 2014 at 9:40 AM, Páli Gábor János
2014-10-10 13:30 GMT+02:00 cg
: How can I configure to build x86_64?
When I build GHC (with msys2), it always builds i386 and I haven't spotted the option in ./configure to choose a x86_64 release.
This is implicitly determined by the toolchain you use. So, probably you have the i686 msys2 installed, while you would need the x86_64 version. Given, that your operating system (and thus your hardware) is also x86_64. _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

Indeed, but this looks like completely unrelated to the issue originally reported. Kind of libffi misdetection of target platform? i.e. why it compiles win32 related file on macosx? Just trying to categorize not to decrease importance of this issue! Karel On 10/10/14 10:47 PM, Carter Schonwald wrote:
likewise, 32bit OS X seems to be broken on HEAD too
http://lpaste.net/112412 is the relevant bit
make[5]: Nothing to be done for `all'. depbase=`echo src/x86/win32.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --mode=compile gcc-4.9 -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -U__i686 -m32 -fno-stack-protector -w -MT src/x86/win32.lo -MMD -MP -MF $depbase.Tpo -c -o src/x86/win32.lo ../src/x86/win32.S&&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc-4.9 -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -U__i686 -m32 -fno-stack-protector -w -MT src/x86/win32.lo -MMD -MP -MF src/x86/.deps/win32.Tpo -c ../src/x86/win32.S -fno-common -DPIC -o src/x86/.libs/win32.o ../src/x86/win32.S:1283:section difference relocatable subtraction expression, ".LFE5" minus ".LFB5" using a symbol at the end of section will not produce an assembly time constant ../src/x86/win32.S:1283:use a symbol with a constant value created with an assignment instead of the expression, L_const_sym = .LFE5 - .LFB5 ../src/x86/win32.S:1275:section difference relocatable subtraction expression, ".LEFDE5" minus ".LASFDE5" using a symbol at the end of section will not produce an assembly time constant ../src/x86/win32.S:1275:use a symbol with a constant value created with an assignment instead of the expression, L_const_sym = .LEFDE5 - .LASFDE5 ../src/x86/win32.S:unknown:missing indirect symbols for section (__IMPORT,__jump_table) make[5]: *** [src/x86/win32.lo] Error 1
On Fri, Oct 10, 2014 at 9:40 AM, Páli Gábor János
mailto:pali.gabor@gmail.com> wrote: 2014-10-10 13:30 GMT+02:00 cg
mailto:chengang31@gmail.com>: > How can I configure to build x86_64? > > When I build GHC (with msys2), it always builds i386 and I haven't spotted > the option in ./configure to choose a x86_64 release. This is implicitly determined by the toolchain you use. So, probably you have the i686 msys2 installed, while you would need the x86_64 version. Given, that your operating system (and thus your hardware) is also x86_64. _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org mailto:ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

could be! i'm not equipped to do the right debuggin atm though (i may try
to help out if can get some guidance though )
On Fri, Oct 10, 2014 at 4:55 PM, Karel Gardas
Indeed, but this looks like completely unrelated to the issue originally reported. Kind of libffi misdetection of target platform? i.e. why it compiles win32 related file on macosx?
Just trying to categorize not to decrease importance of this issue!
Karel
On 10/10/14 10:47 PM, Carter Schonwald wrote:
likewise, 32bit OS X seems to be broken on HEAD too
http://lpaste.net/112412 is the relevant bit
make[5]: Nothing to be done for `all'. depbase=`echo src/x86/win32.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --mode=compile gcc-4.9 -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -U__i686 -m32 -fno-stack-protector -w -MT src/x86/win32.lo -MMD -MP -MF $depbase.Tpo -c -o src/x86/win32.lo ../src/x86/win32.S&&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc-4.9 -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -U__i686 -m32 -fno-stack-protector -w -MT src/x86/win32.lo -MMD -MP -MF src/x86/.deps/win32.Tpo -c ../src/x86/win32.S -fno-common -DPIC -o src/x86/.libs/win32.o ../src/x86/win32.S:1283:section difference relocatable subtraction expression, ".LFE5" minus ".LFB5" using a symbol at the end of section will not produce an assembly time constant ../src/x86/win32.S:1283:use a symbol with a constant value created with an assignment instead of the expression, L_const_sym = .LFE5 - .LFB5 ../src/x86/win32.S:1275:section difference relocatable subtraction expression, ".LEFDE5" minus ".LASFDE5" using a symbol at the end of section will not produce an assembly time constant ../src/x86/win32.S:1275:use a symbol with a constant value created with an assignment instead of the expression, L_const_sym = .LEFDE5 - .LASFDE5 ../src/x86/win32.S:unknown:missing indirect symbols for section (__IMPORT,__jump_table) make[5]: *** [src/x86/win32.lo] Error 1
On Fri, Oct 10, 2014 at 9:40 AM, Páli Gábor János
mailto:pali.gabor@gmail.com> wrote: 2014-10-10 13:30 GMT+02:00 cg
mailto:chengang31@gmail.com>: > How can I configure to build x86_64? > > When I build GHC (with msys2), it always builds i386 and I haven't spotted > the option in ./configure to choose a x86_64 release. This is implicitly determined by the toolchain you use. So, probably you have the i686 msys2 installed, while you would need the x86_64 version. Given, that your operating system (and thus your hardware) is also x86_64. _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org mailto:ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

I believe I've just pushed a fix for this, let me know if you still have problems. Cheers, Simon On 10/10/2014 13:47, Carter Schonwald wrote:
likewise, 32bit OS X seems to be broken on HEAD too
http://lpaste.net/112412 is the relevant bit
make[5]: Nothing to be done for `all'. depbase=`echo src/x86/win32.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ./libtool --mode=compile gcc-4.9 -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -U__i686 -m32 -fno-stack-protector -w -MT src/x86/win32.lo -MMD -MP -MF $depbase.Tpo -c -o src/x86/win32.lo ../src/x86/win32.S &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc-4.9 -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -U__i686 -m32 -fno-stack-protector -w -MT src/x86/win32.lo -MMD -MP -MF src/x86/.deps/win32.Tpo -c ../src/x86/win32.S -fno-common -DPIC -o src/x86/.libs/win32.o ../src/x86/win32.S:1283:section difference relocatable subtraction expression, ".LFE5" minus ".LFB5" using a symbol at the end of section will not produce an assembly time constant ../src/x86/win32.S:1283:use a symbol with a constant value created with an assignment instead of the expression, L_const_sym = .LFE5 - .LFB5 ../src/x86/win32.S:1275:section difference relocatable subtraction expression, ".LEFDE5" minus ".LASFDE5" using a symbol at the end of section will not produce an assembly time constant ../src/x86/win32.S:1275:use a symbol with a constant value created with an assignment instead of the expression, L_const_sym = .LEFDE5 - .LASFDE5 ../src/x86/win32.S:unknown:missing indirect symbols for section (__IMPORT,__jump_table) make[5]: *** [src/x86/win32.lo] Error 1
On Fri, Oct 10, 2014 at 9:40 AM, Páli Gábor János
mailto:pali.gabor@gmail.com> wrote: 2014-10-10 13:30 GMT+02:00 cg
mailto:chengang31@gmail.com>: > How can I configure to build x86_64? > > When I build GHC (with msys2), it always builds i386 and I haven't spotted > the option in ./configure to choose a x86_64 release. This is implicitly determined by the toolchain you use. So, probably you have the i686 msys2 installed, while you would need the x86_64 version. Given, that your operating system (and thus your hardware) is also x86_64. _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org mailto:ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

On 10/10/2014 9:40 PM, Páli Gábor János wrote:
2014-10-10 13:30 GMT+02:00 cg
: How can I configure to build x86_64?
When I build GHC (with msys2), it always builds i386 and I haven't spotted the option in ./configure to choose a x86_64 release.
This is implicitly determined by the toolchain you use. So, probably you have the i686 msys2 installed, while you would need the x86_64 version. Given, that your operating system (and thus your hardware) is also x86_64.
It turns out if I have 64-bit prebuilt ghc installed and exported in PATH, the build system will detect it and build a 64-bit ghc from source code. -- cg

Sorry about this folks, I'm going to guess at the fix and validate it. Cheers, Simon On 10/10/2014 10:51, Karel Gardas wrote:
On 10/10/14 09:19 AM, Páli Gábor János wrote:
Hello there,
Looks one of the recent commits broke the x86 builds on multiple platforms [1][2][3]. The common error message basically is as follows:
rts/Linker.c: In function 'mkOc': rts/Linker.c:2372:6: error: 'ObjectCode' has no member named 'symbol_extras'
It looks like this patch is the culprit:
5300099ed rts/Linker.c (Simon Marlow 2014-10-01 13:15:05 +0100 2372) oc->symbol_extras = NULL;
Note that the x86_64 counterparts of the affected builders completed their builds fine -- except for Solaris, but that has been broken already for a long time (relatively).
Yeah, I'll need to fix that. So far I invested my energy in fixing Solaris/i386 testcase issues...
Karel
participants (6)
-
Carter Schonwald
-
cg
-
Herbert Valerio Riedel
-
Karel Gardas
-
Páli Gábor János
-
Simon Marlow