Skip to content
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

Add cmake scripts #85

Merged
merged 15 commits into from
Apr 28, 2023
Merged

Add cmake scripts #85

merged 15 commits into from
Apr 28, 2023

Conversation

sshockwave
Copy link
Member

@sshockwave sshockwave commented Mar 30, 2023

  • Fixes wrong CMAKE_ARGS
  • Fixes CMake generator error
  • Exposes libonnx (mitigates Build this as libonnx #77) along with CMake configuration scripts
    • ...except on Windows. There seems to be incompatible compile DLL options between the built libprotobuf on conda-forge and onnx, which causes unresolved external symbols. To correctly link libprotobuf we might need to build it locally and use static linking as per here and here. I'm leaving that decision to future works.

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@sshockwave
Copy link
Member Author

@conda-forge-admin, please rerender

@sshockwave sshockwave marked this pull request as draft March 30, 2023 12:46
@sshockwave sshockwave marked this pull request as ready for review March 31, 2023 11:36
@@ -5,5 +5,6 @@ set -euxo pipefail
export ONNX_ML=1
# build script looks at this, but not set on
export CONDA_PREFIX="$PREFIX"
export CMAKE_ARGS="${CMAKE_ARGS} -DProtobuf_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc -DProtobuf_LIBRARY=$PREFIX/lib/libprotobuf${SHLIB_EXT}"
export CMAKE_ARGS="${CMAKE_ARGS} -DBUILD_SHARED_LIBS=ON -DProtobuf_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc -DProtobuf_LIBRARY=$PREFIX/lib/libprotobuf${SHLIB_EXT}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, does this change also install ONNX cmake files so users can link against this libonnx.so ?
It would be great to have them, we are one of the users :)

Copy link
Member Author

@sshockwave sshockwave Apr 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly! You can check the files being installed around here

@sshockwave
Copy link
Member Author

The patch needs to be improved to have aligned behavior for Win / Unix. Users should expect cmake interface to be available in all cases

@ilya-lavrenov As mentioned above, attempts have been made on Windows but I couldn't link libprotobuf dynamically. Would appreciate suggestions and opinions!

recipe/meta.yaml Outdated Show resolved Hide resolved
@xhochy xhochy merged commit d24c24f into conda-forge:main Apr 28, 2023
@sshockwave sshockwave deleted the patch-1 branch April 29, 2023 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants