-
Notifications
You must be signed in to change notification settings - Fork 52
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
Link error with gcc 11.2.1 #175
Comments
@cjihrig Do we know if the shared library version of uvwasi works? I'm getting linking errors when trying to link uvwasi with wasm-micro-runtime (instead of compiling the sources together). |
I currently use the shared version of the uvwasi library when linking with nodejs, and I don't know that anything has changed linking-wise. I'd have to see the error myself. As for the link error above, the shared library should be compiled with -fPIC. If this was a mistake on my part by not adding that, I can look into a PR soon. |
I can reproduce the issue with:
...will take a look |
I also encounter this problem. My compilation environment information is as follows:
|
Is there any progress for this issue? |
@cjihrig I'm uncertain. I think wamr is doing static linking and I don't know how to build their executable with dynamic linking. My PR definitely enables linking somehow from produced artifacts. |
You can work around it by adding
|
I'm seeing the following link error when building locally using the following commands:
This can be avoided around by setting
CMAKE_POSITION_INDEPENDENT_CODE
toTrue
:$ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=True ..
This could also be set in CMakeLists.txt:
GCC version:
I'm not sure if this is an issue with my local environment, as the CI servers are obviously working as expected. But I wanted to create this issue just in case anyone else runs into it.
The text was updated successfully, but these errors were encountered: