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

libtorrentRasterbar: fix build, restructure #42409

Merged
merged 2 commits into from Jun 24, 2018
Merged

Conversation

Chiiruno
Copy link
Contributor

@Chiiruno Chiiruno commented Jun 23, 2018

Motivation for this change

9c0ebbe did not update the patch sha256 hash. (properly?)
Also fails to build anyway when updated.
Thus why I am opting for a temporary unstable version to take the place of 1.1.7

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@worldofpeace
Copy link
Contributor

Sorry I don't follow what's wrong here?

@Chiiruno
Copy link
Contributor Author

nix-shell -p nox --run "nox-review wip" does not finish, but I don't think it's this commit's fault.

@Chiiruno
Copy link
Contributor Author

Chiiruno commented Jun 23, 2018

It didn't build, both because of the sha256 failure and then something to do with Boost.

@worldofpeace
Copy link
Contributor

Hmm, I build it from my updated nixpkgs checkout like nix-build default.nix -A libtorrentRasterbar
and it built...

@Chiiruno
Copy link
Contributor Author

Not sure what to say, doesn't work for me. Now it does.

@worldofpeace
Copy link
Contributor

Do you have the boost errors output?

@Chiiruno
Copy link
Contributor Author

For the sha256 issue:

nix-build . -A libtorrentRasterbar     
warning: Nix search path entry '/home/okina/.nix-defexpr/channels' does not exist, ignoring
these derivations will be built:
  /nix/store/1nh4aakzz3ykxf63gi23jscvk9pzp2sq-64d6b4900448097b0157abb328621dd211e2947d.patch.drv
  /nix/store/i7jfadsgb649zlinxg6rx87wwqa9lynj-libtorrent-rasterbar-1.1.7.drv
building '/nix/store/1nh4aakzz3ykxf63gi23jscvk9pzp2sq-64d6b4900448097b0157abb328621dd211e2947d.patch.drv'...

trying https://github.com/arvidn/libtorrent/commit/64d6b4900448097b0157abb328621dd211e2947d.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   902    0   902    0     0   3256      0 --:--:-- --:--:-- --:--:--  3256
fixed-output derivation produced path '/nix/store/rkbvi0pdpqzsfksazas2dk52dn8s1ixh-64d6b4900448097b0157abb328621dd211e2947d.patch' with sha256 hash '1bdv0icqzbg1il60sckcly4y22lkdbkkwdjadwdzxv7cdj586bzd' instead of the expected hash '0d4h0g129rsgm8xikybxypgv6nnya7ap7kskl7q78p4h6y2a0fhc'
cannot build derivation '/nix/store/i7jfadsgb649zlinxg6rx87wwqa9lynj-libtorrent-rasterbar-1.1.7.drv': 1 dependencies couldn't be built
error: build of '/nix/store/i7jfadsgb649zlinxg6rx87wwqa9lynj-libtorrent-rasterbar-1.1.7.drv' failed

For the Boost issue:

CXX      ../ed25519/src/add_scalar.lo
  CXX      ../ed25519/src/fe.lo
  CXX      ../ed25519/src/ge.lo
  CXX      ../ed25519/src/key_exchange.lo
kademlia/routing_table.cpp: In member function 'libtorrent::dht::routing_table::add_node_status_t libtorrent::dht::routing_table::add_node_impl(libtorrent::dht::node_entry)':
kademlia/routing_table.cpp:716:33: error: 'next' is not a member of 'boost'
  bool const can_split = (boost::next(i) == m_buckets.end()
                                 ^~~~
kademlia/routing_table.cpp:716:33: note: suggested alternative: 'get'
  bool const can_split = (boost::next(i) == m_buckets.end()
                                 ^~~~
                                 get
kademlia/routing_table.cpp:719:40: error: 'prior' is not a member of 'boost'
   && (i == m_buckets.begin() || boost::prior(i)->live_nodes.size() > 1);
                                        ^~~~~
kademlia/routing_table.cpp:907:7: error: in argument to unary !
  if (!can_split)
       ^~~~~~~~~
  CXX      ../ed25519/src/keypair.lo
  CXX      ../ed25519/src/sc.lo
  CXX      ../ed25519/src/seed.lo
  CXX      ../ed25519/src/sha512.lo
make[1]: *** [Makefile:1038: kademlia/routing_table.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/build/libtorrent-libtorrent-1_1_7/src'
make: *** [Makefile:620: all-recursive] Error 1
builder for '/nix/store/0djb1zv8cc3ck2ccggbpvlxv4faq772a-libtorrent-rasterbar-1.1.7.drv' failed with exit code 2
error: build of '/nix/store/0djb1zv8cc3ck2ccggbpvlxv4faq772a-libtorrent-rasterbar-1.1.7.drv' failed

@worldofpeace
Copy link
Contributor

Weird the patch has a different store path for me

/nix/store/zf7mlvhkghcg5z983cq70rfyn7q3irlx-64d6b4900448097b0157abb328621dd211e2947d.patch

@Chiiruno
Copy link
Contributor Author

Should be the same patch, all I did was change the sha256 sum.

@worldofpeace
Copy link
Contributor

Perhaps this patch is was needed also.
I don't think building from master is the best idea being that it's not production ready.

@Chiiruno
Copy link
Contributor Author

I'll try that out.

@worldofpeace
Copy link
Contributor

I can reproduce the error you were getting with master now.

@Chiiruno
Copy link
Contributor Author

Interesting. Must be some local thing.

@worldofpeace
Copy link
Contributor

Is there even any benefit to making this build with latest boost and patching it?
I'm reconsidering this #42401
It will work with latest boost when they release a new version.

@Chiiruno
Copy link
Contributor Author

Perhaps. I'll include it if you write it.

@Chiiruno
Copy link
Contributor Author

Ah, maybe you want me to include this? arvidn/libtorrent@64d6b49

@Chiiruno
Copy link
Contributor Author

Chiiruno commented Jun 23, 2018

Stable (1.1.7) builds now! (I have not included arvidn/libtorrent@64d6b49)

@worldofpeace
Copy link
Contributor

Sorry I don't follow 🤣
This was being applied arvidn/libtorrent@64d6b49
Did you mean this as well?arvidn/libtorrent@9cd0ae6

@Chiiruno
Copy link
Contributor Author

Chiiruno commented Jun 23, 2018

boost166

I'm a little hesitant to include a numbered version here, maybe that's not such a good idea until it actually becomes a problem.

Sorry I don't follow 🤣
This was being applied arvidn/libtorrent@64d6b49
Did you mean this as well? arvidn/libtorrent@9cd0ae6

Oh, turns out I'm already applying both.
I'll push, then.

@worldofpeace
Copy link
Contributor

Hah we're a mess. 🥇

@matthewbauer can you, with your powers, command the @GrahamcOfBorg to do the thing?

@Chiiruno
Copy link
Contributor Author

Do the thing! Do the thing!

@Chiiruno Chiiruno changed the title libtorrent-rasterbar: 1.1.7 -> 2018-06-19 (Temporary) libtorrent-rasterbar: 1.1.7 update Jun 23, 2018
@andir
Copy link
Member

andir commented Jun 23, 2018

@GrahamcOfBorg build libtorrent-rasterbar

@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: libtorrent-rasterbar

Partial log (click to expand)

Cannot nix-instantiate `libtorrent-rasterbar' because:
error: attribute 'libtorrent-rasterbar' in selection path 'libtorrent-rasterbar' not found

@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: libtorrent-rasterbar

Partial log (click to expand)

Cannot nix-instantiate `libtorrent-rasterbar' because:
error: attribute 'libtorrent-rasterbar' in selection path 'libtorrent-rasterbar' not found

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

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

Partial log (click to expand)

Cannot nix-instantiate `libtorrent-rasterbar' because:
error: attribute 'libtorrent-rasterbar' in selection path 'libtorrent-rasterbar' not found

url = "https://github.com/arvidn/libtorrent/archive/libtorrent-${formattedVersion}.tar.gz";
sha256 = "0vbw7wcw8x9787rq5fwaibpvvspm3237l8ahbf20gjpzxhn4yfwc";
};
src = fetchFromGitHub {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for changing this to fetchFromGitHub
It was very ugly before.

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: libtorrentRasterbar

Partial log (click to expand)

make[2]: Nothing to be done for 'install-exec-am'.
 /nix/store/phl4rr4zq1ydz4v3h4r1pkwnk81gq3ss-coreutils-8.29/bin/mkdir -p '/nix/store/d0m561l6f23dsa4r37v8f4is9jhg8yz5-libtorrent-rasterbar-1.1.7/lib/pkgconfig'
 /nix/store/phl4rr4zq1ydz4v3h4r1pkwnk81gq3ss-coreutils-8.29/bin/install -c -m 644 libtorrent-rasterbar.pc '/nix/store/d0m561l6f23dsa4r37v8f4is9jhg8yz5-libtorrent-rasterbar-1.1.7/lib/pkgconfig'
make[2]: Leaving directory '/private/tmp/nix-build-libtorrent-rasterbar-1.1.7.drv-0/source'
make[1]: Leaving directory '/private/tmp/nix-build-libtorrent-rasterbar-1.1.7.drv-0/source'
post-installation fixup
strip is /nix/store/8q05v40n0f7amgw70pk6bkb23r7hrzgn-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/d0m561l6f23dsa4r37v8f4is9jhg8yz5-libtorrent-rasterbar-1.1.7/lib
patching script interpreter paths in /nix/store/d0m561l6f23dsa4r37v8f4is9jhg8yz5-libtorrent-rasterbar-1.1.7
/nix/store/d0m561l6f23dsa4r37v8f4is9jhg8yz5-libtorrent-rasterbar-1.1.7

@Chiiruno
Copy link
Contributor Author

Please split the build fix and the change in structure (formattedVersion moved, fetchFromGitHub, …) into separated commits

If you really really have to have that, I'll do it, but as far as I can see, this seems unecessary, especially since it's in the same PR.

@Chiiruno
Copy link
Contributor Author

Chiiruno commented Jun 23, 2018

Also couldn't we change platforms to all instead of unix since this clearly builds on darwin?
As far as changing the homepage goes, if you think it's worth it, I can change it to the github or if it has one, a related webpage.

@worldofpeace
Copy link
Contributor

Also couldn't we change platforms to all instead of unix since this clearly builds on darwin?

platforms.unix does include darwin.

if you think it's worth it, I can change it to the github or if it has one, a related webpage.

It's good to have working webpages in the meta.

@Chiiruno
Copy link
Contributor Author

platforms.unix does include darwin.

I'm aware, it's based off of BSD after all.
I was just wondering since isn't UNIX-based all NixOS supports right now?

@Chiiruno Chiiruno changed the title libtorrent-rasterbar: 1.1.7 update libtorrentRasterbar: fix build, restructure Jun 23, 2018
@andir
Copy link
Member

andir commented Jun 23, 2018

@GrahamcOfBorg build libtorrentRasterbar

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: libtorrentRasterbar

Partial log (click to expand)

vc_status=1
vc_variable=AUTOMAKE
found
./autotool.sh: fork: Resource temporarily unavailable
 Checking for libtool >= ...
   testing libtoolize...  not found.
  testing glibtoolize...  not found.
***Error***: libtool >=  not found.
builder for '/nix/store/2i2h0pc15dxkzxpzzkhi5wfxbyj7l65x-libtorrent-rasterbar-1.1.7.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/2i2h0pc15dxkzxpzzkhi5wfxbyj7l65x-libtorrent-rasterbar-1.1.7.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: libtorrentRasterbar

Partial log (click to expand)

make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/k7k6r5qpkii8941dfwin3i4ixcpywblm-libtorrent-rasterbar-1.1.7
shrinking /nix/store/k7k6r5qpkii8941dfwin3i4ixcpywblm-libtorrent-rasterbar-1.1.7/lib/libtorrent-rasterbar.so.9.0.0
shrinking /nix/store/k7k6r5qpkii8941dfwin3i4ixcpywblm-libtorrent-rasterbar-1.1.7/lib/python2.7/site-packages/libtorrent.so
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/k7k6r5qpkii8941dfwin3i4ixcpywblm-libtorrent-rasterbar-1.1.7/lib
patching script interpreter paths in /nix/store/k7k6r5qpkii8941dfwin3i4ixcpywblm-libtorrent-rasterbar-1.1.7
checking for references to /build in /nix/store/k7k6r5qpkii8941dfwin3i4ixcpywblm-libtorrent-rasterbar-1.1.7...
/nix/store/k7k6r5qpkii8941dfwin3i4ixcpywblm-libtorrent-rasterbar-1.1.7

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: libtorrentRasterbar

Partial log (click to expand)

make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7
shrinking /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7/lib/python2.7/site-packages/libtorrent.so
shrinking /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7/lib/libtorrent-rasterbar.so.9.0.0
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7/lib
patching script interpreter paths in /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7
checking for references to /build in /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7...
/nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7

@Chiiruno
Copy link
Contributor Author

Why did Darwin fail? It worked before.

@worldofpeace
Copy link
Contributor

This usually happens when you run out of file descriptors or the borg reached it's limit I think.
Should be unrelated if it actually builds or not.

@andir Could you run the darwin build again?

@Chiiruno
Copy link
Contributor Author

Oh, that must be why my meguca package failed too, it failed at a weird place on one build.

@andir
Copy link
Member

andir commented Jun 24, 2018

@GrahamcOfBorg build libtorrentRasterbar

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: libtorrentRasterbar

Partial log (click to expand)

/nix/store/k7k6r5qpkii8941dfwin3i4ixcpywblm-libtorrent-rasterbar-1.1.7

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: libtorrentRasterbar

Partial log (click to expand)

make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7
shrinking /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7/lib/python2.7/site-packages/libtorrent.so
shrinking /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7/lib/libtorrent-rasterbar.so.9.0.0
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7/lib
patching script interpreter paths in /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7
checking for references to /build in /nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7...
/nix/store/ma6ldw7jgd02g67g6y4p434nk3ymgxp2-libtorrent-rasterbar-1.1.7

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: libtorrentRasterbar

Partial log (click to expand)

make[2]: Nothing to be done for 'install-exec-am'.
 /nix/store/5q51r2d0xzs4hi8rb661drpf83mhm4b4-coreutils-8.29/bin/mkdir -p '/nix/store/vprbbw8yhhpqavg6qmxcgrz32ciga7lz-libtorrent-rasterbar-1.1.7/lib/pkgconfig'
 /nix/store/5q51r2d0xzs4hi8rb661drpf83mhm4b4-coreutils-8.29/bin/install -c -m 644 libtorrent-rasterbar.pc '/nix/store/vprbbw8yhhpqavg6qmxcgrz32ciga7lz-libtorrent-rasterbar-1.1.7/lib/pkgconfig'
make[2]: Leaving directory '/private/tmp/nix-build-libtorrent-rasterbar-1.1.7.drv-0/source'
make[1]: Leaving directory '/private/tmp/nix-build-libtorrent-rasterbar-1.1.7.drv-0/source'
post-installation fixup
strip is /nix/store/7ddbq63v97nk8gkbf7gcsfmby37h6gbl-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/vprbbw8yhhpqavg6qmxcgrz32ciga7lz-libtorrent-rasterbar-1.1.7/lib
patching script interpreter paths in /nix/store/vprbbw8yhhpqavg6qmxcgrz32ciga7lz-libtorrent-rasterbar-1.1.7
/nix/store/vprbbw8yhhpqavg6qmxcgrz32ciga7lz-libtorrent-rasterbar-1.1.7

@andir andir merged commit 7bf378c into NixOS:master Jun 24, 2018
@worldofpeace
Copy link
Contributor

@Chiiruno Yay! ✋

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

5 participants