Bug 235891 - lang/julia: link errors on stable/11 after clang 7.0.1
Summary: lang/julia: link errors on stable/11 after clang 7.0.1
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on: 237068
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-20 18:05 UTC by Trond.Endrestol
Modified: 2019-11-03 11:52 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (iblis)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trond.Endrestol 2019-02-20 18:05:41 UTC
After clang 7.0.1 was introduced in base/stable/11, r344213, building lang/julia exhibits the following link errors:

[ 85%] Linking CXX shared library ../../lib/libLTO.so
gmake[5]: Entering directory '/construction/xports/lang/julia/work/julia-1.0.3/deps/scratch/llvm-6.0.0/build_Release'
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
Scanning dependencies of target llvm-lto
gmake[5]: Leaving directory '/construction/xports/lang/julia/work/julia-1.0.3/deps/scratch/llvm-6.0.0/build_Release'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[5]: *** [tools/llvm-config/CMakeFiles/llvm-config.dir/build.make:86: bin/llvm-config] Error 1
gmake[5]: Leaving directory '/construction/xports/lang/julia/work/julia-1.0.3/deps/scratch/llvm-6.0.0/build_Release'
gmake[4]: *** [CMakeFiles/Makefile2:10863: tools/llvm-config/CMakeFiles/llvm-config.dir/all] Error 2
gmake[4]: *** Waiting for unfinished jobs....
gmake[5]: Entering directory '/construction/xports/lang/julia/work/julia-1.0.3/deps/scratch/llvm-6.0.0/build_Release'
[ 87%] Building CXX object tools/llvm-lto/CMakeFiles/llvm-lto.dir/llvm-lto.cpp.o
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[5]: *** [tools/llvm-ar/CMakeFiles/llvm-ar.dir/build.make:85: bin/llvm-ar] Error 1
gmake[5]: Leaving directory '/construction/xports/lang/julia/work/julia-1.0.3/deps/scratch/llvm-6.0.0/build_Release'
gmake[4]: *** [CMakeFiles/Makefile2:10774: tools/llvm-ar/CMakeFiles/llvm-ar.dir/all] Error 2
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
[ 87%] Linking CXX executable ../../bin/llvm-lto
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[5]: *** [tools/lto/CMakeFiles/LTO.dir/build.make:100: lib/libLTO.so.6.0.0] Error 1
gmake[5]: Leaving directory '/construction/xports/lang/julia/work/julia-1.0.3/deps/scratch/llvm-6.0.0/build_Release'
gmake[4]: *** [CMakeFiles/Makefile2:10307: tools/lto/CMakeFiles/LTO.dir/all] Error 2
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[5]: *** [tools/llvm-lto/CMakeFiles/llvm-lto.dir/build.make:85: bin/llvm-lto] Error 1

Previously the link errors was limited to base/head, but now I fear base/stable/12 is equally affected.

lang/julia pulls in lang/gcc8, presumably as a build tool, yet it proceeds to use cc (clang 7.0.1) as its compiler.

Maybe an adjustment of LD is all that's required.

Full build log is available at https://ximalas.info/~trond/julia-stable-11/lang___julia.log
Comment 1 Iblis Lin 2019-02-22 09:19:13 UTC
Hi,
Seems the error is from the build process of private LLVM build.
Are you able to build devel/llvm60 on your environment?
Comment 2 Trond.Endrestol 2019-02-22 11:20:27 UTC
(In reply to Iblis Lin from comment #1)
Yes, graphics/mesa-libs depends on lang/llvm60, and they are both well and alive.
Comment 3 Iblis Lin 2019-02-23 06:48:19 UTC
what is your malloc.conf setting?
Comment 4 Trond.Endrestol 2019-02-23 15:33:43 UTC
(In reply to Iblis Lin from comment #3)
It's non-existent.
Comment 5 Trond.Endrestol 2019-02-23 15:43:02 UTC
This failure is consistent with that of https://www.mail-archive.com/freebsd-pkg-fallout@freebsd.org/msg1022301.html
However, in my case both kernel and world are in sync.
Comment 6 Iblis Lin 2019-02-24 02:54:04 UTC
well, I installed a vm from the 11.2-STABLE snapshot.
(https://download.freebsd.org/ftp/snapshots/VM-IMAGES/11.2-STABLE/amd64/Latest/)

Found that if I build Julia v1.0 from github source,
it builds without error.
But the one in ports failed.
I'm investigating the environment variables set by ports framework.
Comment 7 Justin Hibbits freebsd_committer 2019-02-27 16:13:13 UTC
This looks to be a bug in binutils 2.32.  I see the exact same assertion failure when building devel/llvm60 on powerpcspe, but it succeeds on powerpc64.  Unfortunately for me it takes 20 hours to reproduce for that target.