Skip to content

unicorn: fix build on riscv#275084

Merged
NickCao merged 1 commit intoNixOS:masterfrom
patryk4815:fix-riscv64-unicorn
Dec 18, 2023
Merged

unicorn: fix build on riscv#275084
NickCao merged 1 commit intoNixOS:masterfrom
patryk4815:fix-riscv64-unicorn

Conversation

@patryk4815
Copy link
Contributor

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot requested review from luc65r and thoughtpolice December 18, 2023 01:13
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Dec 18, 2023
@NickCao
Copy link
Member

NickCao commented Dec 18, 2023

See #274827, gcc13 in staging fixes this issue once and for all.

@patryk4815
Copy link
Contributor Author

patryk4815 commented Dec 18, 2023

@NickCao I know this PR. But it don't help with this package. On gcc13 it still fails (tested on master with gcc13Stdenv.mkDerivation)

@NickCao
Copy link
Member

NickCao commented Dec 18, 2023

@NickCao I know this PR. But it don't help with this package. On gcc13 it still fails (tested on master with gcc13Stdenv.mkDerivation)

Indeed, I'm able to reproduce the build failure. Thanks for the fix.

@NickCao
Copy link
Member

NickCao commented Dec 18, 2023

Result of nixpkgs-review pr 275084 run on x86_64-linux 1

22 packages built:
  • adenum
  • gef
  • pwndbg
  • pwntools (python311Packages.pwntools)
  • pwntools.dist (python311Packages.pwntools.dist)
  • python310Packages.pwntools
  • python310Packages.pwntools.dist
  • python310Packages.qiling
  • python310Packages.qiling.dist
  • python310Packages.unicorn
  • python310Packages.unicorn.dist
  • python311Packages.angr
  • python311Packages.angr.dist
  • python311Packages.angrcli
  • python311Packages.angrcli.dist
  • python311Packages.angrop
  • python311Packages.angrop.dist
  • python311Packages.qiling
  • python311Packages.qiling.dist
  • python311Packages.unicorn
  • python311Packages.unicorn.dist
  • unicorn

Tested building pkgsCross.riscv64.unicorn with both gcc12Stdenv and gcc13Stdenv.

@NickCao NickCao merged commit b3ecefc into NixOS:master Dec 18, 2023
@wtdcode
Copy link

wtdcode commented Dec 25, 2023

How does this get reproduced? I'm happy to backport it.

@NickCao
Copy link
Member

NickCao commented Dec 25, 2023

How does this get reproduced? I'm happy to backport it.

I was using cross compilation (building .#pkgsCross.riscv64.unicorn), in short the proper fix would be to add -latomic to linker flag in upstream cmake files whenever the host platform requires it.

@patryk4815
Copy link
Contributor Author

I added comment there: unicorn-engine/unicorn#1840 (comment) ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants