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

gnuplot_qt: fix on darwin #82815

Merged
merged 1 commit into from Apr 1, 2020
Merged

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Mar 17, 2020

Motivation for this change

Fix build [1] and use wrapQtApp to help with #65399 (Qt's mkDerivation doesn't seem to be enough in this case)

[1] https://hydra.nixos.org/job/nixpkgs/trunk/gnuplot_qt.x86_64-darwin

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's exactly causing the issue, but a sandboxed build segfaults.

EDIT: it's probably icudt62l.dat

/nix/store/87537gagq5qz84zrllgl25c3gmgc5vw7-qtbase-5.12.7-dev/bin/moc -o qtterminal/moc_QtGnuplotEvent.cpp qtterminal/QtGnuplotEvent.h
/nix/store/87537gagq5qz84zrllgl25c3gmgc5vw7-qtbase-5.12.7-dev/bin/rcc -name QtGnuplotResource -o qtterminal/qrc_QtGnuplotResource.cpp qtterminal/QtGnuplotResource.qrc
lrelease qtterminal/po/qtgnuplot_fr.ts -qm qtgnuplot_fr.qm
make[4]: *** [Makefile:1271: qtgnuplot_fr.qm] Segmentation fault: 11
kernel: (Sandbox) Sandbox: lrelease(93102) deny(1) file-read-data /Library/Preferences/.GlobalPreferences.plist
kernel: (Sandbox) Sandbox: lrelease(93102) deny(1) file-read-data /private/etc/passwd
kernel: (Sandbox) Sandbox: lrelease(93102) deny(1) file-read-metadata /private/etc/passwd
kernel: (Sandbox) Sandbox: lrelease(93102) deny(1) file-read-metadata /private/var/db/timezone/zoneinfo
kernel: (Sandbox) Sandbox: lrelease(93102) deny(1) file-read-metadata /usr/share/icu/icudt62l.dat

@veprbl
Copy link
Member Author

veprbl commented Mar 24, 2020

EDIT: it's probably icudt62l.dat

Yes, I can confirm that adding /usr/share/icu/icudt62l.dat to extra-sandbox-paths fixes the build.

Unfortunately, I don't think we can do much about this on our side:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation      	0x00007fff5356ddc0 CFNumberFormatterCreateStringWithValue + 107
1   libQt5Core.5.dylib            	0x000000010d4ab23d QSystemLocale::query(QSystemLocale::QueryType, QVariant) const + 1213
2   libQt5Core.5.dylib            	0x000000010d45d79c QLocalePrivate::updateSystemPrivate() + 1004
3   libQt5Core.5.dylib            	0x000000010d462bb4 QLocale::system() + 116
4   lrelease                      	0x000000010d313681 0x10d312000 + 5761
5   libdyld.dylib                 	0x00007fff7f4583d5 start + 1

@veprbl veprbl merged commit b31f8d9 into NixOS:master Apr 1, 2020
@veprbl veprbl deleted the pr/gnuplot_qt_darwin_fix branch April 1, 2020 20:25
@veprbl veprbl restored the pr/gnuplot_qt_darwin_fix branch December 1, 2020 16:47
@veprbl veprbl deleted the pr/gnuplot_qt_darwin_fix branch December 1, 2020 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants