Skip to content

Conversation

@falsifian
Copy link
Contributor

@falsifian falsifian commented Aug 14, 2020

This gets it to build on OpenBSD. Before this change, the GL library isn't
found:

Configuring library for OpenGLRaw-3.3.4.0..
cabal: Missing dependency on a foreign library:
* Missing (or bad) C library: GL

@falsifian
Copy link
Contributor Author

The GL library is under /usr/X11R6 on OpenBSD. My workaround for building something that depends on OpenGLRaw for now is: C_INCLUDE_PATH=/usr/X11R6/include LIBRARY_PATH=/usr/X11R6/lib cabal v2-install ..

@svenpanne
Copy link
Member

I think this will break compilation under Windows and all other platforms without pkg-config (not very likely for *nix variants, but nevertheless). The logic in that part of the .cabal file is very delicate and took a long time to get (mostly) right, so I'm very conservative about changes there. Could you guard your change with an if os(openbsd)?

This gets it to build on OpenBSD. Before this change, the GL library isn't
found:

Configuring library for OpenGLRaw-3.3.4.0..
cabal: Missing dependency on a foreign library:
* Missing (or bad) C library: GL
@falsifian
Copy link
Contributor Author

Done, and added a comment. Let me know if you'd like me to move it somewhere else or adjust or edit the comment.

I wonder why the build works on other systems. Maybe Cabal has /usr/include and /usr/lib hard-coded.

@svenpanne svenpanne merged commit 6ebcecf into haskell-opengl:master Aug 25, 2020
@falsifian falsifian deleted the pkgconfig branch August 25, 2020 14:22
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.

2 participants