New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Linking on Mac OS #1486
Comments
Original Redmine Comment Looks like you used a GCC or set of GCC -march flags to make the .a (this might have come vis the GCC you used to configure verilator), and a different set of flags for your larger program. |
Original Redmine Comment BTW it might help to rely on Verilator to do it all....
then make will also build and link your CPP file. |
Original Redmine Comment Wilson Snyder wrote:
I installed verilator using "brew" which is a macos package manager. Do you think that compiling verilator from scratch oon my machine would help keep the configurations consistent? Verilator made the .mk file that made the .a file so I am not exactly sure how verilator picks the archetecture to build for. There were a few flags in the man page that were highlighted as deprecated, such as "VM_SC_TARGET_ARCH". When I generated the .mk file it originally was said to "linux", and I manually changed it to darwin but that did not help |
Original Redmine Comment You're not using SystemC so VM_SC_* won't matter. Look at what commands make prints when you build the archive then your application. See if the path to GCC is the same and the compiler flags are the same, if not try running the commands yourself using the same gcc/flags. |
Original Redmine Comment Wilson Snyder wrote:
I noticed that my makefile is by default using clang++. |
Original Redmine Comment Joseph Shaker wrote:
Using the verilator command with --exe in the end and then invoking the auto generated makefile led to the same errors |
Original Redmine Comment Here are the files in my directory. All the intermediate object files seem to be built for the correct archetecture ... |
Original Redmine Comment Maybe your "ar" is broken somehow? Try making a single "g++" command, where the file you specify has an #include of every .cpp file that needs to be compiled. Verilator has a tool to help
|
Original Redmine Comment Wilson Snyder wrote:
Hi, Sorry for the delay! Neither my linux box nor my mac have
Nonethess, I tried to compile everything manually
with VINC set correctly. I got tons of ld errors for duplicate symbols, which I guess is better than my ar problem but still not ideal.
|
Original Redmine Comment The _All files include some of the other files you already have listed, look at the contents to determine which to include and/or diagnose the error messages. |
Original Redmine Comment Wilson Snyder wrote:
Ok, so I finally got this command to work!
I also solved the problem with ar I used brew to install binutils, which put the gnu version of a in
|
Original Redmine Comment Glad you solved it. Verilator uses the make-standard AR variable, so "make AR=foo ..." |
Author Name: Joseph Shaker
Original Redmine Issue: 1486 from https://www.veripool.org
Hi all, I;ve used verilator for a while on Linux and have had no problems, however I wanted to start running it on my mac and have been struggling.
I am currently trying to compile and test a module I've written. Verilator compiles to C++ fine, then when I run make -f Vaudio_test.mk, and then make all, g++ complains
Please find attached the Makefile I generated, the ones that verilator generated, and the archive file generated
The text was updated successfully, but these errors were encountered: