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

fix docker images to work with cql-io-1.1.0 #697

Merged
merged 5 commits into from
Apr 1, 2019
Merged

Conversation

fisx
Copy link
Contributor

@fisx fisx commented Mar 29, 2019

No description provided.

@fisx
Copy link
Contributor Author

fisx commented Mar 29, 2019

this is not working yet, stack install fails when attempting to install ghc-8.2.2 on alpine:

bash-4.4# stack install
Preparing to install GHC (ncurses6) to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
Installing GHC ...
Received ExitFailure 2 when running
Raw command: /usr/bin/make install
Run from: /root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2.temp/ghc-8.2.2/

with stack install -v:

[...]
2019-03-29 08:10:59.134428: [debug] /usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2"
2019-03-29 08:10:59.136704: [debug] "rm" -rf "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/package.conf.d"
2019-03-29 08:10:59.138813: [debug] /usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/package.conf.d"
2019-03-29 08:10:59.140546: [debug] /usr/bin/install -c -m 755 -d "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts"
2019-03-29 08:10:59.142680: [debug] #  rts/dist/build/libHSrts.a rts/dist/build/libHSrts_p.a rts/dist/build/libHSrts-ghc8.2.2.so rts/dist/build/libHSrts_l.a rts/dist/build/libHSrts_debug.a rts/dist/build/libHSrts_thr.a rts/dist/build/libHSrts_thr_debug.a rts/dist/build/libHSrts_thr_l.a rts/dist/build/libHSrts_thr_p.a rts/dist/build/libHSrts_debug-ghc8.2.2.so rts/dist/build/libHSrts_thr-ghc8.2.2.so rts/dist/build/libHSrts_thr_debug-ghc8.2.2.so rts/dist/build/libHSrts_l-ghc8.2.2.sorts/dist/build/libHSrts_thr_l-ghc8.2.2.so rts/dist/build/libffi.so rts/dist/build/libffi.so.6 rts/dist/build/libffi.so.6.0.4 rts/dist/build/libCffi.a rts/dist/build/libCffi_p.a rts/dist/build/libCffi_l.a rts/dist/build/libCffi_debug.a rts/dist/build/libCffi_thr.a rts/dist/build/libCffi_thr_debug.a rts/dist/build/libCffi_thr_l.a rts/dist/build/libCffi_thr_p.a = libraries to install
2019-03-29 08:10:59.144322: [debug] #  "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts" = directory to install to
2019-03-29 08:10:59.145443: [debug] #
2019-03-29 08:10:59.146813: [debug] # The .dll case calls STRIP_CMD explicitly, instead of `install -s`, because
2019-03-29 08:10:59.148060: [debug] # on Win64, "install -s" calls a strip that doesn't understand 64bit binaries.
2019-03-29 08:10:59.149245: [debug] # For some reason, this means the DLLs end up non-executable, which means
2019-03-29 08:10:59.150419: [debug] # executables that use them just segfault.
2019-03-29 08:10:59.151540: [debug] /usr/bin/install -c -m 755 -d  "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts"
2019-03-29 08:10:59.153277: [debug] for i in  rts/dist/build/libHSrts.a rts/dist/build/libHSrts_p.a rts/dist/build/libHSrts-ghc8.2.2.so rts/dist/build/libHSrts_l.a rts/dist/build/libHSrts_debug.a rts/dist/build/libHSrts_thr.a rts/dist/build/libHSrts_thr_debug.a rts/dist/build/libHSrts_thr_l.a rts/dist/build/libHSrts_thr_p.a rts/dist/build/libHSrts_debug-ghc8.2.2.so rts/dist/build/libHSrts_thr-ghc8.2.2.so rts/dist/build/libHSrts_thr_debug-ghc8.2.2.so rts/dist/build/libHSrts_l-ghc8.2.2.so rts/dist/build/libHSrts_thr_l-ghc8.2.2.so rts/dist/build/libffi.so rts/dist/build/libffi.so.6 rts/dist/build/libffi.so.6.0.4 rts/dist/build/libCffi.a rts/dist/build/libCffi_p.a rts/dist/build/libCffi_l.a rts/dist/build/libCffi_debug.a rts/dist/build/libCffi_thr.a rts/dist/build/libCffi_thr_debug.a rts/dist/build/libCffi_thr_l.a rts/dist/build/libCffi_thr_p.a; do case $i in *.a)/usr/bin/install -c -m 644  $i  "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts"; true  "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts"/`basename $i` ;; *.dll) /usr/bin/install -c -m 755  $i  "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts" ; :  "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts"/`basename $i` ;; *.so) /usr/bin/install -c -m 755  $i  "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts" ;; *.dylib) /usr/bin/install -c -m 755  $i  "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts";; *) /usr/bin/install -c -m 644  $i "/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2/rts"; esac; done
2019-03-29 08:10:59.256591: [debug] "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" copy libraries/ghc-prim dist-install ":" '' '/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2' '/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/lib/ghc-8.2.2' '/root/.stack/programs/x86_64-linux/ghc-ncurses6-8.2.2/share/doc/ghc-8.2.2/html/libraries' 'v p dyn'
2019-03-29 08:10:59.258245: [debug] utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist: exec: line 3: utils/ghc-cabal/dist-install/build/tmp/ghc-cabal: not found
2019-03-29 08:10:59.258403: [debug] make[1]: *** [ghc.mk:991: install_packages] Error 127
2019-03-29 08:10:59.259140: [debug] make: *** [Makefile:51: install] Error 2

@neongreen
Copy link
Contributor

neongreen commented Mar 29, 2019

Shouldn't it use the system-wide GHC?

@@ -14,6 +14,9 @@ WORKDIR /
#
# Finally, we build docs for haskell-src-exts without hyperlinking enabled
# to avoid a Haddock segfault. See https://github.com/haskell/haddock/issues/928
#
# Note: git, ncurses, sed are added here for historical reasons; since
# roughly 2019-03-28, they are included in prebuilder as well.
Copy link
Contributor

Choose a reason for hiding this comment

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

If they are in the prebuilder, why not remove them from here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

only so that builder will work with old prebuilder, until everything has been updated. (the point of builder is that it doesn't have to rebuild prebuilder every time it's built, right?)

@neongreen
Copy link
Contributor

neongreen commented Mar 29, 2019

Shouldn't it use the system-wide GHC?

I checked and the commit of Stack that you're using can be built just fine with --system-ghc. Specifically:

stack build --stack-yaml=stack-lts-12.yaml --system-ghc

The stack-lts-12.yaml config lives in the Stack repo already so you don't have to do anything extra.

@fisx
Copy link
Contributor Author

fisx commented Mar 31, 2019

Shouldn't it use the system-wide GHC?

I checked and the commit of Stack that you're using can be built just fine with --system-ghc. Specifically:

stack build --stack-yaml=stack-lts-12.yaml --system-ghc

The stack-lts-12.yaml config lives in the Stack repo already so you don't have to do anything extra.

I figured it out myself before reading this, but thought that 6.4.4 won't allow for the 6.4.3 we have installed, and added a sed line. If you say it's not needed I will remove that.

Thanks!

@neongreen
Copy link
Contributor

If you say it's not needed I will remove that.

I tried it locally and it worked, so I'd say it can be removed.

@fisx fisx force-pushed the fisx-cql-io-vs-stack branch from bf243f0 to cfedd53 Compare March 31, 2019 13:09
@fisx fisx changed the title [WIP] fix docker images to work with cql-io-1.1.0 Fix docker images to work with cql-io-1.1.0 Mar 31, 2019
Copy link
Contributor

@neongreen neongreen left a comment

Choose a reason for hiding this comment

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

If it works, :shipit:

@fisx
Copy link
Contributor Author

fisx commented Apr 1, 2019

If you say it's not needed I will remove that.

I tried it locally and it worked, so I'd say it can be removed.

I tried make prebuilder && make builder locally, and without changing the resolver to lts-12.14 it failed. lts-12.20 needs ghc-8.4.4, but we have ghc-8.4.3.

Now it should be ok, I built both docker images successfully.

@fisx fisx changed the title Fix docker images to work with cql-io-1.1.0 fix docker images to work with cql-io-1.1.0 Apr 1, 2019
@fisx fisx merged commit 5c61f24 into develop Apr 1, 2019
@fisx fisx deleted the fisx-cql-io-vs-stack branch April 1, 2019 04:56
@ChrisPenner ChrisPenner mentioned this pull request Apr 9, 2019
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