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

Build fails after update with 'CoreFoundation/CoreFoundation.h' file not found #1190

Closed
tsukinoko-kun opened this issue Nov 22, 2024 · 2 comments

Comments

@tsukinoko-kun
Copy link

I can't update (more details below).

I have XCode command line tools installed using xcode-select --install.
I tried setting both GNU and Clang as default compilers with CC and CXX, both resulted in the same error.
My config is available in my dotfiles repository.
I have a MacBook Pro with an M4 Max, but had the same problem with my MacBook Pro M2.

If any information is missing, please let me know.

My system is working fine with the old version, but I would like to know what the problem is :)
Can anyone help? Thx


nix flake update results in the following changes:

diff --git nix/flake.lock nix/flake.lock
index f94c9d9..35f5ac2 100644
--- nix/flake.lock
+++ nix/flake.lock
@@ -1,188 +1,188 @@
 {
   "nodes": {
     "brew-src": {
       "flake": false,
       "locked": {
-        "lastModified": 1727016223,
-        "narHash": "sha256-iZqd91Cp4O02BU6/eBZ0UZgJN8AlwH+0geQUpqF176E=",
+        "lastModified": 1731323744,
+        "narHash": "sha256-SxUQm4cTHcaoPQHoXe26ZV8cZiMWBGow8MjE4L+MckM=",
         "owner": "Homebrew",
         "repo": "brew",
-        "rev": "916044581862c32fc2365e8e9ff0b1507a98925e",
+        "rev": "254bf3fe9d8fa2e1b2fb55dbcf535b2d870180c4",
         "type": "github"
       },
       "original": {
         "owner": "Homebrew",
-        "ref": "4.3.24",
+        "ref": "4.4.5",
         "repo": "brew",
         "type": "github"
       }
     },
     "flake-utils": {
       "inputs": {
         "systems": "systems"
       },
       "locked": {
         "lastModified": 1710146030,
         "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
         "owner": "numtide",
         "repo": "flake-utils",
         "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
         "type": "github"
       },
       "original": {
         "owner": "numtide",
         "repo": "flake-utils",
         "type": "github"
       }
     },
     "home-manager": {
       "inputs": {
         "nixpkgs": [
           "nixpkgs"
         ]
       },
       "locked": {
-        "lastModified": 1730633670,
-        "narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=",
+        "lastModified": 1732025103,
+        "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661",
+        "rev": "a46e702093a5c46e192243edbd977d5749e7f294",
         "type": "github"
       },
       "original": {
         "owner": "nix-community",
         "repo": "home-manager",
         "type": "github"
       }
     },
     "nix-darwin": {
       "inputs": {
         "nixpkgs": [
           "nixpkgs"
         ]
       },
       "locked": {
         "lastModified": 1732229547,
         "narHash": "sha256-vtUhSQFgDfyyNM6rgmn35A2T+L5PXBS0H89cxWK9N2A=",
         "owner": "LnL7",
         "repo": "nix-darwin",
         "rev": "edabc790a834326dcb5810e2698fa743483510d0",
         "type": "github"
       },
       "original": {
         "owner": "LnL7",
         "repo": "nix-darwin",
         "type": "github"
       }
     },
     "nix-darwin_2": {
       "inputs": {
         "nixpkgs": "nixpkgs"
       },
       "locked": {
         "lastModified": 1716329735,
         "narHash": "sha256-ap51w+VqG21vuzyQ04WrhI2YbWHd3UGz0e7dc/QQmoA=",
         "owner": "LnL7",
         "repo": "nix-darwin",
         "rev": "eac4f25028c1975a939c8f8fba95c12f8a25e01c",
         "type": "github"
       },
       "original": {
         "owner": "LnL7",
         "repo": "nix-darwin",
         "type": "github"
       }
     },
     "nix-homebrew": {
       "inputs": {
         "brew-src": "brew-src",
         "flake-utils": "flake-utils",
         "nix-darwin": "nix-darwin_2",
         "nixpkgs": "nixpkgs_2"
       },
       "locked": {
-        "lastModified": 1728153462,
-        "narHash": "sha256-jOF15LIzDf7SIkbjzhKq9nlnkS1aFTUCiIo92ipXMY4=",
+        "lastModified": 1732145543,
+        "narHash": "sha256-VRQh/lvCSko9YV7haXyPt7DSp+EkgjjBv/9U4cY9c50=",
         "owner": "zhaofengli-wip",
         "repo": "nix-homebrew",
-        "rev": "86af3bb8f7d365eb496ef5553646ec2fe06a3662",
+        "rev": "ac3945ee614f69ab89c6935b3f0567028de5f012",
         "type": "github"
       },
       "original": {
         "owner": "zhaofengli-wip",
         "repo": "nix-homebrew",
         "type": "github"
       }
     },
     "nixpkgs": {
       "locked": {
         "lastModified": 1687274257,
         "narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=",
         "path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source",
         "rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5",
         "type": "path"
       },
       "original": {
         "id": "nixpkgs",
         "type": "indirect"
       }
     },
     "nixpkgs_2": {
       "locked": {
         "lastModified": 1716330097,
         "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
         "owner": "NixOS",
         "repo": "nixpkgs",
         "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
         "type": "github"
       },
       "original": {
         "owner": "NixOS",
         "ref": "nixos-unstable",
         "repo": "nixpkgs",
         "type": "github"
       }
     },
     "nixpkgs_3": {
       "locked": {
-        "lastModified": 1730768919,
-        "narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
+        "lastModified": 1731890469,
+        "narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc",
+        "rev": "5083ec887760adfe12af64830a66807423a859a7",
         "type": "github"
       },
       "original": {
         "owner": "NixOS",
         "ref": "nixpkgs-unstable",
         "repo": "nixpkgs",
         "type": "github"
       }
     },
     "root": {
       "inputs": {
         "home-manager": "home-manager",
         "nix-darwin": "nix-darwin",
         "nix-homebrew": "nix-homebrew",
         "nixpkgs": "nixpkgs_3"
       }
     },
     "systems": {
       "locked": {
         "lastModified": 1681028828,
         "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
         "owner": "nix-systems",
         "repo": "default",
         "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
         "type": "github"
       },
       "original": {
         "owner": "nix-systems",
         "repo": "default",
         "type": "github"
       }
     }
   },
   "root": "root",
   "version": 7
 }

When I then run darwin-rebuild switch --flake .#macbook --impure I get this output:

building the system configuration...
warning: Git tree '/Users/frank/Git/dotfiles' is dirty
error: builder for '/nix/store/fnhphj81maas12dvlwm8lrvy8sc6g02m-duti-1.5.5pre.drv' failed with exit code 2;
       last 25 log lines:
       > checking for suffix of object files... o
       > checking whether the compiler supports GNU C... yes
       > checking whether clang accepts -g... yes
       > checking for clang option to enable C11 features... none needed
       > checking for a BSD-compatible install... /nix/store/5g6np23z9q7vwwp1s5pxkgn8f8wrmihh-coreutils-9.5/bin/install -c
       > checking build system type... aarch64-apple-darwin24.1.0
       > checking host system type... x86_64-apple-darwin18
       > checking target system type... x86_64-apple-darwin18
       > checking which SDK to use... /homeless-shelter
       > checking Mac OS X deployment target... 10.14
       > checking for strlcpy... yes
       > configure: creating ./config.status
       > config.status: creating Makefile
       > config.status: creating version.c
       > Running phase: buildPhase
       > build flags: SHELL=/nix/store/sk8z3kdy6iaky6sg972k6fkh3iw2rn3d-bash-5.2p37/bin/bash
       > clang -isysroot /homeless-shelter -mmacosx-version-min=10.14 -Wall -Wmissing-prototypes -g -O2 -c ./version.c
       > clang-16: warning: no such sysroot directory: '/homeless-shelter' [-Wmissing-sysroot]
       > clang -isysroot /homeless-shelter -mmacosx-version-min=10.14 -Wall -Wmissing-prototypes -g -O2 -c ./util.c
       > clang-16: warning: no such sysroot directory: '/homeless-shelter' [-Wmissing-sysroot]
       > ./util.c:1:10: fatal error: 'CoreFoundation/CoreFoundation.h' file not found
       > #include <CoreFoundation/CoreFoundation.h>
       >          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       > 1 error generated.
       > make: *** [Makefile:48: util.o] Error 1
       For full logs, run 'nix log /nix/store/fnhphj81maas12dvlwm8lrvy8sc6g02m-duti-1.5.5pre.drv'.
error: 1 dependencies of derivation '/nix/store/9ipx4xx43k6v2ra0bl0p1f3hxirqnp41-system-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yhls0wf8k0dmlpymlzq7lbwmjcc6qv04-darwin-system-25.05.20241118.5083ec8+darwin5.edabc79.drv' failed to build

brew doctor results in this output:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Missing https://github.com/Homebrew/brew git origin remote.

Without a correctly configured origin, Homebrew won't update
properly. You can solve this by adding the remote:
  git -C "/opt/homebrew/Library/.homebrew-is-managed-by-nix" remote add origin https://github.com/Homebrew/brew

Warning: No Cask quarantine support available: unknown reason.

Warning: /usr/bin occurs before /opt/homebrew/bin in your PATH.
This means that system-provided programs will be used instead of those
provided by Homebrew. Consider setting your PATH so that
/opt/homebrew/bin occurs before /usr/bin. Here is a one-liner:
  echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc

The following tools exist at both paths:
  openssl
  tidy
@emilazy
Copy link
Collaborator

emilazy commented Nov 22, 2024

Should be fixed by NixOS/nixpkgs#357745 once it’s merged and hits the channels.

@Samasaur1
Copy link
Contributor

This should be resolved now, can it be closed?

@Enzime Enzime closed this as completed Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants