[GHC] #14300: FreeBSD 10.3 toolchain is terribly broken

#14300: FreeBSD 10.3 toolchain is terribly broken -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #13974 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- == `ld.bfd` with `SplitSections=NO` Fails in the final bindist test with, {{{ /usr/bin/install -c -m 755 libraries/gen_contents_index "/usr/home/ben /bin- dist-8.2.1.20170929-FreeBSD/test/inst/share/doc/ghc-8.2.1.20170929/html/libraries/" [1 of 1] Compiling Main ( /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.hs, /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.o ) Linking /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi ... /usr/bin/ld: Base__199.o: access beyond end of merged section (-24) /usr/bin/ld: Base__201.o: access beyond end of merged section (-24) ... }}} == `ld.bfd` with `SplitSections=YES` fails with, {{{ ... }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14300 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14300: FreeBSD 10.3 toolchain is terribly broken ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: FreeBSD | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13974 | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by bgamari): * os: Unknown/Multiple => FreeBSD -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14300#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14300: FreeBSD 10.3 toolchain is terribly broken ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: FreeBSD | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13974 | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Description changed by bgamari: Old description:
== `ld.bfd` with `SplitSections=NO`
Fails in the final bindist test with, {{{ /usr/bin/install -c -m 755 libraries/gen_contents_index "/usr/home/ben /bin- dist-8.2.1.20170929-FreeBSD/test/inst/share/doc/ghc-8.2.1.20170929/html/libraries/" [1 of 1] Compiling Main ( /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.hs, /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.o ) Linking /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi ... /usr/bin/ld: Base__199.o: access beyond end of merged section (-24) /usr/bin/ld: Base__201.o: access beyond end of merged section (-24) ... }}}
== `ld.bfd` with `SplitSections=YES`
fails with, {{{ ... }}}
New description: == `ld.bfd` with `SplitSections=NO` Fails in the final bindist test with, {{{ /usr/bin/install -c -m 755 libraries/gen_contents_index "/usr/home/ben /bin- dist-8.2.1.20170929-FreeBSD/test/inst/share/doc/ghc-8.2.1.20170929/html/libraries/" [1 of 1] Compiling Main ( /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.hs, /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.o ) Linking /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi ... /usr/bin/ld: Base__199.o: access beyond end of merged section (-24) /usr/bin/ld: Base__201.o: access beyond end of merged section (-24) ... }}} == `ld.bfd` with `SplitSections=YES` fails with, {{{ bindisttest/"install dir"/bin/ghc --make bindisttest/HelloWorld [1 of 1] Compiling Main ( bindisttest/HelloWorld.lhs, bindisttest/HelloWorld.o ) Linking bindisttest/HelloWorld ... /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o):base_ControlziExceptionziBase_absentError_info: warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zN_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zP_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zR_info+0x44): warning: relocation refers to discarded section ... }}} == `ld.gold`, `SplitSections=NO` {{{ ... }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14300#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14300: FreeBSD 10.3 toolchain is terribly broken ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: FreeBSD | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13974 | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Description changed by bgamari: Old description:
== `ld.bfd` with `SplitSections=NO`
Fails in the final bindist test with, {{{ /usr/bin/install -c -m 755 libraries/gen_contents_index "/usr/home/ben /bin- dist-8.2.1.20170929-FreeBSD/test/inst/share/doc/ghc-8.2.1.20170929/html/libraries/" [1 of 1] Compiling Main ( /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.hs, /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.o ) Linking /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi ... /usr/bin/ld: Base__199.o: access beyond end of merged section (-24) /usr/bin/ld: Base__201.o: access beyond end of merged section (-24) ... }}}
== `ld.bfd` with `SplitSections=YES`
fails with, {{{ bindisttest/"install dir"/bin/ghc --make bindisttest/HelloWorld [1 of 1] Compiling Main ( bindisttest/HelloWorld.lhs, bindisttest/HelloWorld.o ) Linking bindisttest/HelloWorld ... /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o):base_ControlziExceptionziBase_absentError_info: warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zN_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zP_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zR_info+0x44): warning: relocation refers to discarded section ... }}}
== `ld.gold`, `SplitSections=NO`
{{{ ... }}}
New description: == `clang`, `ld.bfd` with `SplitSections=NO` Fails in the final bindist test with, {{{ /usr/bin/install -c -m 755 libraries/gen_contents_index "/usr/home/ben /bin- dist-8.2.1.20170929-FreeBSD/test/inst/share/doc/ghc-8.2.1.20170929/html/libraries/" [1 of 1] Compiling Main ( /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.hs, /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.o ) Linking /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi ... /usr/bin/ld: Base__199.o: access beyond end of merged section (-24) /usr/bin/ld: Base__201.o: access beyond end of merged section (-24) ... }}} == `clang`, `ld.bfd` with `SplitSections=YES` fails with, {{{ bindisttest/"install dir"/bin/ghc --make bindisttest/HelloWorld [1 of 1] Compiling Main ( bindisttest/HelloWorld.lhs, bindisttest/HelloWorld.o ) Linking bindisttest/HelloWorld ... /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o):base_ControlziExceptionziBase_absentError_info: warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zN_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zP_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zR_info+0x44): warning: relocation refers to discarded section ... }}} == `clang`, `ld.gold`, `SplitSections=NO` {{{ ... }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14300#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14300: FreeBSD 10.3 toolchain is terribly broken ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: FreeBSD | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13974 | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed Old description:
== `clang`, `ld.bfd` with `SplitSections=NO`
Fails in the final bindist test with, {{{ /usr/bin/install -c -m 755 libraries/gen_contents_index "/usr/home/ben /bin- dist-8.2.1.20170929-FreeBSD/test/inst/share/doc/ghc-8.2.1.20170929/html/libraries/" [1 of 1] Compiling Main ( /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.hs, /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.o ) Linking /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi ... /usr/bin/ld: Base__199.o: access beyond end of merged section (-24) /usr/bin/ld: Base__201.o: access beyond end of merged section (-24) ... }}}
== `clang`, `ld.bfd` with `SplitSections=YES`
fails with, {{{ bindisttest/"install dir"/bin/ghc --make bindisttest/HelloWorld [1 of 1] Compiling Main ( bindisttest/HelloWorld.lhs, bindisttest/HelloWorld.o ) Linking bindisttest/HelloWorld ... /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o):base_ControlziExceptionziBase_absentError_info: warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zN_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zP_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zR_info+0x44): warning: relocation refers to discarded section ... }}}
== `clang`, `ld.gold`, `SplitSections=NO`
{{{ ... }}}
New description: == `clang`, `ld.bfd` with `SplitSections=NO` Fails in the final bindist test with, {{{ /usr/bin/install -c -m 755 libraries/gen_contents_index "/usr/home/ben /bin- dist-8.2.1.20170929-FreeBSD/test/inst/share/doc/ghc-8.2.1.20170929/html/libraries/" [1 of 1] Compiling Main ( /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.hs, /usr/home/ben/bin- dist-8.2.1.20170929-FreeBSD/test/hi.o ) Linking /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi ... /usr/bin/ld: Base__199.o: access beyond end of merged section (-24) /usr/bin/ld: Base__201.o: access beyond end of merged section (-24) ... }}} == `clang`, `ld.bfd` with `SplitSections=YES` fails with, {{{ bindisttest/"install dir"/bin/ghc --make bindisttest/HelloWorld [1 of 1] Compiling Main ( bindisttest/HelloWorld.lhs, bindisttest/HelloWorld.o ) Linking bindisttest/HelloWorld ... /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o):base_ControlziExceptionziBase_absentError_info: warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zN_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zP_info+0x44): warning: relocation refers to discarded section /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zR_info+0x44): warning: relocation refers to discarded section ... }}} == `clang`, `ld.gold`, `SplitSections=NO` {{{ ... }}} == `gcc`, `ld.gold`, `SplitSections=NO` {{{ /usr/local/bin/ld.gold: fatal error: cannot mix -r with dynamic object /usr/lib/libthr.so collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) gmake[1]: *** [iserv/ghc.mk:93: iserv/stage2_p/build/GHCi/Utils.p_o] Error 1 }}} -- Comment: Indeed `gcc5` and `ld.gold` with `SplitSections=NO` appears to work. I didn't try `SplitSections=YES`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14300#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14300: FreeBSD 10.3 toolchain is terribly broken ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: FreeBSD | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13974 | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by pgj): FreeBSD has a very old {{{ld}}} (2.17.50) in the base system (as {{{/usr/bin/ld}}}) due to licensing issues. Newer versions of {{{gcc}}} and {{{ld}}} come in GPLv3 flavor, that is what the developers aim to avoid as much as possible. That is why the README indeed recommends to install the {{{lang/gcc}}} port that will give you GCC 5.4 nowadays and it will also pull the {{{devel/binutils}}} port in, that ships GNU {{{ld}}} 2.28 (as {{{/usr/local/bin/ld}}}). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14300#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14300: FreeBSD 10.3 toolchain is terribly broken ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: FreeBSD | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13974 | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by bgamari): Thanks for the context! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14300#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC