Bug 212212 - devel/llvm36: fails to build on FreeBSD 9.3p45 amd64 with a bad llvm-tblgen error message
Summary: devel/llvm36: fails to build on FreeBSD 9.3p45 amd64 with a bad llvm-tblgen e...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on: 212249
Blocks: 210971
  Show dependency treegraph
 
Reported: 2016-08-28 10:58 UTC by Derek Schrock
Modified: 2016-09-02 15:47 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Schrock 2016-08-28 10:58:31 UTC
In both a poudriere jail and normal 9.3r45 host FreeBSD 9.3p45 fails to build devel/llvm36 with the following error:

.....
llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
llvm-tblgen: Unknown command line argument '-I'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/lib/IR'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '-I'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/include'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '-I'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/include'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '-I'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/lib/Target'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/include/llvm/IR/Intrinsics.td'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '-o'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/lib/IR/Release/Intrinsics.gen.tmp'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
llvm-tblgen: Unknown command line argument '-gen-intrinsic'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
gmake[1]: *** [Makefile:24: /usr/ports/devel/llvm36/work/llvm-3.6.2.src/lib/IR/Release/Intrinsics.gen.tmp] Error 1
gmake[1]: Leaving directory '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/lib/IR'
gmake: *** [/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Makefile.rules:883: all] Error 1
*** [do-build] Error code 1

Stop in /usr/ports/devel/llvm36.
*** [stage] Error code 1

Something seems odd with the llvm-tblgen program:

$ /usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help
llvm-tblgen: Unknown command line argument '-help'.  Try: '/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen -help'
$ /usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen
Stack dump:
0.      Program arguments: /usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen 
Segmentation fault: 11

$ gdb /usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-tblgen ./llvm-tblgen.core 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `llvm-tblgen'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libz.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /usr/local/lib/libedit.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libedit.so.0
Reading symbols from /lib/libncurses.so.8...(no debugging symbols found)...done.
Loaded symbols for /lib/libncurses.so.8
Reading symbols from /usr/local/lib/gcc48/libstdc++.so.6...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc48/libstdc++.so.6]
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/gcc48/libgcc_s.so.1...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc48/libgcc_s.so.1]
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000000540be1 in llvm::Twine::toStringRef ()
[New Thread 802007400 (LWP 100194/llvm-tblgen)]
(gdb) bt
#0  0x0000000000540be1 in llvm::Twine::toStringRef ()
#1  0x00000000005372df in llvm::MemoryBuffer::getFileOrSTDIN ()
#2  0x00000000005066c3 in llvm::TableGenMain ()
#3  0x0000000000406c24 in main ()
(gdb) 

Building with and without MAKE_JOBS_UNSAFE=yes has no difference.
I was able to build devel/lang36 on 08/11/16.
Comment 1 Walter Schwarzenfeld freebsd_triage 2016-08-28 19:51:56 UTC
Same problem with llvm37 on  93amd64.
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2016-08-28 20:03:56 UTC
I've seen the error for llvm37 on 9.3amd, too.
Comment 3 Brooks Davis freebsd_committer freebsd_triage 2016-08-29 18:23:25 UTC
There is been no change to devel/llvm36 in four months so this must be a problem in source, a ports infrastructure problem or an incompatible change in one of the dependencies.  I'll try to eliminate some possibilities here.
Comment 4 Brooks Davis freebsd_committer freebsd_triage 2016-08-29 21:51:07 UTC
I've confirmed the bug is due to the binutils update and submitted a PR.
Comment 5 Brooks Davis freebsd_committer freebsd_triage 2016-09-02 15:47:55 UTC
The binutils issue has been resolved.  Thanks for the report.