-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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 gklib #12547
add gklib #12547
Conversation
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 ( |
@conda-forge/staged-recipes ready for review |
I don't know how to fix the windows build so I have disabled it for now. Besides that LGTM. @conda-forge/help-c-cpp can you review please? |
@hadim I think the build failures on windows are due to how shared libraries are generated on windows (some background here). We can probably patch the CMake files to make it work, but is there a reason you are building shared rather than static libraries (it should just work with static libraries)? |
Trying to build with static now |
Osx and linux are fine (only the tests fail due to static lib). I don't know what's wrong with win. |
Hmm taking a look now. |
@hadim the test failures seem to be just caused by syntax issues in the
should fix them. |
LGTM here. |
Great - thanks for fixing those @hadim! Feel free to add me as a recipe maintainer also. |
@conda-forge/staged-recipes, ready for review |
@conda-forge/help-c-cpp please review |
recipes/gklib/build.sh
Outdated
-DCMAKE_PREFIX_PATH=$PREFIX \ | ||
-DDEBUG=OFF \ | ||
-DOPENMP=set \ | ||
-DBUILD_SHARED_LIBS=OFF \ |
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.
Conda-forge has a strong preference for shared libraries to make it easier to manage updates and migrations for new ABIs (it also makes license compliance simplier).
Is it practical here? Or is there a reason to why static linking is really needed?
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.
I think it would be practical on linux + OSX, but currently not on WIN as the __dllexport/__dllimport
statements have not been properly set-up.
Should we package shared libraries for linux + OSX and static for WIN, or is it preferable to be consistent and keep everything static until everything can be built as shared?
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.
Keep as much as shared as possible. You should get a working shared library on Windows by setting cmake -D CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=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.
@xhochy unfortunately the built binaries rely on a couple of global constants so CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
won't directly work here without patching.
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.
Oh, amazing! CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
hasn't failed for me before.
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.
Shared Unix builds are enabled in 1342d88.
recipes/gklib/meta.yaml
Outdated
- ${PREFIX}/bin/cmpnbrs --help # [unix] | ||
- ${PREFIX}/bin/csrcnv --help # [unix] | ||
- ${PREFIX}/bin/fis --help # [unix] | ||
- ${PREFIX}/bin/gkgraph --help # [unix] | ||
- ${PREFIX}/bin/gkrw --help # [unix] | ||
- ${PREFIX}/bin/m2mnbrs --help # [unix] |
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.
They should be on PATH:
- ${PREFIX}/bin/cmpnbrs --help # [unix] | |
- ${PREFIX}/bin/csrcnv --help # [unix] | |
- ${PREFIX}/bin/fis --help # [unix] | |
- ${PREFIX}/bin/gkgraph --help # [unix] | |
- ${PREFIX}/bin/gkrw --help # [unix] | |
- ${PREFIX}/bin/m2mnbrs --help # [unix] | |
- cmpnbrs --help # [unix] | |
- csrcnv --help # [unix] | |
- fis --help # [unix] | |
- gkgraph --help # [unix] | |
- gkrw --help # [unix] | |
- m2mnbrs --help # [unix] |
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.
Oops thanks! Fixed by 38bf7b6
recipes/gklib/meta.yaml
Outdated
@@ -11,7 +11,8 @@ source: | |||
|
|||
build: | |||
number: 0 | |||
# skip: true # [win] | |||
run_exports: # [not win] |
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.
You would also need to apply the selector to the pin_subpackage
line as well though I'd suggest just removing them instead:
run_exports: # [not win] | |
run_exports: |
(it will cause there to be a pointless dependency installed but it doesn't really matter and it has the benifit of tracking the ABI still)
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 ok that makes sense - fixed by 38bf7b6.
recipes/gklib/meta.yaml
Outdated
- if not exist "%LIBRARY_INC%\\ms_stat.h" exit 1 # [win] | ||
- if not exist "%LIBRARY_INC%\\ms_stdint.h" exit 1 # [win] | ||
- if not exist "%LIBRARY_LIB%\\GKlib.lib" exit 1 # [win] | ||
- if not exist "%LIBRARY_BIN%\\cmpnbrs.exe" exit 1 # [win] |
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.
Can these be executed with --help as well?
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.
Apparently they can! Fixed by 38bf7b6.
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details)