-
Notifications
You must be signed in to change notification settings - Fork 42
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 to C++ standard library symbols #94
Comments
Apt should be fine in most cases. I'm not sure what's going on here. Let me take a look. |
Hmmm...I wasn't able to reproduce this after running CFLite locally on your repo. See the logs. Did you fix the issue? |
This was the command I used to run CFLite locally btw: You need to copy cflite-example into /tmp/workspace/cflite-example for this to work. |
No, I did not fix it. And I tried your command to run locally, it gives me the same linker errors I posted initially. Are you on cflite-example's linker-errors branch and not on main? |
Oh sorry I was on main. Lemme try again. |
You mean link-boost branch right? |
Yes. |
Any news on this? Were you able to reproduce the issue? |
I'll probably have to take a look at this next week. But I can try now. |
I was able to reproduce this. This comment is especially revealing I think boost needs to be built from source to use with libc++, the apt versions must use libstdc++ I would ask this question in oss-fuzz btw, the build setup is the same and are many helpful oss-fuzz users some of whom might be more familiar with this problem than me. |
to be clear though, I think boost is an exception. I feel like many libraries can be installed via apt. I would guess most are in oss-fuzz |
Ok thanks I'll try that. |
Unsurprisingly this worked, thanks. So basically if you have problems getting a dependency to work, check how users of OSS-Fuzz do it. Could be useful mentioning in the ClusterFuzzLite docs. |
On dependent packages, the docs state:
What is the expected way of pulling the static libraries of dependent packages? Can I use
apt
packages or do I have to build them on my own using the providedCXX
andCXXFLAGS
? For example, I have a C++ project that uses Boost and Botan. When trying to link the packages fromapt
with my fuzz target, I get undefined references to C++ standard libary functions.And more ...
I was able to create a minimal reproducable project that links Boost statically installed via
apt
.The text was updated successfully, but these errors were encountered: