Bug 223333 - science/simlib: crashes nm(1) during build
Summary: science/simlib: crashes nm(1) during build
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2017-10-31 03:22 UTC by Jan Beich
Modified: 2018-08-29 20:21 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-10-31 03:22:22 UTC
After base r320343 the port no longer builds with /usr/bin/nm. Affects FreeBSD 11.1 and 12.0.

$ make
[...]
Assertion failed: (ddata->output.size > 0), function cpp_demangle_read_sname, file /usr/src/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c, line 2139.

https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20171030/565779.html
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-10-31 03:42:10 UTC
binutils 2.28 and elftoolchain r3477M can demangle the file just fine.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2017-11-05 19:52:20 UTC
(In reply to Jan Beich from comment #1)
Do you have the mangled symbol handy?
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-11-05 20:08:11 UTC
$ echo _ZZN7simlib318SIMLIB_create_nameEPKczE1s | /usr/bin/c++filt
Comment 4 Kurt 2018-01-11 13:43:31 UTC
I ran into this bug using a different port (lcov)... so it's not just "affects only me".
Comment 5 Ed Maste freebsd_committer freebsd_triage 2018-01-24 21:51:58 UTC
I suspect it is this upstream ticket https://sourceforge.net/p/elftoolchain/tickets/554/

(Note that I submitted this ticket but do not recall where I came up with the test case `_ZZ1`. I suspect it was a reduced version of the symbol reported in this PR.)
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-07-07 21:10:11 UTC
A commit references this bug:

Author: tobik
Date: Sat Jul  7 21:09:10 UTC 2018
New revision: 474139
URL: https://svnweb.freebsd.org/changeset/ports/474139

Log:
  science/simlib: Fix build

  - Doesn't build with Clang 6

  errors.cc:14:42: error: invalid suffix on literal; C++11 requires a space between
        literal and identifier [-Wreserved-user-defined-literal]
  /* 0 */ "SIMLIB/C++ Simulation Library, "SIMLIB_COPYRIGHT"\0"
                                           ^

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p473790_s335878/logs/simlib-3.02_1.log

  - nm crashes during the build on FreeBSD >= 11.1.  Use binutils
    from ports as a workaround. [1]

  Assertion failed: (ddata->output.size > 0), function cpp_demangle_read_sname, file /usr/src/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c, line 2137.

  http://beefy9.nyi.freebsd.org/data/111amd64-default/473790/logs/simlib-3.02_1.log

  PR:		223333 [1]

Changes:
  head/science/simlib/Makefile
  head/science/simlib/files/patch-src_errors.txt