!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1195 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org196 Servers

Load older messages


SenderMessageTime
9 May 2026
@emilazy:matrix.orgemilygiven ^, it didn't seem like there would be common cases where Hydra would be building only some outputs17:25:32
@reckenrode:matrix.orgRandy Eckenrode *

This reproduces from master.


$ nix shell github:NixOS/nixpkgs?ref=3ac379d7981fbe8bd4d22c25f9df4b7e56f53f71#darwin.dyld --command dsc_extractor
$ nix store delete $(nix eval --raw github:NixOS/nixpkgs?ref=3ac379d7981fbe8bd4d22c25f9df4b7e56f53f71#darwin.dyld.out)
$ nix develop github:NixOS/nixpkgs#darwgithub:NixOS/nixpkgs?ref=3ac379d7981fbe8bd4d22c25f9df4b7e56f53f71#darwin.dyld --command dsc_extractor
$ nix shell --option substitute false github:NixOS/nixpkgs?ref=3ac379d7981fbe8bd4d22c25f9df4b7e56f53f71#darwin.dyld --command dsc_extractor
17:28:33
@reckenrode:matrix.orgRandy Eckenrode *

This reproduces from master.

$ nix shell github:NixOS/nixpkgs?ref=3ac379d7981fbe8bd4d22c25f9df4b7e56f53f71#darwin.dyld --command dsc_extractor
$ nix store delete $(nix eval --raw github:NixOS/nixpkgs?ref=3ac379d7981fbe8bd4d22c25f9df4b7e56f53f71#darwin.dyld.out)
$ nix develop github:NixOS/nixpkgs#darwgithub:NixOS/nixpkgs?ref=3ac379d7981fbe8bd4d22c25f9df4b7e56f53f71#darwin.dyld --command dsc_extractor
$ nix shell --option substitute false github:NixOS/nixpkgs?ref=3ac379d7981fbe8bd4d22c25f9df4b7e56f53f71#darwin.dyld --command dsc_extractor
17:28:44
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/NixOS/nixpkgs/issues/507531#issuecomment-439213759417:31:50
@reckenrode:matrix.orgRandy Eckenrode I guess I’m glad it’s not my fault for relying on ld64’s native code signing instead of using postLinkSignHook with ld-wrapper. 😅 17:34:28
@emilazy:matrix.orgemilyhttps://github.com/NixOS/infra/pull/1030 may help mitigate our long national nightmare20:36:07
@tnias:stratum0.orgtnias joined the room.21:12:21
@tnias:stratum0.orgtnias

I'm trying to figure out why oxigraph is broken for aarch64-darwin.
The build fails in the check phase, when it tries to execute the cli tool.

If I just build it and then try to run the binary I get Trace/BPT trap: 5.
And I can't seem to start it in a debugger.

Any ideas what is happening here? Is this some dylib magic?

Note: I only have access to a macos system in form of a normal user account on darwin-build-box.nix-community.org. I believe I can't install tools like otool.

% nix develop nixpkgs\#oxigraph
...
tnias@darwin01 ~/nixpkgs (git)-[master] % nix develop nixpkgs\#oxigraph
bash-5.3$ unpackPhase
unpacking source archive /nix/store/jld4vdd2sx5g52af4xgcm6nyz9q00qq3-source
source root is source
Executing cargoSetupPostUnpackHook
Finished cargoSetupPostUnpackHook
bash-5.3$ cd source/
bash-5.3$ cargoBuildHook 
Executing cargoBuildHook
~/nixpkgs/source/cli ~/nixpkgs/source
cargoBuildHook flags: -j 2 --target aarch64-apple-darwin --offline --profile release --no-default-features --features=rustls-webpki\,geosparql\,rdf-12
   Compiling proc-macro2 v1.0.106
   Compiling unicode-ident v1.0.24
...
   Compiling siphasher v1.0.2
   Compiling spargeo v0.5.4 (/Users/tnias/nixpkgs/source/lib/spargeo)
warning: oxrocksdb-sys@0.5.7: Inherited flag "-fno-omit-frame-pointer" is not supported by the currently used CC
warning: oxrocksdb-sys@0.5.7: Inherited flag "-fno-omit-frame-pointer" is not supported by the currently used CC
warning: oxrocksdb-sys@0.5.7: Warning: supplying the --target arm64-apple-macosx != arm64-apple-darwin argument to a nix-wrapped compiler may not work correctly - cc-wrapper is currently not designed with multi-target compilers in mind. You may want to use an un-wrapped compiler instead.
...
warning: oxrocksdb-sys@0.5.7: Warning: supplying the --target arm64-apple-macosx != arm64-apple-darwin argument to a nix-wrapped compiler may not work correctly - cc-wrapper is currently not designed with multi-target compilers in mind. You may want to use an un-wrapped compiler instead.
   Compiling oxigraph v0.5.7 (/Users/tnias/nixpkgs/source/lib/oxigraph)
    Finished `release` profile [optimized] target(s) in 5m 44s
~/nixpkgs/source
Executing cargoInstallPostBuildHook
Finished cargoInstallPostBuildHook
Finished cargoBuildHook
bash-5.3$ ./target/aarch64-apple-darwin/release/oxigraph load --location db --format ttl
Trace/BPT trap: 5          ./target/aarch64-apple-darwin/release/oxigraph load --location db --format ttl
bash-5.3$ rizin ./target/aarch64-apple-darwin/release/oxigraph
WARNING: bin_file_strings: search interval size (0xc44000) exeeds max region size (0xa00000), skipping it.
WARNING: bin_file_strings: search interval size (0xc44000) exeeds max region size (0xa00000), skipping it.
 -- Toggle between disasm and graph with the space key
[0x10011b178]> il
library                                                                             
------------------------------------------------------------------------------------
/usr/lib/libc++.1.dylib
/nix/store/xvmhkpvfvmy4sfdkqwg9inq3qkpnx81b-libiconv-109.100.2/lib/libiconv.2.dylib
/usr/lib/libSystem.B.dylib
[0x10011b178]> 
bash-5.3$ ls -l /nix/store/xvmhkpvfvmy4sfdkqwg9inq3qkpnx81b-libiconv-109.100.2/lib/libiconv.2.dylib
-r-xr-xr-x 2 root nixbld 92352 Jan  1  1970 /nix/store/xvmhkpvfvmy4sfdkqwg9inq3qkpnx81b-libiconv-109.100.2/lib/libiconv.2.dylib
bash-5.3$ lldb ./target/aarch64-apple-darwin/release/oxigraph
(lldb) target create "./target/aarch64-apple-darwin/release/oxigraph"
Current executable set to '/Users/tnias/nixpkgs/source/target/aarch64-apple-darwin/release/oxigraph' (arm64).
(lldb) process launch
error: executable doesn't exist: '(empty)'
(lldb) ^D
bash-5.3$ gdb ./target/aarch64-apple-darwin/release/oxigraph
GNU gdb (GDB) 17.1
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=aarch64-apple-darwin25.3.0 --target=x86_64-apple-darwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./target/aarch64-apple-darwin/release/oxigraph...

warning: Could not open OSO archive file "/Users/tnias/nixpkgs/source/target/aarch64-apple-darwin/release/deps/rustcit1J0d/libring-4b86aaa874f2b57b.rlib"
(No debugging symbols found in ./target/aarch64-apple-darwin/release/oxigraph)
(gdb) r
Don't know how to run.  Try "help target".
(gdb) quit
bash-5.3$
23:41:33
@emilazy:matrix.orgemily we have otool etc. in Nixpkgs, as part of the LLVM bintools 23:44:43
@reckenrode:matrix.orgRandy Eckenrode nix shell nixpkgs#darwin.binutils --command otool 23:47:58
@tnias:stratum0.orgtnias

It looks like otool can properly resolve all dylibs.

bash-5.3$ otool -L ./target/aarch64-apple-darwin/release/oxigraph
./target/aarch64-apple-darwin/release/oxigraph:
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 2000.63.0)
        /nix/store/xvmhkpvfvmy4sfdkqwg9inq3qkpnx81b-libiconv-109.100.2/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
bash-5.3$
23:52:04
10 May 2026
@emilazy:matrix.orgemily is rcodesign happy with the code signature? 00:03:15
@tnias:stratum0.orgtnias

I used the rcodesign from nixpkgs and it seems unhappy.

[nix-shell:~/nixpkgs/source]$ rcodesign verify ./target/aarch64-apple-darwin/release/oxigraph
(the verify command is known to be buggy and gives misleading results; we highly recommend using Apple's tooling until this message is removed)
no cryptographic signature present
Error: problems reported during verification
00:06:31
@emilazy:matrix.orgemily hmm I don't know if it can check ad hoc codesignatures (and I'm guessing you don't have /usr/bin/codesign) 00:12:53
@tnias:stratum0.orgtnias

Ohh, I have that. And it is not unhappy?

tnias@darwin01 ~/nixpkgs (git)-[master] % /usr/bin/codesign -v source/target/aarch64-apple-darwin/release/oxigraph
tnias@darwin01 ~/nixpkgs (git)-[master] % echo $?
0
00:25:40
@emilazy:matrix.orgemilyyeah, so something else00:30:18
@emilazy:matrix.orgemily are you sure your LLDB syntax is right? I'm not fluent in LLDB but error: executable doesn't exist: '(empty)' seems suspicious 00:30:36
@tnias:stratum0.orgtnias

process launch works on linux. I got it from the official lldb tutorial (https://lldb.llvm.org/use/tutorial.html)

Plus, gdb did not work either.

I only tried lldb, because I thought it is the debugger used by apple.

00:34:57
@emilazy:matrix.orgemily does log stream show anything weird come up when you try to run the binary? 00:36:48
@tnias:stratum0.orgtnias
tnias@darwin01 ~/nixpkgs (git)-[master] % /usr/bin/log stream
log: Must be admin to run 'stream' command
00:40:54
@emilazy:matrix.orgemilyoops 🫣00:41:12
@emilazy:matrix.orgemilyI shouldn't get distracted investigating this locally right now unfortunately, but if you ping @NixOS/darwin-maintainers there'll probably be someone who can help look at the crash in a debugger locally00:41:58
@reckenrode:matrix.orgRandy Eckenrode … why does process substitution cause the Swift wrapper to invoke clang with Swift args? :( 00:42:16
@tnias:stratum0.orgtniasOkay, probably tomorrow. I should get some sleep. Thanks for help :)00:43:56
@reckenrode:matrix.orgRandy EckenrodeFigured something out (see https://matrix.to/#/!NCejdJnMqkOsqKZZbg:matrix.org/$-HWc0ClXU6zEi-nCL1b-e7ZkHwbVC_zcX78IqfJhHbw?via=matrix.org&via=tchncs.de&via=awau.uk).00:59:37
@tt:zirco.dev@tt:zirco.dev joined the room.23:47:22
11 May 2026
@viraptor:tchncs.deviraptorJust coming back to prepare for the post-release changes for the swift build / xcodebuild... and the whole signing situation is depressing. Sigtool is closest to upstream but needs a few updates, has been dead for years and uses c++ (personal yuck). Rcodesign has some movement, but is effectively also on life support - the maintainer wrote a post about stepping back from things. Whatever I choose, it smells like a fork long-term 😒 A new project probably doesn't make sense.10:30:31
@lorne:cons.org.nzlornejust for some historical context: c++ was for minimizing dependencies in stdenv bootstrap (c would also have worked)10:36:17
@viraptor:tchncs.deviraptor
In reply to @lorne:cons.org.nz
just for some historical context: c++ was for minimizing dependencies in stdenv bootstrap (c would also have worked)
That makes sense. So it's your project (guessing from the profile picture)? Would you be up for merging some fixes or some form of collaboration? Or are you done with sigtool?
The changes are not huge, but swiftbuild has some bundle signing expectations.
10:40:29
@lorne:cons.org.nzlorneoh, yeah, I switched matrix accounts to something self hosted instead of the main matrix.org server10:41:39

Show newer messages


Back to Room ListRoom Version: 6