Skip to content

fontconfig: Add CoreFoundation to buildInputs#98379

Merged
veprbl merged 2 commits intoNixOS:stagingfrom
hannesweisbach:fontconfig
Mar 21, 2021
Merged

fontconfig: Add CoreFoundation to buildInputs#98379
veprbl merged 2 commits intoNixOS:stagingfrom
hannesweisbach:fontconfig

Conversation

@hannesweisbach
Copy link
Contributor

Motivation for this change

fontconfig depends on CoreFoundation, but did not have CoreFoundation in its buildInputs. This built fine, but resulted in a dylib with a non-absolute rpath as reference:

otool -L /nix/store/zy90l8cw2qj316xdadhmpf9i3wyisn4g-fontconfig-2.13.92-lib/lib/libfontconfig.dylib
/nix/store/zy90l8cw2qj316xdadhmpf9i3wyisn4g-fontconfig-2.13.92-lib/lib/libfontconfig.dylib:
	/nix/store/zy90l8cw2qj316xdadhmpf9i3wyisn4g-fontconfig-2.13.92-lib/lib/libfontconfig.1.dylib (compatibility version 14.0.0, current version 14.0.0)
	/nix/store/j7m6j79aw01gs1kqiv7n8gdgaj3kdjdn-freetype-2.10.2/lib/libfreetype.6.dylib (compatibility version 24.0.0, current version 24.2.0)
	/nix/store/ik820r3rrfr7x7k1iyc6w9xj6mhinynm-bzip2-1.0.6.0.1/lib/libbz2.1.dylib (compatibility version 2.0.0, current version 2.6.0)
	/nix/store/xr4cvl6blqrs6vwklnigpb43h4jqz04k-libpng-apng-1.6.37/lib/libpng16.16.dylib (compatibility version 54.0.0, current version 54.0.0)
	/nix/store/jmbhjg7yzgpxbhvj87n3svkqsvdvmbi7-zlib-1.2.11/lib/libz.dylib (compatibility version 1.0.0, current version 1.2.11)
	/nix/store/bqhgv3ppas6gbdpspb9yqdfshspb9rkd-expat-2.2.8/lib/libexpat.1.dylib (compatibility version 8.0.0, current version 8.10.0)
	/nix/store/bpfk6g2y6a7jilf55p08pbdajjq6ha2p-gettext-0.20.1/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.6.0)
	@rpath/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1454.90.0)
	/nix/store/bwny9pyjhghmv8jq5836ms422iwiqi5l-Libsystem-osx-10.12.6/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

With CoreFoundation as buildInput the dylib has only absolute paths to references:

otool -L /nix/store/n1c1ghp21c0n7c5a8vc4fqjmaysyvgfr-fontconfig-2.13.92-lib/lib/libfontconfig.dylib
/nix/store/n1c1ghp21c0n7c5a8vc4fqjmaysyvgfr-fontconfig-2.13.92-lib/lib/libfontconfig.dylib:
	/nix/store/n1c1ghp21c0n7c5a8vc4fqjmaysyvgfr-fontconfig-2.13.92-lib/lib/libfontconfig.1.dylib (compatibility version 14.0.0, current version 14.0.0)
	/nix/store/slm1f903cz47r2hi8v543mj3fcakvwrc-freetype-2.10.2/lib/libfreetype.6.dylib (compatibility version 24.0.0, current version 24.2.0)
	/nix/store/bafwypxc11wp51phssmh9h6vqmwzmnxf-bzip2-1.0.6.0.1/lib/libbz2.1.dylib (compatibility version 2.0.0, current version 2.6.0)
	/nix/store/0hr8d4x5w1046a6mcwgfnyj85f7ylf8g-libpng-apng-1.6.37/lib/libpng16.16.dylib (compatibility version 54.0.0, current version 54.0.0)
	/nix/store/ilrm722frr4fb3096wjc6wbspdf7pgyr-zlib-1.2.11/lib/libz.dylib (compatibility version 1.0.0, current version 1.2.11)
	/nix/store/cjflr1cvpkq74ln7j2qndri3a5513797-expat-2.2.8/lib/libexpat.1.dylib (compatibility version 8.0.0, current version 8.10.0)
	/nix/store/vrxrz8fqi2cmv0z7kxfza2nycbbbkh1k-gettext-0.21/lib/libintl.8.dylib (compatibility version 11.0.0, current version 11.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)
	/nix/store/hw4x6gakgd43f13zys92ng0hj0acisls-Libsystem-osx-10.12.6/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

Fixes (at least in part) #98203

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.

@jtojnar jtojnar added the 9.needs: port to stable A PR needs a backport to the stable release. label Sep 21, 2020
@jtojnar jtojnar added this to the 20.09 milestone Sep 21, 2020
Get rid of non-absolute RPATH reference to CoreFoundation
@jtojnar jtojnar added the 6.topic: darwin Running or building packages on Darwin label Sep 21, 2020
@ofborg ofborg bot requested a review from vcunat September 21, 2020 08:20
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Sep 21, 2020
@prusnak
Copy link
Member

prusnak commented Dec 19, 2020

Since this will trigger a massive rebuild on Darwin, this should be targeted on staging branch, right @jtojnar ?
(Not sure what the policy is for darwin)

@jtojnar jtojnar changed the base branch from master to staging December 19, 2020 17:48
@FRidh FRidh modified the milestones: 20.09, 21.03 Dec 20, 2020
@veprbl veprbl merged commit 869b109 into NixOS:staging Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 9.needs: port to stable A PR needs a backport to the stable release. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants