Meson fails to build Clang packages #583

Closed
opened 2024-11-23 00:04:03 +00:00 by dinckelman · 3 comments

Describe the bug

Meson fails to build Clang packages in a way that is not reproducible on Nix 2.18/2.24, but fails on Lix.
Log:

Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/ai1il4g5bsym436pk1r9w7n53kbmliy5-source
source root is source/libnixt
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
mesonConfigurePhase flags: --prefix=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1 --libdir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/lib --libexecdir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/libexec --bindir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/bin --sbindir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/sbin --includedir=/nix/store/irms5sflhfgyfpcgmns3hhagvvaz1sab-nixt-2.5.1-dev/include --mandir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/share/man --infodir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/share/info --localedir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=release
The Meson build system
Version: 1.6.0
Source dir: /private/tmp/nix-build-nixt-2.5.1.drv-0/source/libnixt
Build dir: /private/tmp/nix-build-nixt-2.5.1.drv-0/source/libnixt/build
Build type: native build
Project name: nixt
Project version: 2.5.1
C compiler for the host machine: clang (clang 16.0.6 "clang version 16.0.6")
C linker for the host machine: clang ld64 951.9

meson.build:1:0: ERROR: Compiler clang++ cannot compile programs.

A full log can be found at /private/tmp/nix-build-nixt-2.5.1.drv-0/source/libnixt/build/meson-logs/meson-log.txt 
^^^^ Not actually present

Steps To Reproduce

  1. Add nixd to your flake
  2. Attempt to build

nix --version output

  • system: "aarch64-darwin"
  • host os: Darwin 24.0.0, macOS 15.0.1
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Lix, like Nix) 2.91.1

Worth noting that this is not exclusive to aarch64-darwin. The same issue can be reproduced on x86_64-linux

## Describe the bug Meson fails to build Clang packages in a way that is not reproducible on Nix 2.18/2.24, but fails on Lix. Log: ``` Running phase: unpackPhase @nix { "action": "setPhase", "phase": "unpackPhase" } unpacking source archive /nix/store/ai1il4g5bsym436pk1r9w7n53kbmliy5-source source root is source/libnixt Running phase: patchPhase @nix { "action": "setPhase", "phase": "patchPhase" } Running phase: updateAutotoolsGnuConfigScriptsPhase @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } Running phase: configurePhase @nix { "action": "setPhase", "phase": "configurePhase" } mesonConfigurePhase flags: --prefix=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1 --libdir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/lib --libexecdir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/libexec --bindir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/bin --sbindir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/sbin --includedir=/nix/store/irms5sflhfgyfpcgmns3hhagvvaz1sab-nixt-2.5.1-dev/include --mandir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/share/man --infodir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/share/info --localedir=/nix/store/n52kvgg4xcqsgay152rbzpqb2gn7dkyf-nixt-2.5.1/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=release The Meson build system Version: 1.6.0 Source dir: /private/tmp/nix-build-nixt-2.5.1.drv-0/source/libnixt Build dir: /private/tmp/nix-build-nixt-2.5.1.drv-0/source/libnixt/build Build type: native build Project name: nixt Project version: 2.5.1 C compiler for the host machine: clang (clang 16.0.6 "clang version 16.0.6") C linker for the host machine: clang ld64 951.9 meson.build:1:0: ERROR: Compiler clang++ cannot compile programs. A full log can be found at /private/tmp/nix-build-nixt-2.5.1.drv-0/source/libnixt/build/meson-logs/meson-log.txt ^^^^ Not actually present ``` ## Steps To Reproduce 1. Add nixd to your flake 2. Attempt to build ## `nix --version` output - system: `"aarch64-darwin"` - host os: `Darwin 24.0.0, macOS 15.0.1` - multi-user?: `yes` - sandbox: `no` - version: `nix-env (Lix, like Nix) 2.91.1` Worth noting that this is not exclusive to aarch64-darwin. The same issue can be reproduced on x86_64-linux
Owner

i think i need more context. currently the wording of this bug report implies it might be the bug fixed by lix-project/nixos-module#46 ?

does it reproduce when you do nix build --rebuild nixpkgs#nixd, which ignores overlays ?

the thing that would help the most to diagnosing this is concrete reproduction steps. i don't know in which manner you mean to "add nixd to your flake": is it a nix-darwin? a dev shell? is the lix module in use? i need more information than just that it's a flake.

the easiest way to do this is to provide the sources of a simple flake which is broken.

i think i need more context. currently the wording of this bug report implies it might be the bug fixed by https://git.lix.systems/lix-project/nixos-module/pulls/46 ? does it reproduce when you do `nix build --rebuild nixpkgs#nixd`, which ignores overlays ? the thing that would help the most to diagnosing this is concrete reproduction steps. i don't know in which manner you mean to "add nixd to your flake": is it a nix-darwin? a dev shell? is the lix module in use? i need more information than just that it's a flake. the easiest way to do this is to provide the sources of a simple flake which is broken.
Author

I should have definitely been more specific.

List of things as requested:

  • lix-module is used in the flake. At the time of original post, 2.91.1-1 was used, and upgrading to 2.91.1-2 with the backported has fixed the issue
  • nix build --rebuild nixpkgs#nixd builds even without upgrading, leading me to believe it was a lix-module issue
  • formatters.nix snippet that adds the package, so no nix-darwin or hm:
{ pkgs, ... }:
{
  environment.systemPackages = with pkgs; [
    nixd
    nixfmt-rfc-style
  ];
}
I should have definitely been more specific. List of things as requested: - lix-module is used in the flake. At the time of original post, `2.91.1-1` was used, and upgrading to `2.91.1-2` with the backported has fixed the issue - `nix build --rebuild nixpkgs#nixd` builds even without upgrading, leading me to believe it was a `lix-module` issue - `formatters.nix` snippet that adds the package, so no nix-darwin or hm: ``` { pkgs, ... }: { environment.systemPackages = with pkgs; [ nixd nixfmt-rfc-style ]; } ```
Owner

heck yeah, should be fixed then.

heck yeah, should be fixed then.
jade closed this issue 2024-11-27 07:34:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#583
No description provided.