Skip to content

darwin x11/opengl: only copy subset of pkgconfigs#1165

Closed
kowey wants to merge 1 commit intoNixOS:masterfrom
kowey:kowey-macosx-pango
Closed

darwin x11/opengl: only copy subset of pkgconfigs#1165
kowey wants to merge 1 commit intoNixOS:masterfrom
kowey:kowey-macosx-pango

Conversation

@kowey
Copy link
Contributor

@kowey kowey commented Nov 3, 2013

Copy only the pc files related to X11 and OpenGL.

This should allow us to build our own version of libraries like
cairo without having the native ones be accidentally dynamically
linked in to things that depend on them.

Before this patch if we dyldinfo -dylibs libpangocairo we can
see that it was dynamically linked against the OS X (but seemingly
built against include files from the nix one, as we would get a
runtime complaint about missing symbols)


This fixes an issues I was experiencing where if I ran graphviz from a GUI app (but not when I ran it from the terminal), I would get a complaint like this:

dyld: lazy symbol binding failed: Symbol not found: _cairo_quartz_font_face_create_for_cgfont
Referenced from: /nix/store/xbbaz0qyjcqp0pgnhw6akdwnws74b2yr-pango-1.32.5/lib/libpangocairo-1.0.0.dylib
Expected in: flat namespace

dyld: Symbol not found: _cairo_quartz_font_face_create_for_cgfont
Referenced from: /nix/store/xbbaz0qyjcqp0pgnhw6akdwnws74b2yr-pango-1.32.5/lib/libpangocairo-1.0.0.dylib
Expected in: flat namespace

And further inspection of that dylib would reveal /usr/X11/lib/libcairo…

Copy only the pc files related to X11 and OpenGL.

This should allow us to build our own version of libraries like
cairo without having the native ones be accidentally dynamically
linked in to things that depend on them.

Before this patch if we `dyldinfo -dylibs libpangocairo` we can
see that it was dynamically linked against the OS X (but seemingly
built against include files from the nix one, as we would get a
runtime complaint about missing symbols)
@vcunat
Copy link
Member

vcunat commented Nov 5, 2013

This looks a good idea. Many things on darwin were done very hastily, and it causes problem. I suppose there could be many other packages under /usr/X11.

Let's test it together with #1160 in x-updates (which has closer config to master than stdenv-updates).

vcunat pushed a commit that referenced this pull request Nov 5, 2013
Copy only the pc files related to X11 and OpenGL.

This should allow us to build our own version of libraries like
cairo without having the native ones be accidentally dynamically
linked in to things that depend on them.

Before this patch if we `dyldinfo -dylibs libpangocairo` we can
see that it was dynamically linked against the OS X (but seemingly
built against include files from the nix one, as we would get a
runtime complaint about missing symbols)
@vcunat vcunat closed this in 1be6aae Nov 7, 2013
@kowey kowey deleted the kowey-macosx-pango branch November 7, 2013 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants