-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Undefined references linker error on nvc++ #220
Comments
Huh, this is a weird one. Are you using the library in "header-only" mode (the default if the header is standalone), or precompiled? |
I'm using in Header Only mode. |
Would you mind testing the "precompiled" mode for me by disabling TOML_HEADER_ONLY? See the "Speeding up compilation" section of the main page for details. |
The error continues:
|
I have created a docker image for reproducing my exact issue on my environment: docker run -it tomcat0x42/toml-ex bash And then, inside the container: cd /home/builder/toml_ex/ && ./build (sorry for the image size, all things NVIDIA™ are always bloated.) |
Great! Very helpful, thanks. I'll try to make use of it soon. Nvidia's toolchain has caused me nothing but misery, honestly. |
Yes, last week I had the most fierce battle of my entire career with a compiler ( |
Haha, of course. What's some compiler bullshit without a missing (and woefully under-documented) flag? |
Hello @marzer , did you got a chance of looking at this issue? |
@Tomcat-42 I've pulled your image and reproduced it for myself, but that's about all I've had time for. Have been travelling for work the last couple of weeks. Been hoping to make time for it some evening this week though :) |
Oh, thought I was reproducing it. Just playing with it now and what I was actually seeing was that the way you've used Doesn't solve the issue, after addressing it I am seeing the weird stuff you are above 😅 Just thought you may want to double-check that against any "concrete" implementations you have on the go. |
Curiously, every function exhibiting this issue is pure virtual in the base. Looks like some vtable shenanigans. |
@Tomcat-42 Right, after much hoop-jumping trying to get a working version of nvhpc installed on my linux laptop, I had some time to experiment with this a bit more comprehensively. Can you try the workaround I've implemented in 1f7884e? |
The linker errors are gone, thanks @marzer. But sadly I'm running in another issue:
Every use of the formatter function causes a segfault:
Did you have any clue why this is happening? |
The full coredump info (If might help):
|
I have absolutely no idea. None of this makes any sense to me 😅 Thanks for the follow-up. I'll try to give it a look today. |
Ok, coming back to this. I spent quite a bit of time trying to get nvc++ to behave, and nothing I did got it any further. I have no idea why this is happening. Feels like there's a compiler bug somewhere, because clang, msvc and gcc all consume the library OK. Not really sure how to advance this, short of escalating it with nvidia folks? |
Environment
toml++ version and/or commit hash:
v3.4.0
Compiler:
nvc++
23.11:C++ standard mode:
17, 20 and 23
Target arch:
x64
Library configuration overrides:
None.
Relevant compilation flags:
None.
Describe the bug
Every time I try to use the
toml::parse_file
function I get those undefined references errors:Steps to reproduce (or a small repro code sample)
./example.toml
./main.cpp:
./toml.hpp:
toml v3.4.0 header
Additional information
Perhaps is something related to #198?
The text was updated successfully, but these errors were encountered: