tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
838 stars 80 forks source link

WIP: Update linux and mesa #95

Closed Lucus16 closed 1 year ago

Lucus16 commented 1 year ago

The build of the kernel still fails with sed: no input files, probably in ~postPatch~ postFixup. Because $dev/lib/modules/6.4.0-asahi/build/vmlinux does not exist.

Lucus16 commented 1 year ago

That last line is new:

  SORTTAB vmlinux
make: Nothing to be done for 'vmlinux'.
yu-re-ka commented 1 year ago

The linux build error you are encountering is not related to the changes in this PR, but due to nixpkgs https://github.com/NixOS/nixpkgs/pull/245449, the workaround https://github.com/tpwrules/nixos-apple-silicon/commit/c737e26b854af4aaab810c40b3ae6035e73d09ba has to be reverted too

ingenieroariel commented 1 year ago

I tried to use this with a commit before https://github.com/NixOS/nixpkgs/pull/245449

   #flakes.nix
    nixpkgs.url = "github:nixos/nixpkgs?rev=1021376e654cd7638633a5142fcf818598e69849";

and got:

warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/k9mdaj5a9rbpkc8x9hj9mw3papraamcn-patchelf-0.15.0.drv!*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/447hvnlzzi9myri1iq3bijxgx6v6b592-patchelf-0.15.0.tar.bz2
source root is patchelf-0.15.0
setting SOURCE_DATE_EPOCH to timestamp 1657949009 of file patchelf-0.15.0/patchelf.spec
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configure flags: --disable-dependency-tracking --prefix=/nix/store/i9iajqfq27668b4fm9d4gy6i13dnfvrn-patchelf-0.15.0
checking for a BSD-compatible install... /nix/store/frjyqvav0a1jky8g6sr70vdf71hjkcys-bootstrap-tools/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /nix/store/frjyqvav0a1jky8g6sr70vdf71hjkcys-bootstrap-tools/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for strip... strip
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... none
checking dependency style of gcc... none
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating patchelf.spec
config.status: executing depfiles commands
@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: -j20 SHELL=/nix/store/frjyqvav0a1jky8g6sr70vdf71hjkcys-bootstrap-tools/bin/bash
Making all in src
make[1]: Entering directory '/build/patchelf-0.15.0/src'
g++ -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.15.0\" -DPACKAGE_STRING=\"patchelf\ 0.15.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\">
g++ -Wall -std=c++17 -D_FILE_OFFSET_BITS=64     -g -O2   -o patchelf patchelf.o  
/nix/store/d963146m8sjym81rn2hkvf1mp4zbj25c-binutils-2.40/bin/ld: patchelf.o: in function `__gnu_cxx::__exchange_and_add(int volatile*, int)':
/nix/store/c7qmp1dgqf3hh4fjw74y2k662nmaslcy-xgcc-12.3.0/include/c++/12.3.0/ext/atomicity.h:66: undefined reference to `__aarch64_ldadd4_acq_rel'
/nix/store/d963146m8sjym81rn2hkvf1mp4zbj25c-binutils-2.40/bin/ld: /nix/store/c7qmp1dgqf3hh4fjw74y2k662nmaslcy-xgcc-12.3.0/include/c++/12.3.0/ext/atomicity.h:66: undefined reference to `_>
/nix/store/d963146m8sjym81rn2hkvf1mp4zbj25c-binutils-2.40/bin/ld: /nix/store/c7qmp1dgqf3hh4fjw74y2k662nmaslcy-xgcc-12.3.0/include/c++/12.3.0/ext/atomicity.h:66: undefined reference to `_>
/nix/store/d963146m8sjym81rn2hkvf1mp4zbj25c-binutils-2.40/bin/ld: /nix/store/c7qmp1dgqf3hh4fjw74y2k662nmaslcy-xgcc-12.3.0/include/c++/12.3.0/ext/atomicity.h:66: undefined reference to `_>
/nix/store/d963146m8sjym81rn2hkvf1mp4zbj25c-binutils-2.40/bin/ld: patchelf.o: in function `__gnu_cxx::__atomic_add(int volatile*, int)':
/nix/store/c7qmp1dgqf3hh4fjw74y2k662nmaslcy-xgcc-12.3.0/include/c++/12.3.0/ext/atomicity.h:71: undefined reference to `__aarch64_ldadd4_acq_rel'
/nix/store/d963146m8sjym81rn2hkvf1mp4zbj25c-binutils-2.40/bin/ld: patchelf.o:/nix/store/c7qmp1dgqf3hh4fjw74y2k662nmaslcy-xgcc-12.3.0/include/c++/12.3.0/ext/atomicity.h:71: more undefined>
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:353: patchelf] Error 1
make[1]: Leaving directory '/build/patchelf-0.15.0/src'
make: *** [Makefile:442: all-recursive] Error 1

@yu-re-ka could you share the main parts of the flake that worked for you?

tpwrules commented 1 year ago

The latest release contains these changes. Thank you for help identifying some of the build issues.

ingenieroariel commented 1 year ago

Upgraded to the latest on M1 Ultra and it works flawlessly. Thanks!