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

Added Gromac's Tng lib #2218

Merged
merged 14 commits into from
Dec 30, 2020
Merged

Added Gromac's Tng lib #2218

merged 14 commits into from
Dec 30, 2020

Conversation

GavinNL
Copy link
Contributor

@GavinNL GavinNL commented Jul 15, 2020

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

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

GavinNL added 3 commits July 15, 2020 15:31
- using an example provided by tng as the test_package
- added a tng file
@conan-center-bot
Copy link
Collaborator

Some configurations of 'tng/1.8.2' failed in build 1 (47fef6c6917f7c45da52cd350b3c51dbf5ecf90a):

recipes/tng/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/tng/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/tng/all/CMakeLists.txt Outdated Show resolved Hide resolved
recipes/tng/all/conanfile.py Outdated Show resolved Hide resolved

self._cmake.definitions["TNG_BUILD_OWN_ZLIB"] = False

self._cmake.configure(build_folder=self._build_subfolder)

This comment was marked as outdated.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@madebr madebr Jul 15, 2020

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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...

recipes/tng/all/conanfile.py Show resolved Hide resolved
recipes/tng/all/test_package/CMakeLists.txt Outdated Show resolved Hide resolved
GavinNL and others added 2 commits July 15, 2020 16:32
Co-authored-by: Anonymous Maarten <[email protected]>
Co-authored-by: Anonymous Maarten <[email protected]>
@conan-center-bot
Copy link
Collaborator

Some configurations of 'tng/1.8.2' failed in build 3 (c6b1badd0a2a51eecbed94943a052ad7dde54038):

Co-authored-by: Anonymous Maarten <[email protected]>
@conan-center-bot
Copy link
Collaborator

Some configurations of 'tng/1.8.2' failed in build 4 (dd9ee64c149a5f42e4dac678f96da69d1c717922):

@conan-center-bot
Copy link
Collaborator

Some configurations of 'tng/1.8.2' failed in build 5 (35cd4972b886ee54fb2495a9ae03fab2b0b39aca):

recipes/tng/all/conanfile.py Outdated Show resolved Hide resolved
recipes/tng/all/conanfile.py Show resolved Hide resolved
@conan-center-bot
Copy link
Collaborator

Failure in build 6 (62ccddbf61e83e14c43b2868cabab962be0d24ae):

  • tng/1.8.2
    • Hooks errors detected:
      • [HOOK - conan-center.py] pre_export(): ERROR: [CMAKE VERSION REQUIRED (KB-H048)] The test_package/CMakeLists.txt requires CMake 3.1 at least. Update to 'cmake_minimum_required(VERSION 3.1)'. (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H048)

uilianries
uilianries previously approved these changes Nov 27, 2020
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

LGTM

madebr
madebr previously approved these changes Nov 27, 2020
@conan-center-bot
Copy link
Collaborator

Some configurations of 'tng/1.8.2' failed in build 7 (6f92f238326a88ef2fb035e002c6b435b5d3a296):

  • Windows x86_64, Release, Visual Studio 15, MT. Options: tng:shared-True
    • Hooks errors detected:
      • [HOOK - conan-center.py] post_package(): ERROR: [SHARED ARTIFACTS (KB-H015)] Package with 'shared' option did not contains any shared artifact (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H015)
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs
  • Windows x86_64, Release, Visual Studio 15, MD. Options: tng:shared-True
    • Hooks errors detected:
      • [HOOK - conan-center.py] post_package(): ERROR: [SHARED ARTIFACTS (KB-H015)] Package with 'shared' option did not contains any shared artifact (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H015)
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs
  • Windows x86_64, Release, Visual Studio 16, MD. Options: tng:shared-True
    • Hooks errors detected:
      • [HOOK - conan-center.py] post_package(): ERROR: [SHARED ARTIFACTS (KB-H015)] Package with 'shared' option did not contains any shared artifact (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H015)
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs

@stale
Copy link

stale bot commented Dec 27, 2020

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.

@stale stale bot added the stale label Dec 27, 2020
@GavinNL
Copy link
Contributor Author

GavinNL commented Dec 27, 2020

Would anyone be able to assist in fixing this? I don't have a windows box to properly debug the issue.

@stale stale bot removed the stale label Dec 27, 2020
@madebr
Copy link
Contributor

madebr commented Dec 27, 2020

@GavinNL
https://github.com/gromacs/tng/blob/14dd68ff46df1ef1cf2d9bcc1f4f5bddb974ce1c/CMakeLists.txt#L47-L50
This needs to become:

install(TARGETS tng_io
        EXPORT tng_io
        LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
        ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
        RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")

@GavinNL GavinNL dismissed stale reviews from madebr and uilianries via 6389563 December 27, 2020 20:54
@conan-center-bot
Copy link
Collaborator

All green in build 8 (6389563b326e573aa669360438b61bd9d4064eb1)! 😊

madebr
madebr previously approved these changes Dec 27, 2020
@@ -0,0 +1,10 @@
sources:
"1.8.2":
url: "https://github.com/gromacs/tng/archive/v1.8.2.tar.gz"
Copy link
Contributor

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?

Copy link
Contributor Author

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@conan-center-bot
Copy link
Collaborator

All green in build 9 (ac98fe80c996ec3a52e12408c7ecf62799606860)! 😊


def package_info(self):
self.cpp_info.libs = ["tng_io"]
if self.settings.os == "Linux":
Copy link
Contributor

@madebr madebr Dec 28, 2020

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.

Suggested change
if self.settings.os == "Linux":
if self.settings.os in ("Linux", "FreeBSD"):

Copy link
Contributor Author

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)

Copy link
Contributor

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..

Copy link
Contributor

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 ;))

Copy link
Contributor

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.

madebr
madebr previously approved these changes Dec 28, 2020
description = "External GROMACS library for loading tng files."
license = "BSD-3-Clause"
topics = ("conan", "tng", "gromacs")
homepage = "https://github.com/gromacs/tng/"
Copy link
Contributor

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 =)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

@conan-center-bot
Copy link
Collaborator

All green in build 11 (7c8918a0785eb87ea495e04e140aefc752ff2d50)! 😊

@GavinNL
Copy link
Contributor Author

GavinNL commented Dec 28, 2020

@uilianries Could we get your approval again so this can be merged?

@prince-chrismc
Copy link
Contributor

Seems like the bot is skipping over this PR, can someone take a peak at why that might be?

@conan-center-bot conan-center-bot merged commit d8c53b3 into conan-io:master Dec 30, 2020
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.

7 participants