Skip to content
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

Update nix setup #56

Merged
merged 20 commits into from
Dec 23, 2019
Merged

Update nix setup #56

merged 20 commits into from
Dec 23, 2019

Conversation

luc-tielen
Copy link
Contributor

@luc-tielen luc-tielen commented Dec 12, 2019

This PR continues the work from #22.
I used https://github.com/input-output-hk/haskell.nix/ to keep nix in sync with stack.
I can get it to build on OSX, but I'm still getting an "stdio.h" not found error when compiling the C files. I think I might need to add another nix overlay for this.

You can test it by doing the following:

$ nix-shell
$ # once inside in the nix-shell you can run your stack commands like you would without nix

@luc-tielen luc-tielen mentioned this pull request Dec 14, 2019
@csabahruska
Copy link
Member

Is this PR ready or is it work in progress?

@luc-tielen
Copy link
Contributor Author

@csabahruska oh that's funny, I was about to ask on gitter channel if this could be merged in. It's ready. 😄

@luc-tielen
Copy link
Contributor Author

Also, it might currently take quite some time to build some dependencies (like GHC), but we could create a cachix instance for grin organization so all build artifacts can be cached (reducing build times of dependencies to simply copying files from remote destination to locally).
This can be done in a later PR.

Copy link
Member

@csabahruska csabahruska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@andorp
Copy link
Member

andorp commented Dec 23, 2019

I have encountered with this while building in debian, the suggested --option seems to be fixing my nex issue. NixOS/nix#3142, building the rest of the universe now...

@andorp
Copy link
Member

andorp commented Dec 23, 2019

I got this at my debian when stack build/test:

<command line>: can't load .so/.DLL for: /nix/store/6yaj6n8l925xxfbcd65gzqx3dz7idrnn-glibc-2.27/lib/librt.so (/nix/store/6yaj6n8l925xxfbcd65gzqx3dz7idrnn-glibc-2.27/lib/librt.so: symbol __close_nocancel, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference)
            
--  While building package grin-0.1.0.0 using:
      /home/andorp/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.4.0.1 build lib:grin exe:grin test:grin-end-to-end-test test:grin-test --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

It needs further investigation at my machine, but the nix-shell got activated and the stack build started.

@andorp andorp self-requested a review December 23, 2019 18:45
Copy link
Member

@andorp andorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@csabahruska
Copy link
Member

did work on Ubuntu 16.04

@luc-tielen
Copy link
Contributor Author

I tested this on my Macbook with OSX and on my previous Linux laptop with Ubuntu (18.04) and both seemed to compile + run tests, maybe the error is due to the sandboxing option @andorp? Or something different on Debian?
How do we proceed with this PR? Can it be merged in?

@andorp andorp merged commit 6b7dd3d into grin-compiler:master Dec 23, 2019
@andorp
Copy link
Member

andorp commented Dec 23, 2019

@luc-tielen : I think this is not a showstopper as it works 75% of the observed cases. I plan the update my dev machine soon, and hopefully the problem will go away.

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.

None yet

4 participants