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

Build error on NetBSD due to dl #837

Closed
ktnb-netbsd opened this issue Jun 12, 2024 · 7 comments
Closed

Build error on NetBSD due to dl #837

ktnb-netbsd opened this issue Jun 12, 2024 · 7 comments
Assignees

Comments

@ktnb-netbsd
Copy link

Describe the bug
While attempting to update the version of suitesparse in pkgsrc I get the following error:

[ 93%] Linking C shared library libgraphblas.so
ld: cannot find -ldl
--- GraphBLAS/libgraphblas.so.9.1.0 ---
*** [GraphBLAS/libgraphblas.so.9.1.0] Error code 1

This happens sometimes and is very common. So much that we have a way to bypass these types of errors. That being said, it would be nice if this error were fixed upstream. NetBSD doesn't have libdl.

To Reproduce
Try to build wip/suitesparse on NetBSD.

Expected behavior
Since NetBSD doesn't have libdl, it would be expected that cmake would not check for libdl on NetBSD. I'm not sure if this is true on other BSDs.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: NetBSD
  • compiler: gcc 10.5
  • Version: 7.7.0
@mmuetzel
Copy link
Contributor

Thank you for your report.

Linking to libdl is currently conditional on a platform check in GraphBLAS (NOT WIN32).
It should probably depend on a feature test instead (ability to link to libdl).

I'm working on a PR for that.

@mmuetzel
Copy link
Contributor

mmuetzel commented Jun 12, 2024

See PR #838 for a potential fix.

Does that check do the right thing on NetBSD?

@ktnb-netbsd
Copy link
Author

See PR #838 for a potential fix.

Does that check do the right think on NetBSD?

Yes, that looks like it would work. Thank you!

@ktnb-netbsd
Copy link
Author

@mmuetzel I'll pull down the changes and attempt a build to make sure once I've got a minute.

@ktnb-netbsd
Copy link
Author

@mmuetzel I have verified that you're change works! Thank you!

@DrTimothyAldenDavis
Copy link
Owner

Thanks for the heads about NetBSD. I've merged in the changes to the CMake build system, into the dev2 branch.

@ktnb-netbsd
Copy link
Author

Thanks for the heads about NetBSD. I've merged in the changes to the CMake build system, into the dev2 branch.

Great, thank you. Once the update goes live I'll be sure to merge it into pkgsrc-current.

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