[GHC] #13091: Build broken on amd64 solaris 11
GHC
ghc-devs at haskell.org
Sun Apr 22 06:41:33 UTC 2018
#13091: Build broken on amd64 solaris 11
-------------------------------------+-------------------------------------
Reporter: kgardas | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Build System | Version: 8.0.2
Resolution: | Keywords:
Operating System: Solaris | Architecture: x86_64
Type of failure: Building GHC | (amd64)
failed | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by jwhite):
Yes, I suppose I should have said "fixes it for me".
For more context, I'm building on SmartOS on a `base64 14.3.0` image
(which is a bit old), and it has no toolchain installed by default, just
the system linker in `/usr/bin/ld`.
The toolchain I am using is gcc 4.7, installed from the pkgsrc package
`gcc47-4.7.3nb6`. The compiler is installed as `/opt/local/bin/gcc` and
the linker as `/opt/local/bin/gld`. I guess that's why `./configure` is
picking up `/usr/bin/ld`. The bootstrap GHC is 7.10.3, itself
bootstrapped from GHC 7.6.3 from pkgsrc package `ghc-7.6.3nb4`, both using
`/usr/bin/ld`.
Also, even though binutils is installed (pkgsrc `binutils-2.24nb3`), gcc
is using `/usr/bin/ld`, not `/opt/local/bin/gld`:
{{{
$ truss -af -t execve /opt/local/bin/gcc -o main main.c
...
74127: execve("/usr/bin/ld", 0x00470C20, 0x0046B1D0) argc = 28
74127: argv: /usr/bin/ld -R/opt/local/lib/ -Y
74127: P,/lib/amd64:/usr/lib/amd64:/opt/local/lib/ -Qy -o main
74127: /usr/lib/amd64/crt1.o /usr/lib/amd64/crti.o
74127: /usr/lib/amd64/values-Xa.o
74127: /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/crtbegin.o
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-
solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib/amd64
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-
solaris2.11/4.7.3/../../../amd64
74127: -L/lib/amd64 -L/usr/lib/amd64
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-
solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../..
74127: -R/opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64
74127: -R/opt/local/gcc47/lib/amd64 /var/tmp//ccPDaWlK.o -lgcc
74127: -lgcc_eh -lc -lgcc -lgcc_eh
74127: /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/crtend.o
74127: /usr/lib/amd64/crtn.o
74127: execve("/usr/bin/amd64/ld", 0x08047578, 0x080475EC) argc = 28
74127: argv: /usr/bin/ld -R/opt/local/lib/ -Y
74127: P,/lib/amd64:/usr/lib/amd64:/opt/local/lib/ -Qy -o main
74127: /usr/lib/amd64/crt1.o /usr/lib/amd64/crti.o
74127: /usr/lib/amd64/values-Xa.o
74127: /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/crtbegin.o
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-
solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib/amd64
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-
solaris2.11/4.7.3/../../../amd64
74127: -L/lib/amd64 -L/usr/lib/amd64
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-
solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib
74127: -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../..
74127: -R/opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64
74127: -R/opt/local/gcc47/lib/amd64 /var/tmp//ccPDaWlK.o -lgcc
74127: -lgcc_eh -lc -lgcc -lgcc_eh
74127: /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/crtend.o
74127: /usr/lib/amd64/crtn.o
74125: Received signal #18, SIGCLD, in waitid() [default]
74125: siginfo: SIGCLD CLD_EXITED pid=74127 status=0x0000
74104: Received signal #18, SIGCLD, in waitid() [default]
74104: siginfo: SIGCLD CLD_EXITED pid=74125 status=0x0000
}}}
So I don't think I'm in a position to test that right now (rebuilding all
those toolchains on top of GNU binutils would take a very long time, I'm
running this on a very slow VM).
Regardless, I'm not sure `-m64` would be right here for GNU ld either.
`-m` takes an `emulation` argument, and the valid values are given by
{{{
$ ld -V
GNU ld (GNU Binutils)2.24
Supported emulations:
elf_x86_64_sol2
elf_x86_64
elf_i386_sol2
elf_i386_ldso
elf_i386
elf_l1om
elf_k1om
}}}
Maybe one of the first two is what's needed? Or perhaps it can just be
omitted for GNU ld?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13091#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list