
#14064: Compiling problem on FreeBSD 11 ("failed in phase") -------------------------------------+------------------------------------- Reporter: ohho | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: FreeBSD | Architecture: x86_64 Type of failure: GHC doesn't work | (amd64) at all | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ohho): Replying to [comment:4 bgamari]:
Hmm, this is quite odd; I have no such problem while compiling `lens` with `-fuse-ld=gold` on FreeBSD 11.0 (amd64) (although with gcc 4.8.5)
This is probably because gcc48 didn't invoke ld.gold as the linker. {{{ 5225 ghc GIO fd 16 read 866 bytes "COLLECT_GCC=/usr/local/bin/gcc48 COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc48/gcc/x86_64-portbld- freebsd11.1/4.8.5/lto-wrapper Target: x86_64-portbld-freebsd11.1 Configured with: /var/ports/basejail/usr/ports/lang/gcc48/work/gcc-4.8.5/configure --with- build-config=bootstrap-debug -\ -disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc48 --libexecdir=/usr/local/libexec/gcc48 --progra\ m-suffix=48 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc48/include/c++/ -\ -with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --disable-libgcj --enable-lan\ guages=c,c++,objc,fortran --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/gcc\ 48 --build=x86_64-portbld-freebsd11.1 Thread model: posix gcc version 4.8.5 (FreeBSD Ports Collection) " }}} Notice that line `--with-ld=...` above, if you installed gcc48 from ports, \\ then it's configured with `--with-ld=/usr/local/bin/ld`. Also, {{{ 5225 ghc RET kevent 1 5225 ghc CALL read(0x10,0x80d541010,0x2000) 5225 ghc GIO fd 16 read 608 bytes "collect2 version 4.8.5 /usr/local/bin/ld --eh-frame-hdr -dynamic-linker /libexec/ld- elf.so.1 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc\ 48/gcc/x86_64-portbld-freebsd11.1/4.8.5/crtbegin.o -L/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd11.1/4.8.5 -L/usr/lo\ cal/lib/gcc48/gcc/x86_64-portbld- freebsd11.1/4.8.5/../../../../../x86_64-portbld-freebsd11.1/lib -L/usr/local/lib/gcc48/\ gcc/x86_64-portbld-freebsd11.1/4.8.5/../../.. --version -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -\ lgcc_s --no-as-needed /usr/local/lib/gcc48/gcc/x86_64-portbld- freebsd11.1/4.8.5/crtend.o /usr/lib/crtn.o " }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14064#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler