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

ktorrent: fix build with CMake 3.11 #41944

Merged
merged 1 commit into from Jun 15, 2018
Merged

Conversation

erosennin
Copy link
Contributor

Motivation for this change

KTorrent 5.1.0 fails to build with CMake 3.11. This PR backports a fix from upstream.

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/)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Jun 13, 2018

@GrahamcOfBorg build ktorrent

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: ktorrent

Partial log (click to expand)

copying path '/nix/store/2ci6l9gqk7bgbg74602zhs1rp2n88wv5-kross-5.46.0-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/gx30vi2ya614vb58bf9g00423l7q9gj1-kcmutils-5.46.0-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/zhcwks9sg5fzz8nq3y77d7dcqp8g2b7x-kdeclarative-5.46.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/5pa2akdh768js4582mx8p1c17axqcflw-knotifyconfig-5.46.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/aa8dpyjc6cihvq9w124xcwpksh2whac2-kparts-5.46.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/qpk28pcisv4xzbawdckaqz36vjdfhg25-kcmutils-5.46.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/yg4gyqqi12csr8gzfxspa0292bl57lww-kross-5.46.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/74ygmiinigwn62am6lksajfydsjcn95g-libktorrent-2.1-dev' from 'https://cache.nixos.org'...
cannot build derivation '/nix/store/zfwknxnjaih24jfbmm8xx7h2x5zr9ng0-ktorrent-5.1.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/zfwknxnjaih24jfbmm8xx7h2x5zr9ng0-ktorrent-5.1.0.drv' failed

@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: ktorrent

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: ktorrent

Partial log (click to expand)

copying path '/nix/store/zyhmkj36x9652h9qm3va22jisflmd4cm-libktorrent-2.1-dev' from 'https://cache.nixos.org'...
building '/nix/store/d052ld3drpll69yysmqzgih874dl8qwv-?id=672c5076de7e3a526d9bdbb484a69e9386bc49f8.drv'...

trying https://cgit.kde.org/ktorrent.git/patch/?id=672c5076de7e3a526d9bdbb484a69e9386bc49f8
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   999    0   999    0     0    903      0 --:--:--  0:00:01 --:--:--   903
fixed-output derivation produced path '/nix/store/dn9w2hdcwcihwdj62ymwprxfn0nq73li-?id=672c5076de7e3a526d9bdbb484a69e9386bc49f8' with sha256 hash '1cn4rnbhadrsxqx50fawpd747azskavbjraygr6s11rh1wbfrxid' instead of the expected hash '10pvs8wnlv1f1bgd3zys40a6lrrw2m0swancv7gj4pwpb9p28qwy'
cannot build derivation '/nix/store/hmw1qjg2p3b68h6nc62ras606i76y46j-ktorrent-5.1.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/hmw1qjg2p3b68h6nc62ras606i76y46j-ktorrent-5.1.0.drv' failed

# Fix build with CMake 3.11
(fetchpatch {
url = "https://cgit.kde.org/ktorrent.git/patch/?id=672c5076de7e3a526d9bdbb484a69e9386bc49f8";
sha256 = "10pvs8wnlv1f1bgd3zys40a6lrrw2m0swancv7gj4pwpb9p28qwy";
Copy link
Member

Choose a reason for hiding this comment

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

incorrect hash sum:

fixed-output derivation produced path '/nix/store/dn9w2hdcwcihwdj62ymwprxfn0nq73li-?id=672c5076de7e3a526d9bdbb484a69e9386bc49f8' with sha256 hash '1cn4rnbhadrsxqx50fawpd747azskavbjraygr6s11rh1wbfrxid' instead of the expected hash '10pvs8wnlv1f1bgd3zys40a6lrrw2m0swancv7gj4pwpb9p28qwy'

@erosennin
Copy link
Contributor Author

Fixed. Didn't know nix-prefetch-url doesn't work with fetchpatch.

@Mic92
Copy link
Member

Mic92 commented Jun 15, 2018

@GrahamcOfBorg build ktorrent

@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: ktorrent

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@Mic92 Mic92 mentioned this pull request Jun 15, 2018
@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: ktorrent

Partial log (click to expand)

patching script interpreter paths in /nix/store/24hvf7gcb47ia42fzpw6siq7b89y8x88-libktorrent-2.1
checking for references to /build in /nix/store/24hvf7gcb47ia42fzpw6siq7b89y8x88-libktorrent-2.1...
shrinking RPATHs of ELF executables and libraries in /nix/store/qnw6nlcasjzgciazb2cswvvf7i1mrbx1-libktorrent-2.1-dev
strip is /nix/store/4mf2xm9p32lzrim927yk92xhx35yaz62-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/qnw6nlcasjzgciazb2cswvvf7i1mrbx1-libktorrent-2.1-dev/lib
patching script interpreter paths in /nix/store/qnw6nlcasjzgciazb2cswvvf7i1mrbx1-libktorrent-2.1-dev
checking for references to /build in /nix/store/qnw6nlcasjzgciazb2cswvvf7i1mrbx1-libktorrent-2.1-dev...
postPatchMkspecs
cannot build derivation '/nix/store/b7a98mapimcbqpa7vjms9z638cnrwpzx-ktorrent-5.1.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/b7a98mapimcbqpa7vjms9z638cnrwpzx-ktorrent-5.1.0.drv' failed

@Mic92 Mic92 merged commit 31e0e3c into NixOS:master Jun 15, 2018
@Mic92
Copy link
Member

Mic92 commented Jun 15, 2018

Now libktorrent seems to be broken?

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: ktorrent

Partial log (click to expand)

cannot build derivation '/nix/store/73xqkwk7ghzgkm0ajhjwsxn4mp2i0j3n-kwallet-5.46.0.drv': 13 dependencies couldn't be built
cannot build derivation '/nix/store/v06pzl762axf1gkkqfamxy3d03w5301y-kio-5.46.0.drv': 23 dependencies couldn't be built
cannot build derivation '/nix/store/dkm8asklig84v2rqh1xc85a6pqfs5iga-kdeclarative-5.46.0.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/ir33mn9v27rc7k1w2kx40h0lrkqzhgwh-knotifyconfig-5.46.0.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/4awyzljliqv77hnlzh64zx80fd7kx7q4-kparts-5.46.0.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/5am0hw8j6p7yyvm9fgsav17p9fp33rwm-libktorrent-2.1.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/kxkns6rvzc6y50yhwgc2377687kwdd81-kcmutils-5.46.0.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/7axpgq3w7xh0yn1d25pmpf21qpf43fn0-kross-5.46.0.drv': 12 dependencies couldn't be built
cannot build derivation '/nix/store/yklp843imlk6cgxxjcsv63qpqihn5kx3-ktorrent-5.1.0.drv': 15 dependencies couldn't be built
error: build of '/nix/store/yklp843imlk6cgxxjcsv63qpqihn5kx3-ktorrent-5.1.0.drv' failed

@erosennin
Copy link
Contributor Author

That's strange, libktorrent does build successfully with recent master 54ea1cd on my machine. However, ktorrent is now broken again after the Qt update from 5.10 to 5.11. Added a new PR: #42071.

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