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

problem to link librt for clock_gettime #243

Closed
geoHeil opened this issue May 30, 2019 · 7 comments
Closed

problem to link librt for clock_gettime #243

geoHeil opened this issue May 30, 2019 · 7 comments

Comments

@geoHeil
Copy link

geoHeil commented May 30, 2019

I am trying to create a conda package for h3 python bindings. My merge request is open here conda-forge/staged-recipes#8467

And I can't properly build it as there is an issue with: linking to librt for clock_gettime.

Can you set the missing flags upstream?

@isuruf
Copy link

isuruf commented May 30, 2019

More details: clock_gettime is in glibc>=2.17 and in librt for glibc<2.17.

@isaacbrodsky
Copy link
Collaborator

I think clock_gettime is only needed for the testing and benchmarking code, you might be able to build just the h3 target (the library code). This might be something like make -j${CPU_COUNT} VERBOSE=1 h3 in your pull request.

@isuruf
Copy link

isuruf commented May 30, 2019

you might be able to build just the h3 target (the library code)

It's only the benchmarks that need it, but to run make install all the targets have to be built. Is there a cmake option to avoid building benchmarks, so that make install can be done without it and we can also run tests?

@geoHeil
Copy link
Author

geoHeil commented Jun 3, 2019

@isuruf https://github.com/uber/h3/blob/master/CMakeLists.txt could be patched in the conda build to not include the benchmarks. According to https://stackoverflow.com/questions/17164731/installing-only-one-target-and-its-dependencies-out-of-a-complex-project-with there are a couple of options. Which one would you suggest to move forward?

@isaacbrodsky
Copy link
Collaborator

you might be able to build just the h3 target (the library code)

It's only the benchmarks that need it, but to run make install all the targets have to be built. Is there a cmake option to avoid building benchmarks, so that make install can be done without it and we can also run tests?

Yes, the benchmarks are considered part of the testing suite, so if you configure CMake with -D BUILD_TESTING=FALSE they should be excluded.

@geoHeil
Copy link
Author

geoHeil commented Jun 7, 2019

We currently opted to explicitly state the targets which need to be built. Having no testing also doesn't sound favorably https://github.com/conda-forge/staged-recipes/pull/8467/files#diff-836a1e5a12f9f2663a7069a305b3eb46R13

@geoHeil
Copy link
Author

geoHeil commented Jun 9, 2019

builds are green now conda-forge/staged-recipes#8467

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

No branches or pull requests

3 participants