Mic92 / nixpkgs-review

Review pull-requests on https://github.com/NixOS/nixpkgs
MIT License
353 stars 59 forks source link

How to build packages for i686-linux? #309

Closed davidak closed 1 year ago

davidak commented 1 year ago

I want to test the build of packages for i686-linux. The README introduces the --system flag, but i get an error.

https://github.com/Mic92/nixpkgs-review#review-changes-for-other-operating-systemsarchitectures

[davidak@gaming:~/code/nixpkgs]$ nix run github:gador/nixpkgs-review/add-nom -- pr --post-result --system i686-linux 216991 -p tbb_2020_3 -p tbb_2021_8
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs staging:refs/nixpkgs-review/0 pull/216991/head:refs/nixpkgs-review/1
$ git worktree add /home/davidak/.cache/nixpkgs-review/pr-216991-8/nixpkgs 72d9c8354ddfca7ce54807873a73129b6cd27ce2
Preparing worktree (detached HEAD 72d9c8354dd)
Updating files: 100% (33672/33672), done.
HEAD is now at 72d9c8354dd Merge pull request #214239 from symphorien/ocaml-conflict-verbose
$ git merge --no-commit --no-ff f66f83e1e845e52857fd05af1ea05f3da5fd9826
Automatic merge went well; stopped before committing as requested
The following packages specified with `-p` are not rebuilt by the pull request
tbb_2021_8 tbb_2020_3
$ git worktree prune

The error seem misleading. It works with aarch64-linux.

i686-linux builds generally work:

[davidak@gaming:~]$ nix-build '<nixpkgs>' -A hello --system i686-linux --check
...
/nix/store/5s0yv4lnlgx4l0zk9ls7090nb020fb6j-hello-2.12.1

[davidak@gaming:~]$ file /nix/store/5s0yv4lnlgx4l0zk9ls7090nb020fb6j-hello-2.12.1/bin/hello 
/nix/store/5s0yv4lnlgx4l0zk9ls7090nb020fb6j-hello-2.12.1/bin/hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /nix/store/vnvpyxc1vjdq5jlg10ixbcbrf0imizx5-glibc-2.35-224/lib/ld-linux.so.2, for GNU/Linux 2.6.32, not stripped

Testing another PR:

[davidak@gaming:~/code/nixpkgs]$ nix run github:gador/nixpkgs-review/add-nom -- pr --post-result --system i686-linux 209008
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/209008/head:refs/nixpkgs-review/1
remote: Enumerating objects: 314, done.
remote: Counting objects: 100% (239/239), done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 314 (delta 180), reused 174 (delta 143), pack-reused 75
Receiving objects: 100% (314/314), 368.87 KiB | 3.21 MiB/s, done.
Resolving deltas: 100% (192/192), completed with 72 local objects.
From https://github.com/NixOS/nixpkgs
 + 72d9c8354dd...04ee39ebbb2 master                -> refs/nixpkgs-review/0  (forced update)
 + f66f83e1e84...f1e48efea82 refs/pull/209008/head -> refs/nixpkgs-review/1  (forced update)
$ git worktree add /home/davidak/.cache/nixpkgs-review/pr-209008-1/nixpkgs 04ee39ebbb2271e45d251bfeed0d54b3aac01f26
Preparing worktree (detached HEAD 04ee39ebbb2)
Updating files: 100% (33668/33668), done.
HEAD is now at 04ee39ebbb2 Merge pull request #216859 from fabaff/ha-ffmpeg-bump
$ git merge --no-commit --no-ff f1e48efea82b01575345adfc61a60b9a8423db89
Automatic merge went well; stopped before committing as requested
Nothing to be built.

while on x86_64

davidak@gaming:~/code/nixpkgs]$ nix run github:gador/nixpkgs-review/add-nom -- pr --post-result 209008
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/209008/head:refs/nixpkgs-review/1
remote: Enumerating objects: 30, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 18 (delta 11), reused 10 (delta 4), pack-reused 0
Unpacking objects: 100% (18/18), 3.40 KiB | 3.40 MiB/s, done.
From https://github.com/NixOS/nixpkgs
   04ee39ebbb2..7fac81ab46c  master     -> refs/nixpkgs-review/0
$ git worktree add /home/davidak/.cache/nixpkgs-review/pr-209008-2/nixpkgs 7fac81ab46cb6bb4d859217893ffa61f011c1b72
Preparing worktree (detached HEAD 7fac81ab46c)
Updating files: 100% (33668/33668), done.
HEAD is now at 7fac81ab46c Merge pull request #209008 from drperceptron/ioquake3
$ git merge --no-commit --no-ff f1e48efea82b01575345adfc61a60b9a8423db89
Already up to date.
$ nom build --extra-experimental-features nix-command no-url-literals --no-link --keep-going --no-allow-import-from-derivation --option build-use-sandbox relaxed -f /home/davidak/.cache/nixpkgs-review/pr-209008-2/build.nix
these 3 derivations will be built:
  /nix/store/c2j8gxxqzi1jal9j3wvdr4r7rhz1f7lb-quake3-env.drv
  /nix/store/ndy81fd5lh20kn5c9sk55akigj3pd3qd-quake3-demo-1.11-6-ioquake3-unstable-2022-11-24.drv
  /nix/store/lxlwmks4dzsqvv3mafanyqwd4nsm7cj3-review-shell.drv

So something is strange here.

figsoda commented 1 year ago

Does using --eval local work? This might have something to do with ofborg not evaling on i686-linux

figsoda commented 1 year ago

317