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
Error building on Nix. #53
Comments
Thanks for making an issue, I'll investigate this more a little later; the obvious first question to ask is what is exporting the symbols Also, I just noticed a typo in my description; I meant to write "where |
I have a guess as to why the problem is occuring but don't have a fix because I don't know Nix. When building In fact if you want to see what it's doing you can build the C parts by just doing The reasons for the added complexity is that eventually I want to split off the C part into it's own project. I have a number of demos written in C that depend on it. Is there a way to tell Nix to depend on a library that will be built over the course of the current build? |
Oh, I see. To be honest, projects that use the default Cabal Fixing the autogenerated Nix package for such a Haskell package would be simple: create a Nix package for the C bindings (call it |
Sounds good. I'll leave this issue open as a placeholder. |
I got something working on the Nix branch. Do you mind pulling and trying? It worked for me with |
@deech wow, that was a shockingly quick turnaround on learning Nix :^) I tried building the code in the Nix branch but it ended up having an absurd number of "multiple definition of ..." errors. Here's the full build output: |
What platform are you on? Guessing OSX? |
Nope, I'm on NixOS. Would you like me to rerun the build |
Yes, please. :) I just installed Nix via the |
Here's the log (27 MiB uncompressed, 1.8 MiB compressed): fltkhs.log.gz |
Oh wow. Thanks! |
I'm not sure what's going on but I'm unable to reproduce. I don't have NixOS installed but starting from a fresh install of Ubuntu Mate 15.10 my steps were:
|
Interesting, I'll look into it a bit more later. For reference, though, the Git revision of |
BTW: |
These may not be fixed in the latest version |
@taktoa any update? |
Any update? I don't see the nix branch, or a nix file I can try out. I'd like to help it get it to work with nix. |
I have a Nix branch. It hasn't been touched in a while so I brought it up to date with |
btw, I can build a simple c examples with
https://github.com/sboosali/fltkhs-reflex-host/blob/master/c/default.nix |
@sboosali Yup, seems to work on my NixOS 17.09 machine. |
can you check if the new fltkhs nix file works? I'm new to nix, but I think works for me in a pure shell too (but I can't test now, I think you have to add cabal-install as a build tool during development or something).
|
The C demo works for me, but the |
I've separated the C out at https://github.com/TheSandwichMakr/fltkc and https://github.com/TheSandwichMakr/fltkhs It builds for me using nixpkgs-channel rev 4b649a99d8461c980e7028a693387dc48033c1f7 from the nixos github and ghcHEAD (not that you need the newer packages). I changed the opengl support to default to true, and the output libraries go into shared/static_object_files. The The changes may not be so friendly to other operating systems, but adding an |
@deech
btw, how much of the custom setup.hs does stuff for -fbundled? That is,
without it, can it use:
build-type: Configure
or
build-type: Make
? Or does it need to do more for the c2hs / other stuff?
…On Wed, Jun 20, 2018, 1:54 PM TheSandwichMakr ***@***.***> wrote:
I've separated the C out at https://github.com/TheSandwichMakr/fltkc and
https://github.com/TheSandwichMakr/fltkhs
It builds for me using nixpkgs-channel rev
4b649a99d8461c980e7028a693387dc48033c1f7 from the nixos github and ghcHEAD
(not that you need the newer packages).
I changed the opengl support to default to true, and the output libraries
go into shared/static_object_files. The all target builds the regular .so
rather than the one with the -dyn suffix. fltkhs also links dynamically to
fltkc now.
The changes may not be so friendly to other operating systems, but adding
an install target will probably be the main fix, idk.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#53 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACNoMVnvt7aVtc04nUcXj3ws8GFNSHRZks5t-raFgaJpZM4Mah-j>
.
|
A bunch of it is dedicated to bundled builds, generally anything under an There is also a fair amount dedicated to Windows. |
/u/taktoa on Reddit reported:
I'm trying to get this to build in Nix, and I'm getting the following linker error:
Any idea why that would be happening? Usually in my experience it results from modules not being in exposed-modules but that should cause failures on any platform.
The Nix expression I'm using is: haskell.lib.addBuildTools (self.callPackage ./fltkhs.nix {}) [autoconf fltk mesa libjpeg] where fltk.hs contains the output of cabal2nix cabal://fltkhs.
The text was updated successfully, but these errors were encountered: