Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hswong3i
Copy link
Contributor

@hswong3i hswong3i commented Mar 7, 2021

What type of PR is this?

/kind cleanup
/kind feature

What this PR does / why we need it:

  • Bugfix make nixpkgs which pin with branch nixos-21.05
  • Code lint with nixpkgs-fmt
  • Code sync between x86_64 and aarch64

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Update nix pin with `make nixpkgs`

@hswong3i hswong3i requested review from mrunalp and runcom as code owners March 7, 2021 13:52
@openshift-ci-robot openshift-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: no Indicates the PR's author has not DCO signed all their commits. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 7, 2021
@openshift-ci-robot
Copy link

Hi @hswong3i. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hswong3i
To complete the pull request process, please assign mrunalp after the PR has been reviewed.
You can assign the PR to them by writing /assign @mrunalp in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link

codecov bot commented Mar 7, 2021

Codecov Report

Merging #4630 (bb6d446) into master (acd0f73) will not change coverage.
The diff coverage is n/a.

❗ Current head bb6d446 differs from pull request most recent head 7246ba1. Consider uploading reports for the commit 7246ba1 to get more accurate results

@@           Coverage Diff           @@
##           master    #4630   +/-   ##
=======================================
  Coverage   43.80%   43.80%           
=======================================
  Files         109      109           
  Lines       11358    11358           
=======================================
  Hits         4975     4975           
  Misses       5909     5909           
  Partials      474      474           

@saschagrunert
Copy link
Member

Looks like systemd minimal did not build for arm:

2021-03-07T15:18:33.1744693Z Traceback (most recent call last):
2021-03-07T15:18:33.1750090Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/mesonmain.py", line 140, in run
2021-03-07T15:18:33.1753722Z     return options.run_func(options)
2021-03-07T15:18:33.1757877Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/msetup.py", line 253, in run
2021-03-07T15:18:33.1761261Z     app.generate()
2021-03-07T15:18:33.1765299Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/msetup.py", line 161, in generate
2021-03-07T15:18:33.1768685Z     self._generate(env)
2021-03-07T15:18:33.1772689Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/msetup.py", line 200, in _generate
2021-03-07T15:18:33.1776333Z     intr.run()
2021-03-07T15:18:33.1780603Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreter.py", line 4703, in run
2021-03-07T15:18:33.1784002Z     super().run()
2021-03-07T15:18:33.1788410Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 519, in run
2021-03-07T15:18:33.1792320Z     self.evaluate_codeblock(self.ast, start=1)
2021-03-07T15:18:33.1833675Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 544, in evaluate_codeblock
2021-03-07T15:18:33.1834856Z     raise e
2021-03-07T15:18:33.1836501Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 537, in evaluate_codeblock
2021-03-07T15:18:33.1837870Z     self.evaluate_statement(cur)
2021-03-07T15:18:33.1839525Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 550, in evaluate_statement
2021-03-07T15:18:33.1840866Z     return self.function_call(cur)
2021-03-07T15:18:33.1842469Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 909, in function_call
2021-03-07T15:18:33.1843772Z     return func(node, func_args, kwargs)
2021-03-07T15:18:33.1845344Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 393, in wrapped
2021-03-07T15:18:33.1846666Z     return f(*wrapped_args, **wrapped_kwargs)
2021-03-07T15:18:33.1848273Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 228, in wrapped
2021-03-07T15:18:33.1849584Z     return f(*wrapped_args, **wrapped_kwargs)
2021-03-07T15:18:33.1851447Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreter.py", line 4225, in func_subdir
2021-03-07T15:18:33.1852644Z     self.evaluate_codeblock(codeblock)
2021-03-07T15:18:33.1854211Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 544, in evaluate_codeblock
2021-03-07T15:18:33.1855355Z     raise e
2021-03-07T15:18:33.1856788Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 537, in evaluate_codeblock
2021-03-07T15:18:33.1858036Z     self.evaluate_statement(cur)
2021-03-07T15:18:33.1859559Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 552, in evaluate_statement
2021-03-07T15:18:33.1860781Z     self.assignment(cur)
2021-03-07T15:18:33.1862222Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 1219, in assignment
2021-03-07T15:18:33.1863524Z     value = self.evaluate_statement(node.value)
2021-03-07T15:18:33.1865097Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 564, in evaluate_statement
2021-03-07T15:18:33.1866385Z     return self.evaluate_comparison(cur)
2021-03-07T15:18:33.1867933Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 663, in evaluate_comparison
2021-03-07T15:18:33.1869237Z     val1 = self.evaluate_statement(node.left)
2021-03-07T15:18:33.1870976Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 554, in evaluate_statement
2021-03-07T15:18:33.1872221Z     return self.method_call(cur)
2021-03-07T15:18:33.1873668Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 920, in method_call
2021-03-07T15:18:33.1874935Z     obj = self.evaluate_statement(invokable)
2021-03-07T15:18:33.1876629Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 550, in evaluate_statement
2021-03-07T15:18:33.1877886Z     return self.function_call(cur)
2021-03-07T15:18:33.1879359Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 909, in function_call
2021-03-07T15:18:33.1880572Z     return func(node, func_args, kwargs)
2021-03-07T15:18:33.1882014Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 393, in wrapped
2021-03-07T15:18:33.1883250Z     return f(*wrapped_args, **wrapped_kwargs)
2021-03-07T15:18:33.1884719Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 393, in wrapped
2021-03-07T15:18:33.1885955Z     return f(*wrapped_args, **wrapped_kwargs)
2021-03-07T15:18:33.1887426Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreterbase.py", line 228, in wrapped
2021-03-07T15:18:33.1888911Z     return f(*wrapped_args, **wrapped_kwargs)
2021-03-07T15:18:33.1890488Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreter.py", line 2780, in func_run_command
2021-03-07T15:18:33.1891805Z     return self.run_command_impl(node, args, kwargs)
2021-03-07T15:18:33.1893415Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreter.py", line 2845, in run_command_impl
2021-03-07T15:18:33.1894863Z     return RunProcess(cmd, expanded_args, env, srcdir, builddir, self.subdir,
2021-03-07T15:18:33.1896565Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreter.py", line 176, in __init__
2021-03-07T15:18:33.1898294Z     pc, self.stdout, self.stderr = self.run_command(cmd, args, env, source_dir, build_dir, subdir, mesonintrospect, in_builddir, check)
2021-03-07T15:18:33.1900358Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/interpreter.py", line 200, in run_command
2021-03-07T15:18:33.1901642Z     p, o, e = Popen_safe(command_array, stdout=stdout, env=child_env, cwd=cwd)
2021-03-07T15:18:33.1903158Z   File "/nix/store/4gznjq5mq8c33qwl4x5ca63l8z9x3wb1-meson-0.56.0/lib/python3.8/site-packages/mesonbuild/mesonlib.py", line 1217, in Popen_safe
2021-03-07T15:18:33.1904458Z     p = subprocess.Popen(args, universal_newlines=True, close_fds=False,
2021-03-07T15:18:33.1905962Z   File "/nix/store/yl69v76azrz4daiqksrhb8nnmdiqdjg9-python3-3.8.8/lib/python3.8/subprocess.py", line 858, in __init__
2021-03-07T15:18:33.1907170Z     self._execute_child(args, executable, preexec_fn, close_fds,
2021-03-07T15:18:33.1908660Z   File "/nix/store/yl69v76azrz4daiqksrhb8nnmdiqdjg9-python3-3.8.8/lib/python3.8/subprocess.py", line 1706, in _execute_child
2021-03-07T15:18:33.1909891Z     raise child_exception_type(errno_num, err_msg, err_filename)
2021-03-07T15:18:33.1991113Z OSError: [Errno 8] Exec format error: '/build/source/tools/xml_helper.py'
2021-03-07T15:18:33.3491902Z builder for '/nix/store/k5qj6yhj0qffab1gnl2hbw4bjf6yr5p0-systemd-minimal-247.3-aarch64-unknown-linux-gnu.drv' failed with exit code 2

@hswong3i hswong3i force-pushed the master-linux-amd64 branch from bb4a9eb to 0a93252 Compare March 8, 2021 12:57
@openshift-ci-robot openshift-ci-robot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Mar 8, 2021
@hswong3i hswong3i force-pushed the master-linux-amd64 branch from 0a93252 to 0161bf2 Compare March 12, 2021 07:31
@hswong3i hswong3i force-pushed the master-linux-amd64 branch from 0161bf2 to 90d29cd Compare March 19, 2021 06:13
@hswong3i hswong3i force-pushed the master-linux-amd64 branch 2 times, most recently from 8eb090d to ac4deb3 Compare April 4, 2021 01:15
@hswong3i
Copy link
Contributor Author

Looks like systemd minimal did not build for arm:

@saschagrunert pinning with branch nixos-20.09 correctly should able to fix the issue?

@saschagrunert
Copy link
Member

Looks like systemd minimal did not build for arm:

@saschagrunert pinning with branch nixos-20.09 correctly should able to fix the issue?

Isn't it already on the 20.09 channel?

@hswong3i hswong3i force-pushed the master-linux-amd64 branch from ac4deb3 to 6c286fe Compare April 14, 2021 01:27
@openshift-ci-robot openshift-ci-robot added dco-signoff: no Indicates the PR's author has not DCO signed all their commits. and removed dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Apr 14, 2021
@hswong3i hswong3i force-pushed the master-linux-amd64 branch from 6c286fe to 0cc435c Compare April 14, 2021 02:15
@openshift-ci-robot openshift-ci-robot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Apr 14, 2021
@hswong3i hswong3i force-pushed the master-linux-amd64 branch from 0cc435c to b814ea9 Compare April 14, 2021 02:16
@hswong3i
Copy link
Contributor Author

Isn't it already on the 20.09 channel?

Original rev goes to branch master:

New rev goes to branch nixos-20.09:

@TomSweeneyRedHat
Copy link
Contributor

LGTM
assuming happy tests.

@TomSweeneyRedHat
Copy link
Contributor

LGTM
@saschagrunert WDYT?

@saschagrunert
Copy link
Member

We cannot merge this one because the static build still fails:

2021-05-06T04:48:39.0089442Z Compilation failed in require at /nix/store/kv9h22a8hffmd3j64dy9v9c95lbgxcf3-perl-5.32.0-aarch64-unknown-linux-gnu/lib/perl5/5.32.0/aarch64-linux/Data/Dumper.pm line 304.
2021-05-06T04:48:39.0114120Z Couldn't run Build.PL: No such file or directory at lib/Module/Build/Compat.pm line 341.

@hswong3i
Copy link
Contributor Author

hswong3i commented May 7, 2021

We cannot merge this one because the static build still fails:

2021-05-06T04:48:39.0089442Z Compilation failed in require at /nix/store/kv9h22a8hffmd3j64dy9v9c95lbgxcf3-perl-5.32.0-aarch64-unknown-linux-gnu/lib/perl5/5.32.0/aarch64-linux/Data/Dumper.pm line 304.
2021-05-06T04:48:39.0114120Z Couldn't run Build.PL: No such file or directory at lib/Module/Build/Compat.pm line 341.

x86_64-linux is totally fine for my local build, where aarch64-linux support seems introduced by 4ff8662, would you mind to fix it onward?

@saschagrunert
Copy link
Member

We ship those arm binaries continuously, so we have to find out what in nixpkgs was breaking the build and fix it there before bumping them here. :)

@hswong3i
Copy link
Contributor Author

hswong3i commented May 7, 2021

We ship those arm binaries continuously, so we have to find out what in nixpkgs was breaking the build and fix it there before bumping them here. :)

May you give a try with remove gitMinimal? Seems Perl is being triggered by that. Sorry I didn’t use aarch64-linux so couldn’t comment too much for that :-(

@saschagrunert
Copy link
Member

We ship those arm binaries continuously, so we have to find out what in nixpkgs was breaking the build and fix it there before bumping them here. :)

May you give a try with remove gitMinimal? Seems Perl is being triggered by that. Sorry I didn’t use aarch64-linux so couldn’t comment too much for that :-(

Can you remove the dependency from this PR? I think we fixed that git dependency issue a while ago.

@hswong3i
Copy link
Contributor Author

hswong3i commented May 8, 2021

@saschagrunert I had tried for multiple methods:

  • Adding more and more static package override as like as what we had did for conmon; BTW, now both x86_64 and aarch64 are failing...
  • Switch the channel to nixos-unstable, again both x86_64 and aarch64 are failing, especially for something not directly related to our dependency, e.g. fontforge
  • Switch to nixos-unstable + pkgsStatic/pkgsMusl but it is still not manageable...

My key founding from here are:

  • Previously we incorrectly pin nixpkgs into nixos-unstable (see NixOS/nixpkgs@30c2fb6), therefore suddenly aarch64 works with some additional effect (i.e. 4ff8662). This is because nixos-unstable >>> nixos-20.09 so coming with better (but unstable) aarch64 support
  • If we rolling back to nixos-20.09, it is already proof as stable enough for our existing x86_64 implementation, but it is not good enough for static aarch64 support, yet
  • If we keep going on with nixos-unstable, my monthly regular update for both crun/conmon/skopeo/buildah/podman/cri-o will keep broken unexpectedly due to upstream incompatible changes. Again this style had been tried since early 2021 but clearly show that not sustainable and I couldn't manage it, too (I am talking about even just nios-unstable + x86_64 support)...

IMHO:

  • Short term target: pin with nixos-20.09, disable aarch64 from CI and release pipeline, keep monthly x86_64 rolling update working
  • Middle term target: pin with next nixos stable release, enable aarch64 from CI and release pipeline
  • Long term target: pin with next nixos stable release, simplify our complicated glibc override by replacing it with musl + pkgsStatic

@hswong3i hswong3i force-pushed the master-linux-amd64 branch from 772d34e to aa72a8a Compare May 15, 2021 08:16
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 15, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hswong3i
To complete the pull request process, please assign mrunalp after the PR has been reviewed.
You can assign the PR to them by writing /assign @mrunalp in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hswong3i hswong3i force-pushed the master-linux-amd64 branch 8 times, most recently from ec8518d to 80cf89d Compare June 10, 2021 02:36
@hswong3i hswong3i force-pushed the master-linux-amd64 branch 2 times, most recently from eaaec76 to 3daf32b Compare June 17, 2021 06:49
@saschagrunert
Copy link
Member

This patch might bring us further:

diff --git a/nix/default-arm64.nix b/nix/default-arm64.nix
index a75d94921..f3a427acd 100644
--- a/nix/default-arm64.nix
+++ b/nix/default-arm64.nix
@@ -30,8 +30,10 @@ let
             "--enable-confdir=/etc"
             "--enable-usbdropdir=/var/lib/pcsc/drivers"
             "--disable-libsystemd"
+            "--disable-libudev"
+            "--disable-libusb"
           ];
-          buildInputs = [ pkgs.python3 pkgs.udev pkgs.dbus pkgs.systemd ];
+          buildInputs = [ pkgs.python3 pkgs.dbus ];
         });
         systemd = (static pkg.systemd).overrideAttrs (x: {
           outputs = [ "out" "dev" ];

@hswong3i hswong3i force-pushed the master-linux-amd64 branch from 3daf32b to 32a8e80 Compare June 17, 2021 14:41
@hswong3i
Copy link
Contributor Author

This patch might bring us further:

diff --git a/nix/default-arm64.nix b/nix/default-arm64.nix
index a75d94921..f3a427acd 100644
--- a/nix/default-arm64.nix
+++ b/nix/default-arm64.nix
@@ -30,8 +30,10 @@ let
             "--enable-confdir=/etc"
             "--enable-usbdropdir=/var/lib/pcsc/drivers"
             "--disable-libsystemd"
+            "--disable-libudev"
+            "--disable-libusb"
           ];
-          buildInputs = [ pkgs.python3 pkgs.udev pkgs.dbus pkgs.systemd ];
+          buildInputs = [ pkgs.python3 pkgs.dbus ];
         });
         systemd = (static pkg.systemd).overrideAttrs (x: {
           outputs = [ "out" "dev" ];

@saschagrunert much better now, dependencies build successfully, just some local error?

$ nix build -f nix/default-arm64.nix -L 
cri-o-aarch64-unknown-linux-gnu> unpacking sources
cri-o-aarch64-unknown-linux-gnu> unpacking source archive /nix/store/9kz4199br99695waannlhpk488mkldbz-cri-o-cri-o
cri-o-aarch64-unknown-linux-gnu> source root is cri-o-cri-o
cri-o-aarch64-unknown-linux-gnu> patching sources
cri-o-aarch64-unknown-linux-gnu> updateAutotoolsGnuConfigScriptsPhase
cri-o-aarch64-unknown-linux-gnu> configuring
cri-o-aarch64-unknown-linux-gnu> building
cri-o-aarch64-unknown-linux-gnu> patching script interpreter paths in .
cri-o-aarch64-unknown-linux-gnu> ./contrib/bundle/test-e2e: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./contrib/bundle/vars: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./contrib/bundle/build: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./contrib/bundle/test: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./contrib/kube-local/examples/script: interpreter directive changed from "#!/bin/bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./contrib/kube-local/kube-local: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/btrfs_installed_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/apparmor_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/openpgp_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/build-rpms.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/log-capitalized.sh: interpreter directive changed from "#!/bin/bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/seccomp_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/tree_status.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/btrfs_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/libdm_installed.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/selinux_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./hack/libdm_no_deferred_remove_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/prepare-commit-msg.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/post-update.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/pre-commit.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/update.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/pre-push.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/pre-receive.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/commit-msg.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/pre-applypatch.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/pre-merge-commit.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/pre-rebase.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./.git/hooks/applypatch-msg.sample: interpreter directive changed from "#!/bin/sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./test/test_runner.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./test/hooks/checkhook.sh: interpreter directive changed from "#!/usr/bin/env sh" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/sh"
cri-o-aarch64-unknown-linux-gnu> ./test/cni_plugin_helper.bash: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./scripts/github-actions-packages: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./scripts/upload-artifacts: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./scripts/get: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./scripts/versions: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> ./scripts/github-actions-setup: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash"
cri-o-aarch64-unknown-linux-gnu> /nix/store/mbjprscqxcgcdv4m5c7am099wna42scr-bash-4.4-p23-aarch64-unknown-linux-gnu/bin/bash: 1: Syntax error: ")" unexpected
cri-o-aarch64-unknown-linux-gnu> /nix/store/sf1fzgk7di1k1s420fbrcn3cg4r47qrr-which-2.21-aarch64-unknown-linux-gnu/bin/which: 1: Syntax error: "(" unexpected
cri-o-aarch64-unknown-linux-gnu> mkdir -p "/tmp/nix-build-cri-o-aarch64-unknown-linux-gnu.drv-0/go/src/github.com/cri-o"
cri-o-aarch64-unknown-linux-gnu> ln -s "/tmp/nix-build-cri-o-aarch64-unknown-linux-gnu.drv-0/cri-o-cri-o" "/tmp/nix-build-cri-o-aarch64-unknown-linux-gnu.drv-0/go/src/github.com/cri-o/cri-o"
cri-o-aarch64-unknown-linux-gnu> touch "/tmp/nix-build-cri-o-aarch64-unknown-linux-gnu.drv-0/go/.gopathok"
cri-o-aarch64-unknown-linux-gnu> go build  -ldflags '-s -w -X github.com/cri-o/cri-o/internal/pkg/criocli.DefaultsPath="" -X github.com/cri-o/cri-o/internal/version.buildDate='1980-01-01T00:00:00Z' -X github.com/cri-o/cri-o/internal/version.gitCommit=unknown -X github.com/cri-o/cri-o/internal/version.gitTreeState=unknown -s -w -linkmode external -extldflags "-static -lm"' -tags "static netgo osusergo exclude_graphdriver_btrfs exclude_graphdriver_devicemapper seccomp apparmor selinux" -o bin/crio github.com/cri-o/cri-o/cmd/crio
cri-o-aarch64-unknown-linux-gnu> # pkg-config --cflags  -- libseccomp libseccomp
cri-o-aarch64-unknown-linux-gnu> /nix/store/vxkvwvwywi3hkigwdn5yir66c674ljpd-pkg-config-wrapper-0.29.2/bin/pkg-config: line 17: /nix/store/1l94n7w22qspz6p6304xrg1bns7bsh46-pkg-config-aarch64-unknown-linux-gnu-0.29.2/bin/pkg-config: cannot execute binary file: Exec format error
cri-o-aarch64-unknown-linux-gnu> /nix/store/vxkvwvwywi3hkigwdn5yir66c674ljpd-pkg-config-wrapper-0.29.2/bin/pkg-config: line 17: /nix/store/1l94n7w22qspz6p6304xrg1bns7bsh46-pkg-config-aarch64-unknown-linux-gnu-0.29.2/bin/pkg-config: Success
cri-o-aarch64-unknown-linux-gnu> pkg-config: exit status 1
cri-o-aarch64-unknown-linux-gnu> make: *** [Makefile:170: bin/crio] Error 2
builder for '/nix/store/i4mw1vkfjn7d8mfl7aqkqlgfhgvfc4r0-cri-o-aarch64-unknown-linux-gnu.drv' failed with exit code 2; last 10 log lines:
  /nix/store/sf1fzgk7di1k1s420fbrcn3cg4r47qrr-which-2.21-aarch64-unknown-linux-gnu/bin/which: 1: Syntax error: "(" unexpected
  mkdir -p "/tmp/nix-build-cri-o-aarch64-unknown-linux-gnu.drv-0/go/src/github.com/cri-o"
  ln -s "/tmp/nix-build-cri-o-aarch64-unknown-linux-gnu.drv-0/cri-o-cri-o" "/tmp/nix-build-cri-o-aarch64-unknown-linux-gnu.drv-0/go/src/github.com/cri-o/cri-o"
  touch "/tmp/nix-build-cri-o-aarch64-unknown-linux-gnu.drv-0/go/.gopathok"
  go build  -ldflags '-s -w -X github.com/cri-o/cri-o/internal/pkg/criocli.DefaultsPath="" -X github.com/cri-o/cri-o/internal/version.buildDate='1980-01-01T00:00:00Z' -X github.com/cri-o/cri-o/internal/version.gitCommit=unknown -X github.com/cri-o/cri-o/internal/version.gitTreeState=unknown -s -w -linkmode external -extldflags "-static -lm"' -tags "static netgo osusergo exclude_graphdriver_btrfs exclude_graphdriver_devicemapper seccomp apparmor selinux" -o bin/crio github.com/cri-o/cri-o/cmd/crio
  # pkg-config --cflags  -- libseccomp libseccomp
  /nix/store/vxkvwvwywi3hkigwdn5yir66c674ljpd-pkg-config-wrapper-0.29.2/bin/pkg-config: line 17: /nix/store/1l94n7w22qspz6p6304xrg1bns7bsh46-pkg-config-aarch64-unknown-linux-gnu-0.29.2/bin/pkg-config: cannot execute binary file: Exec format error
  /nix/store/vxkvwvwywi3hkigwdn5yir66c674ljpd-pkg-config-wrapper-0.29.2/bin/pkg-config: line 17: /nix/store/1l94n7w22qspz6p6304xrg1bns7bsh46-pkg-config-aarch64-unknown-linux-gnu-0.29.2/bin/pkg-config: Success
  pkg-config: exit status 1
  make: *** [Makefile:170: bin/crio] Error 2
[0 built (1 failed)]
error: build of '/nix/store/i4mw1vkfjn7d8mfl7aqkqlgfhgvfc4r0-cri-o-aarch64-unknown-linux-gnu.drv' failed

@saschagrunert
Copy link
Member

That's not good, it means that we did not build pkg-config for the correct architecture:

  # pkg-config --cflags  -- libseccomp libseccomp
  /nix/store/vxkvwvwywi3hkigwdn5yir66c674ljpd-pkg-config-wrapper-0.29.2/bin/pkg-config: line 17: /nix/store/1l94n7w22qspz6p6304xrg1bns7bsh46-pkg-config-aarch64-unknown-linux-gnu-0.29.2/bin/pkg-config: cannot execute binary file: Exec format error

@hswong3i hswong3i force-pushed the master-linux-amd64 branch 2 times, most recently from 45e8197 to c6c5de4 Compare June 29, 2021 05:33
  - Bugfix `make nixpkgs` which pin with branch `nixos-21.05`
  - Code lint with `nixpkgs-fmt`
  - Code sync between x86\_64 and aarch64

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@hswong3i hswong3i force-pushed the master-linux-amd64 branch from c6c5de4 to 7246ba1 Compare July 14, 2021 14:08
@saschagrunert saschagrunert mentioned this pull request Jul 21, 2021
@saschagrunert
Copy link
Member

Thank you for the PR @hswong3i 🙏 It turns out that the fix is simpler than expected. I proposed a working version in #5110. Feel free to comment there as well. Closing this one now.

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

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants