Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1231

Undefined symbol operator delete(void*, std::align_val_t) on MacOS

Added by Jeff Bush almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Configure/Make/Compiling
% Done:

0%


Description

Using command line tools 9.0 on macOS Sierra 10.12, when I try to compile the latest release build 912, I get a link error:

Undefined symbols for architecture x86_64:
  "operator delete(void*, std::align_val_t)", referenced from:
      V3Global::makeNetlist() in Verilator.o
      V3Global::readFiles() in Verilator.o
      _main in Verilator.o
      AstNetlist::AstNetlist() in Verilator.o
      AstNetlist::~AstNetlist() in Verilator.o
      std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in Verilator.o
      std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringbuf() in Verilator.o
      ...

This compiled correctly with version 906. I'll try to isolate further.

History

#1 Updated by Wilson Snyder almost 2 years ago

  • Status changed from New to AskedReporter

I'd think if it gets through the compiler it should link, but maybe there's some strange linker flag needed. This does suggests it's a linker flag issue, but I doubt it's simply the solution they suggest. Can you experiment please?

https://stackoverflow.com/questions/16865260/quickblox-linker-error-operator-deletevoid-referenced-from

#2 Updated by Jeff Bush almost 2 years ago

Thanks for the pointer. Adding -lc++ didn't fix the problem, but removing the -faligned-new compile flag did. My theory is that, at some point, Apple updated the compiler to a version that supports the aligned versions of new/delete, but didn't implement it in libstdc++ yet (this may also be because I'm still on Sierra). It appears the -faligned-new flag was added to verilator in this change: d4bae48ca25eef14647b1d9146651d403ce67477, which is where I think it broke for me. One fix might be for me to upgrade my operating system.

#3 Updated by Wilson Snyder almost 2 years ago

  • Category set to Configure/Make/Compiling
  • Status changed from AskedReporter to Resolved
  • Assignee set to Wilson Snyder

Fixed in git to suppress -faligned-new if a new/delete doesn't link properly.

#4 Updated by Wilson Snyder almost 2 years ago

  • Status changed from Resolved to Closed

In 3.914.

Also available in: Atom