-
Notifications
You must be signed in to change notification settings - Fork 65
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
Conda package for cpptraj #1125
base: conda
Are you sure you want to change the base?
Conversation
@dacase Do we want to build libcpptraj and include header files in this PR too? or it should be different recipe? |
We want to make this recipe to the right thing for pytraj. There is a |
|
It seems this comes from AmberTools conda since I don't see where libcpptraj.so is built in your recipe. I will make further comment in the code. |
never mind, you do use "-shared" in your build.sh so libcpptraj.so is already done. |
|
||
|
||
rsync -a README.md config.h LICENSE dat bin lib test $PREFIX | ||
|
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.
mkdir -p $PREFIX/include/cpptraj
rsync src/*.h $PREFIX/include/cpptraj/ # Not sure if this is correct syntax :D
#!/bin/bash | ||
|
||
export CPPTRAJHOME=${CONDA_PREFIX} | ||
|
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.
Also add export CPPTRAJ_HEADERDIR=${CONDA_PREFIX}/include/cpptraj
so pytraj
can find the header files. Ideally, we should use CPPTRAJHOME/include
but the header files might overwrite other library's headers, so we make "cpptraj" folder.
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.
@hainm do a conda install dacase::cpptraj
(only for linux-64 right now), and see if libraries and headers seem to be in the proper places with the proper information.
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.
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.
@dacase It seems we need to recursively include the .h files too. pytraj only uses a subset of them but one header refers another/other header file(s), so think we need to include all.
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've made some progress on fixing external readline support in cpptraj. It will be in a separate branch that can then eventually be merged into this PR, which should fix the test errors. |
I'm a bit lost here: did the test errors arise from the conda package, or from trying to compile (and if so, from which branch?) Can you say which tests are throwing errors? I've never quite understood how to test for readline problems. |
This is because there is no system readline so cpptraj tries to build the internal one, but the current build setup can't handle the readline includes being in a |
…j, for use by pytraj
Sorry for the delay on this. I've fixed (I think) cpptraj's use of system readline libraries (#1126), but I'm running into an issue with CMAKE that I'm having trouble solving. I switched the --- a/cmake-cpptraj/SetupThirdParty.cmake
+++ b/cmake-cpptraj/SetupThirdParty.cmake
@@ -449,8 +449,8 @@ if(readline_EXTERNAL)
LIBRARIES readline::readline
INCLUDES ${READLINE_INCLUDE_DIR}/readline)
elseif(readline_INTERNAL)
-
- list(APPEND 3RDPARTY_SUBDIRS cpptraj/src/readline)
+ message(STATUS "Readline will be internal")
+ list(APPEND 3RDPARTY_SUBDIRS cpptraj/src)
endif() But it's still trying to include
It's not clear from the documentation what needs to be modified to ensure the includes are properly handled. @dacase @swails @hainm do any of you have any ideas? |
I may have figured it out: looks like I had to modify a |
…#1126) * Fixes for using system readline * Go back to bundled readline if no system readline present * Add checks for testing whether -ltermcap or -lncurses are needed for linking to system readline * Change readline include path for CMAKE * Add the '.' include back for the bundled readline library itself. * Try to fix the clang compile. I thought this was based on the gcc version but maybe not? * Try to upgrade to python 3.11 for pytraj to get CI working again. * Try conda 24.11.0. * Forgot to revert python. I do not like python.
The readline issues should be resolved with #1126. Next will be the header files installation. |
* Use the install binary * Script to get all headers that should be installed for libcpptraj * Contains all headers that should be installed for libcpptraj * Add target for installing headers * Make header install less verbose. Have libcpptraj install depend on install_headers * Cmake install headers for inside/outside amber * Convert back down to lyx 2.3 for Amber * Update the PDF
Let me work on this, to make sure the conda package is still OK at my end (i.e. before you do more on this PR at your end. See also coming comments on issue #1120 . |
@drroe As I mentioned above, I don't think it's worth your while to do anything with this PR per se. If you find some time (absolutely no rush!), what would be most helpful would be to install the existing conda package, and try out the tests, look at the contents of the include folder, etc.
(Right now, I've only put the FYI: the changes in the PR are pretty minimal. Here are the diffs between the
|
@drroe This is actually my first attempt at a pull request that is based on a non-master
branch. I'm assuming that accepting the request will create a
conda
branch at Amber-MD/cpptraj, and not mess with your master branch.You can also just go to github.com/dacase/cpptraj.git.