-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Quoting https://hackage.haskell.org/package/OpenGLRaw:
All API entries are loaded dynamically, so no special C header files are needed for building this package. If an API entry is not found at runtime, a userError is thrown.
I'm not sure exactly how I should interpret this (that's my bad of course) but one possible reading is: I don't have to bother about system dependencies at build time, only at runtime. Yet, I get a system dependency error during a build:
❯ cabal install --lib OpenGLRaw --package-env .
Resolving dependencies...
Build profile: -w ghc-9.0.1 -O1
In order, the following will be built (use -v for more details):
- OpenGLRaw-3.3.4.1 (lib) (requires build)
Starting OpenGLRaw-3.3.4.1 (lib)
Failed to build OpenGLRaw-3.3.4.1. The failure occurred during the configure
step.
Build log (
/home/artem/.cabal/logs/ghc-9.0.1/OpenGLRaw-3.3.4.1-ffdb83de891eb893fbc39f7349e630e4cd0c647b937ac6cb07f772d4a27f32b3.log
):
Configuring library for OpenGLRaw-3.3.4.1..
cabal-3.6.2.0: Missing dependency on a foreign library:
* Missing (or bad) C library: GL
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
cabal: Failed to build OpenGLRaw-3.3.4.1. See the build log above for details.Is it expected? If yes, would it make sense to make the text a bit clearer in terms of build-time expectations from the environment?
For context: I'm testing a proposed change to the base library and trying to build as many Stackage packages as possible to see if anything fails. So, I don't need to run anything. And I wanted to avoid installing many system dependencies on the testing machine. It's hard to simply skip OpenGLRaw because of a decent dependency tree.