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

Set CMAKE_SYSTEM_* for cross compiling #48602

Merged
merged 17 commits into from Oct 18, 2018
Merged

Conversation

matthewbauer
Copy link
Member

Motivation for this change

This sets some new variables in make-derivation for cross compiling with CMAKE. Here is the list:

  • CMAKE_SYSTEM_NAME
  • CMAKE_SYSTEM_PROCESSOR
  • CMAKE_SYSTEM_VERSION
  • CMAKE_HOST_SYSTEM_NAME
  • CMAKE_HOST_SYSTEM_PROCESSOR
  • CMAKE_HOST_SYSTEM_VERSION

To do this, we need to start keeping track of uname values, respectively:

  • uname -s (stdenv.buildPlatform.uname.system)
  • uname -p (stdenv.buildPlatform.uname.processor)
  • uname -r (stdenv.buildPlatform.uname.release)

We don't really have a way to get the last one, so leave it null for now.

Also remove some old hacks setting CMAKE_SYSTEM_NAME ad-hoc. And also add some windows doubles (were strangely missing).

Uses uname data to find what to set these variables:

- CMAKE_SYSTEM_NAME
- CMAKE_SYSTEM_PROCESSOR
- CMAKE_SYSTEM_VERSION
- CMAKE_HOST_SYSTEM_NAME
- CMAKE_HOST_SYSTEM_PROCESSOR
- CMAKE_HOST_SYSTEM_VERSION
the boost url is broken - remove for now
this makes it easier to show what supports windows vs. unix.
"platforms.all" could include any possible os (even a machine with no
OS at all!). We can’t possible hope to support all of that, so need to
be more specific.
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: boost, sqlite

Partial log (click to expand)

strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/2bk8iir6ianzs9w110ybmrm85k9cn4vn-boost-1.67_0/lib
patching script interpreter paths in /nix/store/2bk8iir6ianzs9w110ybmrm85k9cn4vn-boost-1.67_0
checking for references to /build in /nix/store/2bk8iir6ianzs9w110ybmrm85k9cn4vn-boost-1.67_0...
shrinking RPATHs of ELF executables and libraries in /nix/store/d12jrk90dian2vxlwwbw9xvhc462114f-boost-1.67_0-dev
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/d12jrk90dian2vxlwwbw9xvhc462114f-boost-1.67_0-dev
checking for references to /build in /nix/store/d12jrk90dian2vxlwwbw9xvhc462114f-boost-1.67_0-dev...
/nix/store/2bk8iir6ianzs9w110ybmrm85k9cn4vn-boost-1.67_0
/nix/store/ids1d30hxlf61hy1zchcw732a4i5zp35-sqlite-3.24.0-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: boost, sqlite

Partial log (click to expand)

strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/mkavxnzwi6likq4f3ihlcmv5nxnqkqni-boost-1.67_0/lib
patching script interpreter paths in /nix/store/mkavxnzwi6likq4f3ihlcmv5nxnqkqni-boost-1.67_0
checking for references to /build in /nix/store/mkavxnzwi6likq4f3ihlcmv5nxnqkqni-boost-1.67_0...
shrinking RPATHs of ELF executables and libraries in /nix/store/h40l1fvb06zi3cvy0blb375d0j7wg1hd-boost-1.67_0-dev
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/h40l1fvb06zi3cvy0blb375d0j7wg1hd-boost-1.67_0-dev
checking for references to /build in /nix/store/h40l1fvb06zi3cvy0blb375d0j7wg1hd-boost-1.67_0-dev...
/nix/store/mkavxnzwi6likq4f3ihlcmv5nxnqkqni-boost-1.67_0
/nix/store/69cb698rvaf6w5d62hrw2l4mwc5yddhs-sqlite-3.24.0-bin

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: boost, sqlite

Partial log (click to expand)

/nix/store/zci0w7saxf8fnrpvjqyh1hlyp0b331gz-boost-1.67_0/lib/libboost_thread.dylib: fixing dylib
/nix/store/zci0w7saxf8fnrpvjqyh1hlyp0b331gz-boost-1.67_0/lib/libboost_timer.dylib: fixing dylib
/nix/store/zci0w7saxf8fnrpvjqyh1hlyp0b331gz-boost-1.67_0/lib/libboost_type_erasure.dylib: fixing dylib
/nix/store/zci0w7saxf8fnrpvjqyh1hlyp0b331gz-boost-1.67_0/lib/libboost_unit_test_framework.dylib: fixing dylib
/nix/store/zci0w7saxf8fnrpvjqyh1hlyp0b331gz-boost-1.67_0/lib/libboost_wave.dylib: fixing dylib
/nix/store/zci0w7saxf8fnrpvjqyh1hlyp0b331gz-boost-1.67_0/lib/libboost_wserialization.dylib: fixing dylib
strip is /nix/store/53nysl8bqwxihwzs1pgwka20nf8mbvlp-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/hhkqy3v635h2n24swr8bw109vjn9iivi-boost-1.67_0-dev
/nix/store/zci0w7saxf8fnrpvjqyh1hlyp0b331gz-boost-1.67_0
/nix/store/97zmdhlal5h46p6cd4zchhc3ya9zq6za-sqlite-3.24.0-bin

@matthewbauer
Copy link
Member Author

@GrahamcOfBorg build pkgs.pkgsCross.mingwW64.brotli

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pkgs.pkgsCross.mingwW64.brotli

Partial log (click to expand)

patching script interpreter paths in /nix/store/raf5r5k3nhqxr2n4llrnfj4haqw1a3w2-brotli-1.0.6-x86_64-pc-mingw32
shrinking RPATHs of ELF executables and libraries in /nix/store/lwh8p29isd7jiiy2hs2q9y7nx6d4qmc5-brotli-1.0.6-x86_64-pc-mingw32-dev
x86_64-pc-mingw32-strip is /nix/store/q073j70skadl5dvnrhnxx00dzq60z1aq-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
stripping (with command x86_64-pc-mingw32-strip and flags -S) in /nix/store/lwh8p29isd7jiiy2hs2q9y7nx6d4qmc5-brotli-1.0.6-x86_64-pc-mingw32-dev/lib
patching script interpreter paths in /nix/store/lwh8p29isd7jiiy2hs2q9y7nx6d4qmc5-brotli-1.0.6-x86_64-pc-mingw32-dev
shrinking RPATHs of ELF executables and libraries in /nix/store/90dbh4ivyg5w9p2304fywhscq4jkf47j-brotli-1.0.6-x86_64-pc-mingw32-lib
x86_64-pc-mingw32-strip is /nix/store/q073j70skadl5dvnrhnxx00dzq60z1aq-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
stripping (with command x86_64-pc-mingw32-strip and flags -S) in /nix/store/90dbh4ivyg5w9p2304fywhscq4jkf47j-brotli-1.0.6-x86_64-pc-mingw32-lib/lib
patching script interpreter paths in /nix/store/90dbh4ivyg5w9p2304fywhscq4jkf47j-brotli-1.0.6-x86_64-pc-mingw32-lib
/nix/store/raf5r5k3nhqxr2n4llrnfj4haqw1a3w2-brotli-1.0.6-x86_64-pc-mingw32

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pkgs.pkgsCross.mingwW64.brotli

Partial log (click to expand)

patching script interpreter paths in /nix/store/20bnilzrvsp94wwpawa4jbh531piwavx-brotli-1.0.6-x86_64-pc-mingw32
shrinking RPATHs of ELF executables and libraries in /nix/store/z0qblp9ga2pv30lq54fjbpcwyjg3h8bm-brotli-1.0.6-x86_64-pc-mingw32-dev
x86_64-pc-mingw32-strip is /nix/store/am08q2jfx8hjqaqn2pms1v66fka0nrq9-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
stripping (with command x86_64-pc-mingw32-strip and flags -S) in /nix/store/z0qblp9ga2pv30lq54fjbpcwyjg3h8bm-brotli-1.0.6-x86_64-pc-mingw32-dev/lib
patching script interpreter paths in /nix/store/z0qblp9ga2pv30lq54fjbpcwyjg3h8bm-brotli-1.0.6-x86_64-pc-mingw32-dev
shrinking RPATHs of ELF executables and libraries in /nix/store/wva7jrphphv4q2bvf8v2gxqm1x6qjjhc-brotli-1.0.6-x86_64-pc-mingw32-lib
x86_64-pc-mingw32-strip is /nix/store/am08q2jfx8hjqaqn2pms1v66fka0nrq9-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
stripping (with command x86_64-pc-mingw32-strip and flags -S) in /nix/store/wva7jrphphv4q2bvf8v2gxqm1x6qjjhc-brotli-1.0.6-x86_64-pc-mingw32-lib/lib
patching script interpreter paths in /nix/store/wva7jrphphv4q2bvf8v2gxqm1x6qjjhc-brotli-1.0.6-x86_64-pc-mingw32-lib
/nix/store/20bnilzrvsp94wwpawa4jbh531piwavx-brotli-1.0.6-x86_64-pc-mingw32

avoid mass rebuild from the last commits
@matthewbauer
Copy link
Member Author

@Ericson2314 This avoids having to create a wrapper for Cmake and should work just as good... Does it look right to you?

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: boost, sqlite

Partial log (click to expand)

these paths will be fetched (2.48 MiB download, 17.38 MiB unpacked):
  /nix/store/sa8vvn34mgy2la4c5yw55xk3pba0gc4c-boost-1.67_0
copying path '/nix/store/sa8vvn34mgy2la4c5yw55xk3pba0gc4c-boost-1.67_0' from 'https://cache.nixos.org'...
/nix/store/sa8vvn34mgy2la4c5yw55xk3pba0gc4c-boost-1.67_0
/nix/store/ids1d30hxlf61hy1zchcw732a4i5zp35-sqlite-3.24.0-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: boost, sqlite

Partial log (click to expand)

/nix/store/y7cm1jkg68a91cnv9lgldm2l7yzap91d-boost-1.67_0
/nix/store/69cb698rvaf6w5d62hrw2l4mwc5yddhs-sqlite-3.24.0-bin

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: pkgs.pkgsCross.mingwW64.brotli

Partial log (click to expand)

x86_64-pc-mingw32-strip is /nix/store/ml5yia4y3ib60zrzpxqqfqmnr4xiwg45-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
stripping (with command x86_64-pc-mingw32-strip and flags -S) in /nix/store/v99ahqb79nya7aiz88l2kw1603zadww8-brotli-1.0.6-x86_64-pc-mingw32/bin
patching script interpreter paths in /nix/store/v99ahqb79nya7aiz88l2kw1603zadww8-brotli-1.0.6-x86_64-pc-mingw32
x86_64-pc-mingw32-strip is /nix/store/ml5yia4y3ib60zrzpxqqfqmnr4xiwg45-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
stripping (with command x86_64-pc-mingw32-strip and flags -S) in /nix/store/xr8q6j6p58jwny9i6agmr5bgk5vmn6fn-brotli-1.0.6-x86_64-pc-mingw32-dev/lib
patching script interpreter paths in /nix/store/xr8q6j6p58jwny9i6agmr5bgk5vmn6fn-brotli-1.0.6-x86_64-pc-mingw32-dev
x86_64-pc-mingw32-strip is /nix/store/ml5yia4y3ib60zrzpxqqfqmnr4xiwg45-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
stripping (with command x86_64-pc-mingw32-strip and flags -S) in /nix/store/452dzhmxvikf3m2fpc9ywway949d453a-brotli-1.0.6-x86_64-pc-mingw32-lib/lib
patching script interpreter paths in /nix/store/452dzhmxvikf3m2fpc9ywway949d453a-brotli-1.0.6-x86_64-pc-mingw32-lib
/nix/store/v99ahqb79nya7aiz88l2kw1603zadww8-brotli-1.0.6-x86_64-pc-mingw32

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: boost, sqlite

Partial log (click to expand)

/nix/store/cg1i0sn83459rp7hcyfl7qmyyv7kirp5-boost-1.67_0
/nix/store/97zmdhlal5h46p6cd4zchhc3ya9zq6za-sqlite-3.24.0-bin

configure spits out an error when running on windows
only static will build for me
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: pkgsCross.mingwW64.nix

Partial log (click to expand)

curl-tool_writeout.o:tool_writeout.c:(.text+0x6a6): more undefined references to `__imp_curl_easy_getinfo' follow
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:838: curl.exe] Error 1
make[2]: Leaving directory '/build/curl-7.59.0/src'
make[1]: *** [Makefile:1876: all-recursive] Error 1
make[1]: Leaving directory '/build/curl-7.59.0/src'
make: *** [Makefile:925: all-recursive] Error 1
builder for '/nix/store/jkmyaby5skf7377b1cs3wayn4gfjrrf8-curl-7.59.0-x86_64-pc-mingw32.drv' failed with exit code 2
cannot build derivation '/nix/store/fw4ql3zmyk6yfh7vqnr59kfaj1bp2pra-nix-2.1.3-x86_64-pc-mingw32.drv': 2 dependencies couldn't be built
error: build of '/nix/store/fw4ql3zmyk6yfh7vqnr59kfaj1bp2pra-nix-2.1.3-x86_64-pc-mingw32.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: pkgsCross.mingwW64.nix

Partial log (click to expand)

curl-tool_writeout.o:tool_writeout.c:(.text+0x6a6): more undefined references to `__imp_curl_easy_getinfo' follow
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:838: curl.exe] Error 1
make[2]: Leaving directory '/private/tmp/nix-build-curl-7.59.0-x86_64-pc-mingw32.drv-0/curl-7.59.0/src'
make[1]: *** [Makefile:1876: all-recursive] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-curl-7.59.0-x86_64-pc-mingw32.drv-0/curl-7.59.0/src'
make: *** [Makefile:925: all-recursive] Error 1
builder for '/nix/store/9yi2in5z481vhyj46bazk4mv7544v5s1-curl-7.59.0-x86_64-pc-mingw32.drv' failed with exit code 2
cannot build derivation '/nix/store/hnn93l1bbwv16qglnrvs1pkhqxw2xsqz-nix-2.1.3-x86_64-pc-mingw32.drv': 2 dependencies couldn't be built
error: build of '/nix/store/hnn93l1bbwv16qglnrvs1pkhqxw2xsqz-nix-2.1.3-x86_64-pc-mingw32.drv' failed

@matthewbauer
Copy link
Member Author

@GrahamcOfBorg build pkgsCross.mingwW64.nix

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/yl1rbvr02sa9bgv4fj76zyvnip6fbjyq-boost-1.67_0-dev
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/yl1rbvr02sa9bgv4fj76zyvnip6fbjyq-boost-1.67_0-dev
checking for references to /build in /nix/store/yl1rbvr02sa9bgv4fj76zyvnip6fbjyq-boost-1.67_0-dev...
/nix/store/5p4sjmpqcv8r0hv70gqbjnqq80qdf7sz-boost-1.67_0
/nix/store/k68jlv0igd9whsyh29wk272lh04bq5bv-c-ares-1.14.0
/nix/store/2ykbr3xysk7y43bsb1g5nlpawh0ir7kz-curl-7.61.1-bin
/nix/store/agw8k9x60xxlh9xw3as9p509bdw2vx01-nghttp2-1.32.0-bin
/nix/store/ids1d30hxlf61hy1zchcw732a4i5zp35-sqlite-3.24.0-bin
/nix/store/x0aj2fsd3hskn1fckk3w4b8bl6mx8m1s-zlib-1.2.11

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/041iycx4rlgq29lcwvam9m48bganlgnh-boost-1.67_0-dev
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/041iycx4rlgq29lcwvam9m48bganlgnh-boost-1.67_0-dev
checking for references to /build in /nix/store/041iycx4rlgq29lcwvam9m48bganlgnh-boost-1.67_0-dev...
/nix/store/5gspi9ciwadjciyzwnv3sf62xldv2jwc-boost-1.67_0
/nix/store/6l5vcif0hrrfpf45l0ihpv7whxh0l6q2-c-ares-1.14.0
/nix/store/zsh4gk0wh5kqqrv6ccxppfx3yfr91ckm-curl-7.61.1-bin
/nix/store/zljl0n5h7bngvmhngb2khkd3pnry6fzb-nghttp2-1.32.0-bin
/nix/store/69cb698rvaf6w5d62hrw2l4mwc5yddhs-sqlite-3.24.0-bin
/nix/store/di0d17idlw6fxf3qwpfyxciw94ywi664-zlib-1.2.11

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: pkgsCross.mingwW64.nix

Partial log (click to expand)

stripping (with command x86_64-pc-mingw32-strip and flags -S) in /nix/store/7g5g0gddj16jhhnn36ya1x39f45r85ql-curl-7.59.0-x86_64-pc-mingw32/lib
patching script interpreter paths in /nix/store/7g5g0gddj16jhhnn36ya1x39f45r85ql-curl-7.59.0-x86_64-pc-mingw32
gzipping man pages under /nix/store/h25xwv3nzz7j1nqc66k94nmmi05zin44-curl-7.59.0-x86_64-pc-mingw32-man/share/man/
x86_64-pc-mingw32-strip is /nix/store/ml5yia4y3ib60zrzpxqqfqmnr4xiwg45-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
patching script interpreter paths in /nix/store/h25xwv3nzz7j1nqc66k94nmmi05zin44-curl-7.59.0-x86_64-pc-mingw32-man
gzipping man pages under /nix/store/5x0zbxxf69w1ma4g3vir7f7zsamq7rxi-curl-7.59.0-x86_64-pc-mingw32-devdoc/share/man/
x86_64-pc-mingw32-strip is /nix/store/ml5yia4y3ib60zrzpxqqfqmnr4xiwg45-x86_64-pc-mingw32-binutils-2.30/bin/x86_64-pc-mingw32-strip
patching script interpreter paths in /nix/store/5x0zbxxf69w1ma4g3vir7f7zsamq7rxi-curl-7.59.0-x86_64-pc-mingw32-devdoc
cannot build derivation '/nix/store/1rzfrrdqfz7l9dywnik42p3y8p597miy-nix-2.1.3-x86_64-pc-mingw32.drv': 1 dependencies couldn't be built
error: build of '/nix/store/1rzfrrdqfz7l9dywnik42p3y8p597miy-nix-2.1.3-x86_64-pc-mingw32.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: pkgsCross.mingwW64.nix

Partial log (click to expand)

     : std::aligned_storage<sizeof(_Tp), std::alignment_of<_Tp>::value>
                                  ^
/nix/store/sjpqaijd1a93zkk4ynj58zaby938rh1y-x86_64-pc-mingw32-stage-final-gcc-debug-7.3.0/x86_64-pc-mingw32/include/c++/7.3.0/ext/aligned_buffer.h:85:34: error: invalid application of 'sizeof' to incomplete type 'std::promise<nix::DownloadResult>'
make: *** [mk/patterns.mk:3: src/libstore/http-binary-cache-store.o] Error 1
make: *** [mk/patterns.mk:3: src/libstore/binary-cache-store.o] Error 1
make: *** [mk/patterns.mk:3: src/libstore/download.o] Error 1
make: *** [mk/patterns.mk:3: src/libexpr/primops/fetchMercurial.o] Error 1
make: *** [mk/patterns.mk:3: src/nix/sigs.o] Error 1
builder for '/nix/store/chgwvlc4j36h5q98azigxng51yxx71lg-nix-2.1.3-x86_64-pc-mingw32.drv' failed with exit code 2
error: build of '/nix/store/chgwvlc4j36h5q98azigxng51yxx71lg-nix-2.1.3-x86_64-pc-mingw32.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

/nix/store/8agdspzw9921n0qm757gwv05ls06zgmd-boost-1.67_0/lib/libboost_wave.dylib: fixing dylib
/nix/store/8agdspzw9921n0qm757gwv05ls06zgmd-boost-1.67_0/lib/libboost_wserialization.dylib: fixing dylib
strip is /nix/store/53nysl8bqwxihwzs1pgwka20nf8mbvlp-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/1n1shbx1j4izi7cl81383z46s1i7bkkj-boost-1.67_0-dev
/nix/store/8agdspzw9921n0qm757gwv05ls06zgmd-boost-1.67_0
/nix/store/zbczpl20b0cvm0yij1gdyc1arxb6drk7-c-ares-1.14.0
/nix/store/yiaz7mkm56jgas1ynffcac15p0iz349b-curl-7.61.1-bin
/nix/store/xp3w82g418n3p47hclb2rcd8h5dqj78v-nghttp2-1.32.0-bin
/nix/store/97zmdhlal5h46p6cd4zchhc3ya9zq6za-sqlite-3.24.0-bin
/nix/store/c4c69v0x6r5vcn6kq6nk46wa8n24ww62-zlib-1.2.11

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: pkgsCross.mingwW64.nix

Partial log (click to expand)

src/linenoise/linenoise.cpp:944:12: warning: 'atexit_registered' defined but not used [-Wunused-variable]
 static int atexit_registered = 0; /* register atexit just 1 time */
            ^~~~~~~~~~~~~~~~~
src/linenoise/linenoise.cpp:943:12: warning: 'rawmode' defined but not used [-Wunused-variable]
 static int rawmode = 0; /* for atexit() function to check if restore is needed*/
            ^~~~~~~
make: *** [mk/patterns.mk:3: src/nix/build.o] Error 1
make: *** [mk/patterns.mk:3: src/nix/cat.o] Error 1
builder for '/nix/store/cj6n4zb5wkb554dvzjkdffjyxqw911nz-nix-2.1.3-x86_64-pc-mingw32.drv' failed with exit code 2
error: build of '/nix/store/cj6n4zb5wkb554dvzjkdffjyxqw911nz-nix-2.1.3-x86_64-pc-mingw32.drv' failed

mingw is the toolchain name but it is actually run on a window kernel
@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: pkgsCross.mingwW64.nix

Partial log (click to expand)

curl-tool_writeout.o:tool_writeout.c:(.text+0x6a6): more undefined references to `__imp_curl_easy_getinfo' follow
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:838: curl.exe] Error 1
make[2]: Leaving directory '/build/curl-7.59.0/src'
make[1]: *** [Makefile:1876: all-recursive] Error 1
make[1]: Leaving directory '/build/curl-7.59.0/src'
make: *** [Makefile:925: all-recursive] Error 1
builder for '/nix/store/y20mzl99qgsqcrzrxj3xyj9chspbd072-curl-7.59.0-x86_64-pc-mingw32.drv' failed with exit code 2
cannot build derivation '/nix/store/gmragsni122wawlzn666wqn9v37rpamd-nix-2.1.3-x86_64-pc-mingw32.drv': 2 dependencies couldn't be built
error: build of '/nix/store/gmragsni122wawlzn666wqn9v37rpamd-nix-2.1.3-x86_64-pc-mingw32.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

/nix/store/5gspi9ciwadjciyzwnv3sf62xldv2jwc-boost-1.67_0
/nix/store/6l5vcif0hrrfpf45l0ihpv7whxh0l6q2-c-ares-1.14.0
/nix/store/zsh4gk0wh5kqqrv6ccxppfx3yfr91ckm-curl-7.61.1-bin
/nix/store/zljl0n5h7bngvmhngb2khkd3pnry6fzb-nghttp2-1.32.0-bin
/nix/store/69cb698rvaf6w5d62hrw2l4mwc5yddhs-sqlite-3.24.0-bin
/nix/store/di0d17idlw6fxf3qwpfyxciw94ywi664-zlib-1.2.11

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

/nix/store/8agdspzw9921n0qm757gwv05ls06zgmd-boost-1.67_0
/nix/store/zbczpl20b0cvm0yij1gdyc1arxb6drk7-c-ares-1.14.0
/nix/store/yiaz7mkm56jgas1ynffcac15p0iz349b-curl-7.61.1-bin
/nix/store/xp3w82g418n3p47hclb2rcd8h5dqj78v-nghttp2-1.32.0-bin
/nix/store/97zmdhlal5h46p6cd4zchhc3ya9zq6za-sqlite-3.24.0-bin
/nix/store/c4c69v0x6r5vcn6kq6nk46wa8n24ww62-zlib-1.2.11

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

/nix/store/5p4sjmpqcv8r0hv70gqbjnqq80qdf7sz-boost-1.67_0
/nix/store/k68jlv0igd9whsyh29wk272lh04bq5bv-c-ares-1.14.0
/nix/store/2ykbr3xysk7y43bsb1g5nlpawh0ir7kz-curl-7.61.1-bin
/nix/store/agw8k9x60xxlh9xw3as9p509bdw2vx01-nghttp2-1.32.0-bin
/nix/store/ids1d30hxlf61hy1zchcw732a4i5zp35-sqlite-3.24.0-bin
/nix/store/x0aj2fsd3hskn1fckk3w4b8bl6mx8m1s-zlib-1.2.11

@Ericson2314
Copy link
Member

Ericson2314 commented Oct 18, 2018

Awesome!! Small nit, the "doubles" changes can be tested in lib/tests/systems.nix

I was about to mention lib/systems/for-meta.nix, too, but turns out you are just cleaning up after my sloppiness! d9a1800

CC @aneeshusa, let's use your nix-level hook for this next! (And also merge your cmake changes that use it :) )

these weren’t being run correctly
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/xdzdnbakmsllcsps66a1cxa7a10s52xh-boost-1.67_0-dev
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/xdzdnbakmsllcsps66a1cxa7a10s52xh-boost-1.67_0-dev
checking for references to /build in /nix/store/xdzdnbakmsllcsps66a1cxa7a10s52xh-boost-1.67_0-dev...
/nix/store/7x1ds6csf2s6ll2khmwdj6jib79w8f5s-boost-1.67_0
/nix/store/6mkaknm4k59rm54rr6gyi46m0gr17fpk-c-ares-1.14.0
/nix/store/l79231xpicd0v9wnjhagkpf9mim29aqd-curl-7.61.1-bin
/nix/store/5c92dwkn70r3b3ig2mdyxfqkgjplisvm-nghttp2-1.32.0-bin
/nix/store/ppzfyf6d0h3xsmhh0n2v6zlq6fi7d83n-sqlite-3.24.0-bin
/nix/store/x0aj2fsd3hskn1fckk3w4b8bl6mx8m1s-zlib-1.2.11

@Ericson2314
Copy link
Member

Oh, even more awesome. Thanks @matthewbauer!

@Ericson2314 Ericson2314 merged commit d97e5e1 into NixOS:master Oct 18, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

/nix/store/8n4x7znj07v0gn8ggc7734sc44mb542q-boost-1.67_0/lib/libboost_wave.dylib: fixing dylib
/nix/store/8n4x7znj07v0gn8ggc7734sc44mb542q-boost-1.67_0/lib/libboost_wserialization.dylib: fixing dylib
strip is /nix/store/g5r4apl0za012ffs6ladinwa5w0m1l3k-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/p4c2vqzbyqgzpmmvli792w4qv6fa20ps-boost-1.67_0-dev
/nix/store/8n4x7znj07v0gn8ggc7734sc44mb542q-boost-1.67_0
/nix/store/v0yghpanchlkix2xjd6gci3w3hppmx8a-c-ares-1.14.0
/nix/store/b5szzfg330pq3nqhyp9ghfa0ppli06hx-curl-7.61.1-bin
/nix/store/8f5ggarbdvm3i6jyhiygr376c00crv3a-nghttp2-1.32.0-bin
/nix/store/9744g3dn8rv6dvsa17wijk5hsxac83va-sqlite-3.24.0-bin
/nix/store/v8w9k5zzfidw4ik5rjxbpf9cfvbrj9s3-zlib-1.2.11

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: boost, c-ares, curl, nghttp2, sqlite, zlib

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/s42jn6v0rslfixk6jpdldc5f8xl3mlr1-boost-1.67_0-dev
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/s42jn6v0rslfixk6jpdldc5f8xl3mlr1-boost-1.67_0-dev
checking for references to /build in /nix/store/s42jn6v0rslfixk6jpdldc5f8xl3mlr1-boost-1.67_0-dev...
/nix/store/z9iy0r4w0dhgq19yrxxbky76p1cfgr1r-boost-1.67_0
/nix/store/rshs7r6pm9d78mxfvx7b44pahq9zkcls-c-ares-1.14.0
/nix/store/kl0b52170q11qv9iqzf83ak36qr6l2ph-curl-7.61.1-bin
/nix/store/x3v4wvgpzr019ghcdygnh7dhp3zsq38l-nghttp2-1.32.0-bin
/nix/store/sjfb0am2sjihhbls373q05gy72c03h8v-sqlite-3.24.0-bin
/nix/store/di0d17idlw6fxf3qwpfyxciw94ywi664-zlib-1.2.11

globin pushed a commit to mayflower/nixpkgs that referenced this pull request Nov 20, 2018
Set CMAKE_SYSTEM_* for cross compiling
@matthewbauer matthewbauer deleted the cmake-cross branch February 22, 2019 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants