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

zerotierone: fix build on armv7l via gcc9 #82733

Merged
merged 2 commits into from Mar 16, 2020

Conversation

misuzu
Copy link
Contributor

@misuzu misuzu commented Mar 16, 2020

Motivation for this change

gcc9 no longer supports armv5 march target:

builder for '/nix/store/jb9s051lkcbiw38vzsax5dfabhhv3zsn-zerotierone-1.4.6.drv' failed with exit code 2; last 10 log lines:
  ./doc/build.sh: interpreter directive changed from "/bin/bash" to "/nix/store/8rqiiwg4sddh8a5wy48iqwdvjzvjxaq4-bash-4.4-p23/bin/bash"
  no configure script, doing nothing
  building
  build flags: -j4 -l4 SHELL=/nix/store/8rqiiwg4sddh8a5wy48iqwdvjzvjxaq4-bash-4.4-p23/bin/bash
  /nix/store/8rqiiwg4sddh8a5wy48iqwdvjzvjxaq4-bash-4.4-p23/bin/bash: dpkg: command not found
  g++ -O3 -fstack-protector -fPIE -Wall -Wno-deprecated -std=c++11 -pthread  -DNDEBUG  -DZT_USE_MINIUPNPC -DMINIUPNP_STATICLIB -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DOS_
STRING=\"Linux\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR -DZT_NO_TYPE_PUNNING -DZT_BUILD_PLATFORM=1 -DZT_BUILD_ARCHITECTURE=3 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -D_MT_ALLOCATOR_H -
D_POOL_ALLOCATOR_H -D_EXTPTR_ALLOCATOR_H -D_DEBUG_ALLOCATOR_H -march=armv5 -mno-unaligned-access -marm -fexceptions   -c -o node/C25519.o node/C25519.cpp
  g++: error: unrecognized -march target: armv5
  g++: note: valid arguments are: armv4 armv4t armv5t armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.
5-a armv8-m.base armv8-m.main armv8-r iwmmxt iwmmxt2 native; did you mean 'armv4'?
  g++: error: missing argument to '-march='
  make: *** [<builtin>: node/C25519.o] Error 1
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

sounds good!

@zimbatm zimbatm merged commit 70519e5 into NixOS:master Mar 16, 2020
@misuzu misuzu deleted the zerotierone-armv7l-fix branch April 22, 2021 21:12
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