!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
24 Oct 2025
@reckenrode:matrix.orgRandy EckenrodeDoes upstream Firefox link against the system libc++?11:14:36
@ihar.hrachyshka:matrix.orgIhar Hrachyshka

firefox-bin-unwrapped: (their build)

otool -L result/Applications/Firefox.app/Contents/MacOS/firefox
result/Applications/Firefox.app/Contents/MacOS/firefox (architecture x86_64):
	@rpath/libmozglue.dylib (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 3502.1.255)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1900.180.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)
result/Applications/Firefox.app/Contents/MacOS/firefox (architecture arm64):
	@rpath/libmozglue.dylib (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 3502.1.255)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1900.180.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)
11:16:43
@ihar.hrachyshka:matrix.orgIhar Hrachyshka

our build:

otool -L result/Applications/Firefox.app/Contents/MacOS/firefox
result/Applications/Firefox.app/Contents/MacOS/firefox:
	@rpath/libmozglue.dylib (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 3502.1.255)
	/nix/store/jl1421wiawqdgasrqqwd4d4jznvimfma-gettext-0.25.1/lib/libintl.8.dylib (compatibility version 13.0.0, current version 13.4.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1900.180.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)
11:17:27
@reckenrode:matrix.orgRandy EckenrodeThey both are. I hope it’s not that change then.11:19:40
@ihar.hrachyshka:matrix.orgIhar Hrachyshka

I have an alternative path to explore (adding a lot of debug messages in their png encoder to catch what happens there) but I'm lazy and want to bisect first. The crash is from access to an invalid memory address, and the code in question is:

void nsPNGEncoder::ConvertHostARGBRow(const uint8_t* aSrc, uint8_t* aDest,
                                      uint32_t aPixelWidth,
                                      bool aUseTransparency) {
  uint32_t pixelStride = aUseTransparency ? 4 : 3;
  for (uint32_t x = 0; x < aPixelWidth; x++) {
    const uint32_t& pixelIn = ((const uint32_t*)(aSrc))[x];
    uint8_t* pixelOut = &aDest[x * pixelStride];

    uint8_t alpha = (pixelIn & 0xff000000) >> 24;
    pixelOut[pixelStride - 1] = alpha;  // overwritten below if pixelStride == 3

The last line crashes. Either pixelOut is null, or the caller passes a non-transparent buffer (3-bytes per pixel while also requesting transparency).

Initially thought it's the new 144 version but 1) their crash reporter database caught some failures on 140 and 2) no relevant changes in the PNG encoder code of theirs that I could spot.

11:33:41
@alexfmpe:matrix.orgalexfmpeI wonder if rosetta 2 can/should be worked into stdenv.*Platform.{canExecute, selectEmulator}16:35:30
@alexfmpe:matrix.orgalexfmpeor it's best called 'outside' for the whole nix-build process16:36:09
@prince213:matrix.orgprince213I think it can16:47:50
@prince213:matrix.orgprince213I saw an example before16:47:55
@reckenrode:matrix.orgRandy EckenrodeIt is possible to set it up as an emulator in nixpkgs. I have started to do it a few times then stopped because it seems pointless.16:49:02
@reckenrode:matrix.orgRandy Eckenrode Not many things use emulators. canExecute is not about emulation, so it doesn’t help with tests when cross-compiling. 16:50:01
@reckenrode:matrix.orgRandy EckenrodeIntel support in nixpkgs is (very probably) being dropped for 26.11, which likely means July next year. It doesn’t seem worth the effort to develop new features for Intel or Rosetta 2 just to remove them after 26.05 is released.16:52:54
@alexfmpe:matrix.orgalexfmpeoh I thought it would last a couple more years16:55:38
@alexfmpe:matrix.orgalexfmpeyeah not much point to add something after 25.11 that gets dropped by 26.05 lol16:56:07
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/NixOS/nixpkgs/pull/41556616:56:40
@reckenrode:matrix.orgRandy EckenrodemacOS 27 is dropping hardware support. macOS 28 is dropping Rosetta 2 except for some unspecified compatibility intended for games.16:57:37
@reckenrode:matrix.orgRandy EckenrodeThe ecosystem appears to be running away from it already.16:57:54
@reckenrode:matrix.orgRandy EckenrodeRust demoted it to tier 2. The GitHub runner was pulled then restored, but it is limited to macOS 15. Who knows for how long. Once it’s gone, Intel support will probably start bitrotting.16:59:23
@reckenrode:matrix.orgRandy EckenrodeFrom the nixpkgs side, x86_64-darwin is the slowest platform to build. Being able to drop it will free up builders to build aarch64-darwin, which should make cycles go faster.17:00:23
@eexist:matrix.orgstderr joined the room.18:00:15
@esperlily:matrix.orgEsperLily [she/her]

the name looks right, although i suppose i didn't actually check to make sure there wasn't some hidden character or some typo i just didn't see. i really don't know why xcrun is printing a warning about that with the nixpkgs SDK when the Xcode SDK has what looks like the exact same key. Does Swift Build care about that particular key?

My bigger concern is what I mentioned in the Nixpkgs / NixOS contributions room, which is that when I try to use Xcode to build a project with the nixpkgs SDK (not Xcode-in-nixpkgs but /usr/bin/xcodebuild, though I don't know if it actually makes a difference), I end up with what looks like a neverending stream of these warnings, several per second, with no other output. I don't know if the warning itself is actually a problem here or if there's some other reason why Xcode doesn't seem to actually be doing anything except printing these warnings

20:08:59
@emilazy:matrix.orgemily /usr/bin/xcodebuild will probably indirect through $DEVELOPER_DIR? 20:18:41
@emilazy:matrix.orgemily so is probably calling into xcbuild.xcrun etc. 20:18:54
@esperlily:matrix.orgEsperLily [she/her] /usr/bin/xcrun produces the same warning 20:19:24
@esperlily:matrix.orgEsperLily [she/her] oh wow what, /usr/bin/xcrun actually invokes xcbuild.xcrun? 20:20:19
@emilazy:matrix.orgemily everything in /usr/bin is just a stub that looks up the current developer directory 20:20:33
@esperlily:matrix.orgEsperLily [she/her] but xcrun -find xcrun doesn't find anything 20:20:33
@esperlily:matrix.orgEsperLily [she/her]yeah it's a stub that looks it up with the xcrun machinery. xcrun should be the one thing that isn't a stub20:20:46
@emilazy:matrix.orgemily
shion:/v/f/1/j/T/tmp.KkX7NHuPxH
❭ mkdir -p usr/bin

shion:/v/f/1/j/T/tmp.KkX7NHuPxH
❭ cat >usr/bin/xcrun
#!/usr/bin/env bash
echo oops

shion:/v/f/1/j/T/tmp.KkX7NHuPxH
❭ chmod +x usr/bin/xcrun

shion:/v/f/1/j/T/tmp.KkX7NHuPxH
❭ DEVELOPER_DIR=(pwd) /usr/bin/xcrun
oops
20:21:50
@emilazy:matrix.orgemily I think it recurses if there's another xcrun. 20:22:08

Show newer messages


Back to Room ListRoom Version: 6