Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

[Error] If package has system libraries as deps Segfault will appear #82

Open
WiktorJanecki opened this issue May 2, 2021 · 2 comments

Comments

@WiktorJanecki
Copy link

WiktorJanecki commented May 2, 2021

I have this package tree:

LinkSystemLibrary("c").........] --- a--b--final
LinkSystemLibrary("glfw")....]

As you can see first library depends on system libs, and the second one on the first one.
Final package will be created by users which want to use my "b" package.
But the problem is final package cannot be run unless user manually link system libraries in final/build.zig
What's worse, there is no error when building final package. Only SegFault when it is runned.
Will there be any feature that's automatically adds system libraries to deps.zig or something similar?

@mattnite
Copy link
Owner

mattnite commented May 6, 2021

It was intended that this area was left "unfinished", the reason here was to experiment with builder packages that let you choose between using system libraries or building C libraries locally and statically compiling, Eg. https://github.com/mattnite/ZLibBuilder

For your case, it is required for a root project to know what system libraries it needs to link to.

@WiktorJanecki
Copy link
Author

Got it. but I think there definitely should be some kind of warning that package has syslibs as dependencies instead of segfault. Maybe gyro build should check and warn about that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants