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

Bug during installation with OS Mojave

Added by B G 13 days ago

Good morning,

I'm trying to install Verilator (to use with SystemC) with mac OS Mojave. No problem during Configure and make. But when I try make --test I get the following error : !!
g++    sim_main.o verilated.o Vtop__ALL.a    -o Vtop -lm -lstdc++ 
ld: warning: ignoring file Vtop__ALL.a, file was built for archive which is not the architecture being linked (x86_64): Vtop__ALL.a
Undefined symbols for architecture x86_64:
  "Vtop::eval()", referenced from:
      _main in sim_main.o
  "Vtop::final()", referenced from:
      _main in sim_main.o
  "Vtop::Vtop(char const*)", referenced from:
      _main in sim_main.o
  "Vtop::~Vtop()", referenced from:
      _main in sim_main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I made the make install. No specific error at the end. When I try to use Verilator to interface with SystemC I run the following command : verilator --pins-sc-uint --sc pgcd.sv main_verilator.cpp pgcd.cpp --exe -o ../sim.exe, no problem. When I try to run the makefile produced (in objdir) with make -f Vpgcd.mk I get the following error :
g++     -L/usr/local/systemc-2.3.2/lib/ main_verilator.o pgcd.o verilated.o Vpgcd__ALL.a    -o ../sim.exe -lm -lstdc++ -lsystemc
ld: warning: ignoring file Vpgcd__ALL.a, file was built for archive which is not the architecture being linked (x86_64): Vpgcd__ALL.a
Undefined symbols for architecture x86_64:
  "Vpgcd::Vpgcd(sc_core::sc_module_name)", referenced from:
      _sc_main in main_verilator.o
  "Vpgcd::~Vpgcd()", referenced from:
      _sc_main in main_verilator.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks by advance for your help


Replies (4)

RE: Bug during installation with OS Mojave - Added by Wilson Snyder 13 days ago

ld: warning: ignoring file Vtop__ALL.a, file was built for archive which is not the architecture being linked (x86_64)

Half of your compiles are for x86_64 and the other half (presumably) for x86(_32), something is broken in how you compiled or systemC was compiled that is outside anything Verilator controls. You must compile consistently.

RE: Bug during installation with OS Mojave - Added by B G 13 days ago

Thanks for your answer. But how can I do this specific compilation? Regards.

RE: Bug during installation with OS Mojave - Added by Wilson Snyder 13 days ago

Is there someone at your school/job that can assist?

You can do "file {whatever}.o" to see which files are x86_64 or not and backtrack.

You'll need to dig into how each bad object and library was compiled, look for e.g. -m32 flags (which say compile 32 bit) that shouldn't be there.

RE: Bug during installation with OS Mojave - Added by B G 13 days ago

Here you will find the result for the command : Mach-O 64-bit object x86_64

I'm looking for m32 flags.

    (1-4/4)