This repository has been archived by the owner. It is now read-only.

BUG: prepend pixman's CPPFLAGS and LDFLAGS, fixing Issue 11036 #11042

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants

npinto commented Mar 19, 2012

See discussion at mxcl#11036

Contributor

2bits commented Mar 19, 2012

The build system, when you type ./configure --help gives you two override variables.

  pixman_CFLAGS
          C compiler flags for pixman, overriding pkg-config
  pixman_LIBS
          linker flags for pixman, overriding pkg-config

@jacknagel which is preferred, environment fixes on the configure command line, or prepending to flags?

Contributor

adamv commented Mar 19, 2012

Why is pkg-config providing the wrong values, assuming everything is being built by Homebrew in the first place?

Contributor

jacknagel commented Mar 19, 2012

Just setting the pixman_* variables would save couple of a fork-exec's, but in this context that doesn't really matter.

Either way, there needs to be a comment in the formula explaining why we are doing this, and why it has to be done before ENV.x11.

Contributor

jacknagel commented Mar 19, 2012

@adamv It's picking up the pixman from the ENV.x11, which was recently added.

Contributor

adamv commented Mar 19, 2012

Did we ever get brew doctor and brew --config from people affected by this?

Contributor

2bits commented Mar 19, 2012

see also #11049 where I suggest a fix using the freetype flags rather than ENV.x11

Contributor

2bits commented Mar 19, 2012

I just booted into 10.6.8, and I get the OP's error when the build finds /usr/X11/lib/libpixman-1.dylib rather than the our dep. I used --disable-silent-rules and made of gist so we can see the link command that fails.

Contributor

jacknagel commented Mar 20, 2012

I can reproduce it also.

Contributor

jacknagel commented Mar 20, 2012

Is this needed on Lion as well, or should it be made conditional for Snow Leopard and Leopard only?

Contributor

2bits commented Mar 20, 2012

To answer your question, on Lion I removed the ENV.x11 and it finds pixman and freetype ok with no extra flags, no appends, and nothing but ./configure. You can see from the deps are there:

$ otool -L /usr/local/Cellar/cairo/1.10.2/lib/libcairo.2.dylib
/usr/local/Cellar/cairo/1.10.2/lib/libcairo.2.dylib:
    /usr/local/Cellar/cairo/1.10.2/lib/libcairo.2.dylib (compatibility version 11003.0.0, current version 11003.2.0)
    /usr/local/lib/libpixman-1.0.24.4.dylib (compatibility version 25.0.0, current version 25.4.0)
    /usr/X11/lib/libfontconfig.1.dylib (compatibility version 6.0.0, current version 6.4.0)
    /usr/X11/lib/libfreetype.6.dylib (compatibility version 14.0.0, current version 14.2.0)
    /usr/X11/lib/libpng15.15.dylib (compatibility version 20.0.0, current version 20.0.0)
    /usr/X11/lib/libxcb-shm.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/X11/lib/libxcb-render.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/X11/lib/libxcb.1.dylib (compatibility version 3.0.0, current version 3.0.0)
    /usr/X11/lib/libXrender.1.dylib (compatibility version 5.0.0, current version 5.0.0)
    /usr/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 41.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.19.0)

I can't determine why the ENV.x11 was added for Lion, as I don't require it.
The ENV.x11 causes errors with libsvg on Lion.
The ENV.x11 causes errors with Pixman on Snow Lep.

Contributor

adamv commented Mar 20, 2012

Ok, let's remove ENV.x11. Sorry I added it.

Contributor

2bits commented Mar 20, 2012

Cairo is complex. It has several rendering engines, X11lib, GL, Quartz, XCB. When we configure with the --enable-xcb-shm, we get this warning:

--- The XCB surface backend feature is still under active development and is
--- included in this release only as a preview. It does NOT fully work yet
--- and incompatible changes may yet be made to XCB surface backend specific
--- API.

That is likely a cause of some of the user comlaints about non-rendered items.
So I have been trying to run the tests to get some idea of what works. They really fail hard.
After I enabled more configure options we don't use, I got much further in the tests:

    depends_on 'glew' unless MacOS.leopard?

    unless MacOS.leopard?
      args << '--enable-xcb' << '--enable-gl=auto' << '--enable-quartz-image'
    end

With no other flags or appends or ENV.x11, these args compile for me on Lion and Snow Lep,
and I get test results that tell me we should probably disable the xcb-shm, and openGL, maybe
choose to enable-quartz-image.

We will benefit if we contact cairo on their dev list and ask which combination of rendering backends
is most likely to function on OSX. Though I don't have my testbed correctly setup to test pdf, ps, or svg,
I think we can accept some of the FAILS are correct. Here are the results: https://gist.github.com/2140915

Contributor

2bits commented Mar 20, 2012

And here is the formula I'm using to test with.

jacknagel added a commit that referenced this pull request Mar 20, 2012

cairo: remove ENV.x11
This causes configure to pick the wrong libpixman on at least 10.6, and
issues with SVG on at least 10.7. So remove it, and we'll try to fix any
remaining issues with a different approach, e.g. special ENV vars for
freetype.

cf #11036, #11042, #11049.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Contributor

jacknagel commented Mar 20, 2012

Removed ENV.x11 in 4c3cee0. Though improvements to the cairo formula are certainly welcome.

If any issues remain, we can fix them using the ENV vars provided by configure.

@jacknagel jacknagel closed this Mar 20, 2012

staticfloat added a commit to staticfloat/homebrew that referenced this pull request Mar 26, 2012

cairo: remove ENV.x11
This causes configure to pick the wrong libpixman on at least 10.6, and
issues with SVG on at least 10.7. So remove it, and we'll try to fix any
remaining issues with a different approach, e.g. special ENV vars for
freetype.

cf #11036, #11042, #11049.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>

Sharpie pushed a commit to Sharpie/homebrew that referenced this pull request Sep 12, 2012

cairo: remove ENV.x11
This causes configure to pick the wrong libpixman on at least 10.6, and
issues with SVG on at least 10.7. So remove it, and we'll try to fix any
remaining issues with a different approach, e.g. special ENV vars for
freetype.

cf #11036, #11042, #11049.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>

snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this pull request Dec 17, 2012

cairo: remove ENV.x11
This causes configure to pick the wrong libpixman on at least 10.6, and
issues with SVG on at least 10.7. So remove it, and we'll try to fix any
remaining issues with a different approach, e.g. special ENV vars for
freetype.

cf #11036, #11042, #11049.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.