Comments (14)
Well the warning
Warning: 'include-dirs: glfw/include/os/unix-like' directory does not exist.
definitely seems worrisome.
from bindings-glfw.
@peti can you make sure that directory is included? It should be, I don't know how it couldn't but glfw_config.h lives in that dir so I'm sure that whatever caused the above warning is causing the error.
from bindings-glfw.
It looks like cabal sdist
didn't pick up the glfw/include/os dir.
from bindings-glfw.
I don't know how but it looks like I had clobbered some includes in the cabal file. I've updated the repo and hackage. Please try building again :)
from bindings-glfw.
Now I've run into this error:
[1 of 1] Compiling Bindings.GLFW ( dist/build/Bindings/GLFW.hs, dist/build/Bindings/GLFW.o )
In file included from glfw/src/internal.h:74:0:
0,
from glfw/src/context.c:28:
glfw/src/x11_platform.h:38:33:
fatal error: X11/Xcursor/Xcursor.h: No such file or directory
#include <X11/Xcursor/Xcursor.h>
It appears the package has an undeclared dependency in libXcursor
?
from bindings-glfw.
The next error after that one is:
glfw/src/x11_platform.h:53:37:
fatal error: X11/extensions/Xinerama.h: No such file or directory
#include <X11/extensions/Xinerama.h>
from bindings-glfw.
This seems like it may be related to #14. I'm guessing we're missing some linked libs in the cabal file?
from bindings-glfw.
Yes, libXcursor
and libXinerama
at least.
from bindings-glfw.
I'm installing on an Ubuntu VM just fine, so I think this is a nix issue. @peti - can you add those libs to the cabal file and see if that gets you past these errors?
from bindings-glfw.
After 9411a50, I get the following error:
Configuring bindings-GLFW-3.1...
Building bindings-GLFW-3.1...
Preprocessing library bindings-GLFW-3.1...
<command line>: does not exist: glfw/src/x11_gamma.c
Apparently, the file is listed in the Cabal file but missing from the repository?
Also, I notice that cabal check
complains:
$ cabal check
These warnings may cause trouble when distributing the package:
* 'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit
and not just imposing longer compile times on your users.
The following errors will cause portability problems on other environments:
* Unknown architecture name 'powerpc'
Hackage would reject this package.
from bindings-glfw.
See #21.
from bindings-glfw.
Even with that pull request applied, there remains an issue linking the test suite, though:
Linking dist/build/main/main ...
/tmp/nix-build-haskell-bindings-GLFW-3.1.drv-0/bindings-GLFW/dist/build/libHSbindings-GLFW-3.1-ghc7.8.4.so: undefined reference to `_glfwSetCurrentContext'
/tmp/nix-build-haskell-bindings-GLFW-3.1.drv-0/bindings-GLFW/dist/build/libHSbindings-GLFW-3.1-ghc7.8.4.so: undefined reference to `_glfwTerminateTLS'
/tmp/nix-build-haskell-bindings-GLFW-3.1.drv-0/bindings-GLFW/dist/build/libHSbindings-GLFW-3.1-ghc7.8.4.so: undefined reference to `_glfwPlatformGetCurrentContext'
/tmp/nix-build-haskell-bindings-GLFW-3.1.drv-0/bindings-GLFW/dist/build/libHSbindings-GLFW-3.1-ghc7.8.4.so: undefined reference to `_glfwKeySym2Unicode'
/tmp/nix-build-haskell-bindings-GLFW-3.1.drv-0/bindings-GLFW/dist/build/libHSbindings-GLFW-3.1-ghc7.8.4.so: undefined reference to `_glfwInitTLS'
collect2: error: ld returned 1 exit status
I'm not sure what those symbols mean and who is supposed to provide them?
from bindings-glfw.
The linking issues are due to a couple of C files (from the glfw source) not mentioned in the cabal file.
Here's a patch that gets the library and the test to successfully build on linux (Ubuntu 14.04):
diff -ur bindings-GLFW-3.1.1/bindings-GLFW.cabal bindings-GLFW-3.1.1.fix/bindings-GLFW.cabal
--- bindings-GLFW-3.1.1/bindings-GLFW.cabal 2015-03-09 16:50:00.688138179 +0100
+++ bindings-GLFW-3.1.1.fix/bindings-GLFW.cabal 2015-03-09 16:36:42.456173831 +0100
@@ -105,15 +105,19 @@
glfw/src/x11_init.c
glfw/src/x11_monitor.c
glfw/src/x11_window.c
+ glfw/src/xkb_unicode.c
glfw/src/glx_context.c
glfw/src/linux_joystick.c
glfw/src/posix_time.c
+ glfw/src/posix_tls.c
extra-libraries:
GL
X11
Xi
Xrandr
Xxf86vm
+ Xcursor
+ Xinerama
pthread
if os(darwin)
Sorry, can't send a pull request, because the repo is out-of-date. :)
Also note, that this only gets the tests to build. Some tests are still failing afterwards.
from bindings-glfw.
Some of these changes were on my own fork as I had forgotten to git push upstream master
. I've since set bsl/bindings-GLFW as origin
so that won't happen again!
from bindings-glfw.
Related Issues (20)
- Update glfw to 3.1.1 HOT 1
- Should the dependency to Xxf86vm be made optional? HOT 1
- Expose GLFW_USE_DWM_SWAP_INTERVAL as build flag.
- glfw3native.h bindings HOT 3
- Submit to Stackage HOT 2
- Package needs a new maintainer HOT 10
- HUnit 1.3 support HOT 2
- update glfw to 3.2.1 HOT 9
- License mismatch between Cabal and LICENSE file HOT 1
- Make the glfw source to a submodule? HOT 1
- unable to load package `bindings-GLFW-3.1.2.2' HOT 5
- Stack install failing HOT 11
- Duplicate link in README
- glfw_config.h on linux doesn't support multiple window managers.
- MoltenVK support HOT 3
- Upgrade to 3.3
- Doesn't build on Windows. Num directive not supported in cross compilation mode. HOT 8
- OpenBSD support for bindings-GLFW HOT 7
- Upgrade to 3.3.4 or 3.3.6 HOT 1
- broken on M1 macs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bindings-glfw.