-
Notifications
You must be signed in to change notification settings - Fork 31
[cmake] Modify cmake config file to set correct suffix and prefix for library #203
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@vgvassilev can you activate the CI? |
No, it does not let me... It is probably either because that PR is a draft of we have a mistake in the CI config. |
@vgvassilev It was a CI config issue. Once the CI runs, i'll check it for any errors, and afterwards i'll cc you in when it is ready to test possible solutions to xeus-cpp wasm build. |
@vgvassilev @alexander-penev This PR is now ready for testing solutions to the issue where xeus-cpp was using the wrong library extension for CppInterOp, during the wasm build of xeus-cpp |
@vgvassilev Could this be the cause of the issue is with it producing a .a when a .so is expected? If you read the configure stage of
So despite choosing a shared library, we will end up with a static one if I am reading this correctly. |
Correct. That is because wasm does not support shared libraries and turns them off. We should just do that preemptively in the build and adjust everything else in the config file. |
@vgvassilev Is the solution in the config file I have done acceptable to you? It appears to work. If yes, i'll put it in as a patch in the Emscripten forge recipe. |
1ec2c18
to
7a38391
Compare
Now the config lgtm. Do we want to merge this pr? Or should we test elsewhere first? |
@vgvassilev This is the patch I have settled on after your suggestions if your happy with it. I decided to fix the library prefix at the same time as the suffix.
|
I would suggest this PR gets merged after compiler-research/xeus-cpp#14 is merged , so I can change CppInterOp/.github/workflows/ci.yml Line 1276 in 7a38391
I will put in the patch to both the conda-forge and emscripten forge shortly for testing. |
@vgvassilev Just as I was preparing the patch for CppInterOp the build for xeus-clang-repl build failed. It looks like it needs a little refinement. I will work out what the issue is tommorrow. |
@@ -10,19 +10,20 @@ get_filename_component(CPPINTEROP_INSTALL_PREFIX "${CPPINTEROP_INSTALL_PREFIX}" | |||
include(CMakeSystemSpecificInformation) | |||
|
|||
### build/install workaround | |||
if (@BUILD_SHARED_LIBS@ STREQUAL "ON") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vgvassilev The build of xeus-clang-repl fails if I use the if (BUILD_SHARED_LIBS) you suggested, but passes if i use if (@BUILD_SHARED_LIBS@ STREQUAL "ON") . Do you have any objections to me using this line instead? I could add a FIXME next to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. I'd not hardcode BUILD_SHARED_LIBS
to ON
. It can be TRUE
, 1
, etc. Doesn't this work:
if (@BUILD_SHARED_LIBS@ STREQUAL "ON") | |
if (@BUILD_SHARED_LIBS@) |
In addition we need to fix this line add_library(clangCppInterOp SHARED IMPORTED)
to STATIC
conditionally.
@vgvassilev would you like to me strip out all the ci stuff in this PR, so the patch can be merged now? It will be easy to add the ci stuff back in once compiler-research/xeus-cpp#14 has been merged. |
It would be better because we do not know the eta of that PR. |
Let's see if the patch works first through the new package, though... |
Co-Authored-By: Vassil Vassilev <v.g.vassilev@gmail.com>
@vgvassilev I have modified the PR, so it is now just the patch, after the patch was seen to work. The PR can now be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you, @mcbarton!
The purpose of this PR is to find the modifications to CppInterOp needed so that the wasm build of xeus-cpp in PR compiler-research/xeus-cpp#14 can pass.