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

[swig] fix bugs in building Java Wrapper in Windows env #5972

Closed
wants to merge 2 commits into from

Conversation

xuchuanyin
Copy link
Contributor

'CP' is not a valid command in native Windows, which will cause failure in building Java Wrapper.
Use 'COPY' instead and correct the format of file path correspondingly

'CP' is not a valid command in native Windows, which will cause failure in building Java Wrapper. Use 'COPY' instead and correct the format of file path correspondingly
@jameslamb jameslamb changed the title [Windows][Java Wrapper]fix bugs in building Java Wrapper in Windows env [swig] fix bugs in building Java Wrapper in Windows env Jul 12, 2023
@jameslamb jameslamb added the fix label Jul 12, 2023
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks for your interest in LightGBM and sorry it took so long to get you a review on this!

Thanks for bringing this up. Instead of switching to copy, I think we should make this even more portable by using CMake's file(COPY ...) syntax, as described at https://cmake.org/cmake/help/v3.10/command/file.html.

That way, we could rely on CMake to do this in a way that's portable to different shells.

Could you please try that? And in the other places where this project uses COMMAND cp as well?

COMMAND cp "${PROJECT_SOURCE_DIR}/Release/*.dll" com/microsoft/ml/lightgbm/windows/x86_64

COMMAND cp "${PROJECT_SOURCE_DIR}/*.dylib" com/microsoft/ml/lightgbm/osx/x86_64

LightGBM/CMakeLists.txt

Lines 526 to 529 in fcf76bc

COMMAND
cp
"${PROJECT_SOURCE_DIR}/lib_lightgbm_swig.jnilib"
com/microsoft/ml/lightgbm/osx/x86_64/lib_lightgbm_swig.dylib

COMMAND cp "${PROJECT_SOURCE_DIR}/*.so" com/microsoft/ml/lightgbm/linux/x86_64

@jameslamb
Copy link
Collaborator

Closing this due to lack of response.

I've put up #6259 which I think should address the issue you ran into. Thanks very much for bringing that to our attention! We'd be happy to see you contribute to LightGBM in the future if you have time.

@jameslamb jameslamb closed this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants