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

nano-wallet: init at 12.1 #39295

Merged
merged 1 commit into from May 5, 2018
Merged

nano-wallet: init at 12.1 #39295

merged 1 commit into from May 5, 2018

Conversation

jluttine
Copy link
Member

@jluttine jluttine commented Apr 21, 2018

Motivation for this change

NOTE: This is work in progress. Hope to get some help and feedback here.

Ready to merge now

This is a wallet for the Nano cryptocurrency (previously known as Raiblocks).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@jluttine
Copy link
Member Author

jluttine commented Apr 21, 2018

Currently, the build fails with the following errors:

CMake Error at /nix/store/pw831glmj7p4n8kkdvrcbmfxks5gwndp-cmake-3.10.2/share/cmake-3.10/Modules/FindBoost.cmake:1928 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.66.0

  Boost include path:
  /nix/store/v6h7zmbxpblcl8k6pmn4kwiv7q7nq469-boost-1.66_0-dev/include

  Could not find the following static Boost libraries:

          boost_date_time
          boost_filesystem
          boost_log
          boost_log_setup
          boost_thread
          boost_program_options
          boost_regex
          boost_atomic

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  CMakeLists.txt:129 (find_package)


-- Found PythonInterp: /nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python (found version "2.7.14")
CMake Warning (dev) in miniupnp/miniupnpc/CMakeLists.txt:
  A logical block opening on the line

    /build/source/miniupnp/miniupnpc/CMakeLists.txt:51 (if)

  closes on the line

    /build/source/miniupnp/miniupnpc/CMakeLists.txt:53 (endif)

  with mis-matching arguments.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:357 (qt5_add_resources):
  Unknown CMake command "qt5_add_resources".


-- Configuring incomplete, errors occurred!
See also "/build/source/build/CMakeFiles/CMakeOutput.log".
See also "/build/source/build/CMakeFiles/CMakeError.log".
builder for '/nix/store/g23g9w90mxfc7hzf25h8crrbavmg5rym-nano-wallet-12.1.drv' failed with exit code 1
error: build of '/nix/store/g23g9w90mxfc7hzf25h8crrbavmg5rym-nano-wallet-12.1.drv' failed

I updated cmake to 3.11.1 but still got the same error.

@jluttine
Copy link
Member Author

It looks as if those libraries don't exist in boost 1.66, only in other versions:

$ nix-locate boost_date_time
boost.out                                             0 s /nix/store/jyqzqqlz6xflv17k96m10qh8r8625274-boost-1.65.1/lib/libboost_date_time.so
boost.out                                        93,528 x /nix/store/jyqzqqlz6xflv17k96m10qh8r8625274-boost-1.65.1/lib/libboost_date_time.so.1.65.1
boost159.out                                          0 s /nix/store/wxxbx95qx911zmid07my7l6ng9272lyp-boost-1.59.0/lib/libboost_date_time.so
boost159.out                                     97,496 x /nix/store/wxxbx95qx911zmid07my7l6ng9272lyp-boost-1.59.0/lib/libboost_date_time.so.1.59.0
boost164.out                                          0 s /nix/store/xkbgk23p15fbng3594wl9mj2951jayjs-boost-1.64.0/lib/libboost_date_time.so
boost164.out                                     93,344 x /nix/store/xkbgk23p15fbng3594wl9mj2951jayjs-boost-1.64.0/lib/libboost_date_time.so.1.64.0
boost155.out                                          0 s /nix/store/g9cnchkmqn0ad4qh2rnnj27fr8yggndh-boost-1.55.0/lib/libboost_date_time.so
boost155.out                                     97,256 x /nix/store/g9cnchkmqn0ad4qh2rnnj27fr8yggndh-boost-1.55.0/lib/libboost_date_time.so.1.55.0
boost160.out                                          0 s /nix/store/dwnn9wpzcqph9337bv7k59b1q28zxxh0-boost-1.60.0/lib/libboost_date_time.so
boost160.out                                     93,272 x /nix/store/dwnn9wpzcqph9337bv7k59b1q28zxxh0-boost-1.60.0/lib/libboost_date_time.so.1.60.0
boost162.out                                          0 s /nix/store/argiiirlbch51dnmv9jagc9741fridmq-boost-1.62.0/lib/libboost_date_time.so
boost162.out                                     93,272 x /nix/store/argiiirlbch51dnmv9jagc9741fridmq-boost-1.62.0/lib/libboost_date_time.so.1.62.0
boost163.out                                          0 s /nix/store/012czf6nbqqk3mjyd4qz39nwv9lqfq5i-boost-1.63.0/lib/libboost_date_time.so
boost163.out                                     93,344 x /nix/store/012czf6nbqqk3mjyd4qz39nwv9lqfq5i-boost-1.63.0/lib/libboost_date_time.so.1.63.0
python36Packages.boost.out                            0 s /nix/store/g2ia26w0y81jhb83950ggflqiw7bmgjr-boost-1.65.1/lib/libboost_date_time.so
python36Packages.boost.out                       93,528 x /nix/store/g2ia26w0y81jhb83950ggflqiw7bmgjr-boost-1.65.1/lib/libboost_date_time.so.1.65.1
autoconf-archive.out                              4,510 r /nix/store/6hskp2vbvvbz2lz5cvvp6wj9yz9gmxip-autoconf-archive-2017.03.21/share/aclocal/ax_boost_date_time.m4

However, build requires boost 1.66, it raises an error otherwise..

@jluttine
Copy link
Member Author

I guess the problem is that the nano wallet is forcing static libraries: https://github.com/nanocurrency/raiblocks/blob/V12.1/CMakeLists.txt#L122

I'll try patching that line and see if I can then set Boost_USE_STATIC_LIBS to OFF.

@jluttine
Copy link
Member Author

Yes! That was it! So that is solved. Now I'm getting the following error:

CMake Error at CMakeLists.txt:356 (qt5_add_resources):
  Unknown CMake command "qt5_add_resources".


-- Configuring incomplete, errors occurred!
See also "/build/source/build/CMakeFiles/CMakeOutput.log".
See also "/build/source/build/CMakeFiles/CMakeError.log".
builder for '/nix/store/2z1c5w329c9x0n31q6z882af86cw9r7j-nano-wallet-12.1.drv' failed with exit code 1
error: build of '/nix/store/2z1c5w329c9x0n31q6z882af86cw9r7j-nano-wallet-12.1.drv' failed

Gotta see how to add those Qt5 resources some other day. Any pointers are appreciated, because I have no idea at the moment but will of course dig into it.

@jluttine jluttine force-pushed the add-nano-wallet branch 7 times, most recently from 5115f4a to a7ea9e9 Compare April 21, 2018 19:28
@jluttine
Copy link
Member Author

Ok, solved that one and a bunch of other failures. Now I'm getting this error:


[ 94%] Building CXX object CMakeFiles/qt.dir/rai/qt/qt.cpp.o
In file included from /nix/store/8ba9lhzdr13w4vqpam9ss52cq5svrpbk-qtbase-5.10.1-dev/include/QtGui/QtGui:43:0,
                 from /build/source/rai/qt/qt.hpp:9,
                 from /build/source/rai/qt/qt.cpp:1:
/nix/store/8ba9lhzdr13w4vqpam9ss52cq5svrpbk-qtbase-5.10.1-dev/include/QtGui/qopengl.h:141:13: fatal error: GL/gl.h: No such file or directory
 #   include <GL/gl.h>
             ^~~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/qt.dir/build.make:63: CMakeFiles/qt.dir/rai/qt/qt.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:634: CMakeFiles/qt.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:693: CMakeFiles/nano_wallet.dir/rule] Error 2
make: *** [Makefile:381: nano_wallet] Error 2
builder for '/nix/store/zbljdf8kx5nz404ki99aln0rjzh1ds6h-nano-wallet-12.1.drv' failed with exit code 2
error: build of '/nix/store/zbljdf8kx5nz404ki99aln0rjzh1ds6h-nano-wallet-12.1.drv' failed

I don't understand. As far as I understand, I've added GL/gl.h to include path...

@jluttine
Copy link
Member Author

Ok, thanks to some tips, that's solved too. Needed to add mesa as a build input instead. Continuing now with other build failures...

@jluttine jluttine force-pushed the add-nano-wallet branch 2 times, most recently from 9544385 to ce9d00a Compare April 22, 2018 08:21
@jluttine
Copy link
Member Author

Finally, this builds now and seems to work. Ready to merge.

@jluttine jluttine changed the title nano-wallet: init at 12.1 [WIP] nano-wallet: init at 12.1 Apr 22, 2018
@jluttine
Copy link
Member Author

The name is now nano-wallet. Should it be nano_wallet or nanoWallet? The executable is nano_wallet.

@srhb
Copy link
Contributor

srhb commented May 5, 2018

@GrahamcOfBorg build nano-wallet

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: nano-wallet

Partial log (click to expand)

Cannot nix-instantiate `nano-wallet' because:
�[31;1merror:�[0m while evaluating 'callPackageWith' at �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix�[0m:113:35, called from �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/top-level/all-packages.nix�[0m:4581:17:
while evaluating 'makeOverridable' at �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix�[0m:72:24, called from �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix�[0m:117:8:
anonymous function at �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/applications/altcoins/nano-wallet/default.nix�[0m:1:1 called without required argument 'mesa', at �[1m/var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/customisation.nix�[0m:74:12

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: nano-wallet

Partial log (click to expand)

Cannot nix-instantiate `nano-wallet' because:
error: while evaluating 'callPackageWith' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/e81c0f05.packethost.net/lib/customisation.nix:113:35, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/e81c0f05.packethost.net/pkgs/top-level/all-packages.nix:4581:17:
while evaluating 'makeOverridable' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/e81c0f05.packethost.net/lib/customisation.nix:72:24, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/e81c0f05.packethost.net/lib/customisation.nix:117:8:
anonymous function at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/e81c0f05.packethost.net/pkgs/applications/altcoins/nano-wallet/default.nix:1:1 called without required argument 'mesa', at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/e81c0f05.packethost.net/lib/customisation.nix:74:12

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: nano-wallet

Partial log (click to expand)

Cannot nix-instantiate `nano-wallet' because:
error: while evaluating 'callPackageWith' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:113:35, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/top-level/all-packages.nix:4581:17:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:72:24, called from /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:117:8:
anonymous function at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/applications/altcoins/nano-wallet/default.nix:1:1 called without required argument 'mesa', at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/lib/customisation.nix:74:12

@srhb
Copy link
Contributor

srhb commented May 5, 2018

I'm afraid this had sat long enough that it no longer evaluates on master due to the mesa changes. Can you try and rebase and look into that?

@jluttine
Copy link
Member Author

jluttine commented May 5, 2018

@srhb Thanks, should be fixed now! (I rebased on nixos-unstable..)

@srhb
Copy link
Contributor

srhb commented May 5, 2018

@GrahamcOfBorg build nano-wallet

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: nano-wallet

Partial log (click to expand)


CMake Error at CMakeLists.txt:456 (file):
  file COPY cannot find
  "/nix/store/1gxrz5f25g28pi75hlzax796wysb4wck-qtbase-5.10.1-dev/lib/cmake/Qt5/../../../plugins/platforms/libqcocoa.dylib".


-- Configuring incomplete, errors occurred!
See also "/tmp/nix-build-nano-wallet-12.1.drv-0/source/build/CMakeFiles/CMakeOutput.log".
builder for '/nix/store/vzsdc4k6cij3xc2xk6m10440xk1nc0b5-nano-wallet-12.1.drv' failed with exit code 1
error: build of '/nix/store/vzsdc4k6cij3xc2xk6m10440xk1nc0b5-nano-wallet-12.1.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: nano-wallet

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1
shrinking /nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1/bin/nano_wallet
shrinking /nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1/bin/rai_node
shrinking /nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1/lib/librai_lib.so
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1/lib  /nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1/bin
patching script interpreter paths in /nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1
checking for references to /build in /nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1...
postPatchMkspecs
/nix/store/6kcmfqkylxga47vy97mx99rylmwhdsji-nano-wallet-12.1

@jluttine
Copy link
Member Author

jluttine commented May 5, 2018

I have no idea how to fix that build error on Darwin...

@srhb
Copy link
Contributor

srhb commented May 5, 2018

@jluttine OK, could you limit meta.platforms to linux then? Should be good to go then. :)

@jluttine
Copy link
Member Author

jluttine commented May 5, 2018

@srhb Ok, done!

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: nano-wallet

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1
shrinking /nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1/lib/librai_lib.so
shrinking /nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1/bin/rai_node
shrinking /nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1/bin/nano_wallet
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1/lib  /nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1/bin
patching script interpreter paths in /nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1
checking for references to /build in /nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1...
postPatchMkspecs
/nix/store/wjryyibr7pjfq3h6h6pck3gzbjgmnzxs-nano-wallet-12.1

@srhb srhb merged commit 1d9330d into NixOS:master May 5, 2018
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