-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Added Gromac's Tng lib #2218
Added Gromac's Tng lib #2218
Conversation
- using an example provided by tng as the test_package - added a tng file
Some configurations of 'tng/1.8.2' failed in build 1 (
|
|
||
self._cmake.definitions["TNG_BUILD_OWN_ZLIB"] = False | ||
|
||
self._cmake.configure(build_folder=self._build_subfolder) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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 this problem is caused by these lines in BuildTNG.cmake
:
CMAKE_SOURCE_DIR
and CMAKE_BUILD_DIR
should be PROJECT_SOURCE_DIR
and PROJECT_BINARY_DIR
.
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 figured it would be an issue with the project's cmake file. Not sure what I should do about it, should we apply a patch? My preference is to not edit the original if I can avoid it.
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.
The change would be equivalent to your move of sources.
The advantage of patching is that, when upstream fixes this problem, the patch can simply be dropped without modifying the recipe.
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 just tested it locally.
This patch avoids any special actions in the _configure_cmake
function:
--- BuildTNG.cmake
+++ BuildTNG.cmake
@@ -1,9 +1,9 @@
set(TNG_ROOT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
-file(RELATIVE_PATH TNG_ROOT_BINARY_DIR ${CMAKE_SOURCE_DIR} ${TNG_ROOT_SOURCE_DIR})
+file(RELATIVE_PATH TNG_ROOT_BINARY_DIR ${PROJECT_SOURCE_DIR} ${TNG_ROOT_SOURCE_DIR})
if ("${TNG_ROOT_BINARY_DIR}" MATCHES "^\.\.")
set(TNG_ROOT_BINARY_DIR tng)
endif()
-set(TNG_ROOT_BINARY_DIR ${CMAKE_BINARY_DIR}/${TNG_ROOT_BINARY_DIR})
+set(TNG_ROOT_BINARY_DIR ${PROJECT_BINARY_DIR}/${TNG_ROOT_BINARY_DIR})
set(TNG_MAJOR_VERSION "1")
set(TNG_MINOR_VERSION "8")
I think upstream would be happy to apply this.
Because right now, it could not be included as a subproject.
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.
Okay, I added it as a patch.
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 opened an issue with the patch at gromacs/tng#1
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'm not sure if anyone is even bothering to look at the issues in the original project. I don't think that library has changed in many years
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.
It's up to them to accept or not...
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
Some configurations of 'tng/1.8.2' failed in build 3 (
|
Co-authored-by: Anonymous Maarten <[email protected]>
Some configurations of 'tng/1.8.2' failed in build 4 (
|
Some configurations of 'tng/1.8.2' failed in build 5 (
|
Co-authored-by: Uilian Ries <[email protected]>
Failure in build 6 (
|
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
Some configurations of 'tng/1.8.2' failed in build 7 (
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Would anyone be able to assist in fixing this? I don't have a windows box to properly debug the issue. |
@GavinNL install(TARGETS tng_io
EXPORT tng_io
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") |
All green in build 8 (
|
recipes/tng/all/conandata.yml
Outdated
@@ -0,0 +1,10 @@ | |||
sources: | |||
"1.8.2": | |||
url: "https://github.com/gromacs/tng/archive/v1.8.2.tar.gz" |
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.
It seems they moved to gitlab sometime ago.... https://gitlab.com/gromacs/tng/-/tags
is there a reason you are referencing the github page?
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.
Hmm. I did not know this. I'll change this.
#include <stdlib.h> | ||
#include <stdio.h> | ||
|
||
int main(int argc, char **argv) |
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.
we like to have much move minimal test_packages... I idea it to make sure the conan packing went well no so much the library is functional.
could you please try to reduce this to a few lines? example instantiate a few objects?
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 used an example piece of code from the library to create the test_package.c, figured it would be a good way to test it.
I will reduce it.
All green in build 9 (
|
recipes/tng/all/conanfile.py
Outdated
|
||
def package_info(self): | ||
self.cpp_info.libs = ["tng_io"] | ||
if self.settings.os == "Linux": |
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 didn't test, but some zealots (aka @ericLemanissier 🤣) have recently begun with adding FreeBSD support.
if self.settings.os == "Linux": | |
if self.settings.os in ("Linux", "FreeBSD"): |
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.
lol...is that "LInux" a typo? (capital I)
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.
Yes, typo! Fixing it now..
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.
If you want to get a free FreeBSD CI test, just put "FreeBSD" in your PR's description !
(It sounds like a joke, but it's actually not ;))
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.
@prince-chrismc @ericLemanissier
We really need a (pinned) issue with a list of all active bots + their features.
recipes/tng/all/conanfile.py
Outdated
description = "External GROMACS library for loading tng files." | ||
license = "BSD-3-Clause" | ||
topics = ("conan", "tng", "gromacs") | ||
homepage = "https://github.com/gromacs/tng/" |
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'll need to point this ti gitlab 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.
Fixed :)
All green in build 11 (
|
@uilianries Could we get your approval again so this can be merged? |
Seems like the bot is skipping over this PR, can someone take a peak at why that might be? |
Specify library name and version: tng/1.8.2
Gromac's external library for loading binary molecular dynamics trajectory files.
Tested on Linux Mint 20 with gcc9
conan-center hook activated.