[MacPorts] #15569: Use --x-includes and --x-libraries in certain ports to build against the 10.4u SDK X11 libraries

MacPorts noreply at macports.org
Tue Jun 10 14:06:09 PDT 2008


#15569: Use --x-includes and --x-libraries in certain ports to build against the
10.4u SDK X11 libraries
------------------------------------+---------------------------------------
  Reporter:  david at bamsoftware.com  |       Owner:  macports-tickets at lists.macosforge.org
      Type:  defect                 |      Status:  new                                  
  Priority:  Normal                 |   Milestone:  Port Enhancements                    
 Component:  ports                  |     Version:  1.7.0                                
Resolution:                         |    Keywords:                                       
------------------------------------+---------------------------------------
Comment (by david at bamsoftware.com):

 Replying to [comment:4 afb at macports.org]:
 > Hmm, this wasn't a problem before when everything used /usr/X11R6 for
 x11prefix but you are right in that it will be when using different ones
 for Leopard/Tiger...
 >
 > `/Developer/SDKs/MacOSX10.4u.sdk` should not be in the prefix, though.
 The reason it fails to link is because it couldn't find /usr/X11 in the
 Tiger installation.

 What about libXau? That's not on 10.4 anyway, right? It seems that linking
 against /usr/X11R6 on 10.5 makes the application incompatible with 10.4,
 while linking against the 10.4u SDK makes it compatible with both 10.4 and
 10.5.

 I tried building another MacPorts installation in /opt/local-x11,
 configured as above except with {{{--with-x11-prefix=/usr/X11R6}}}
 (without this option the x11prefix will be /usr/X11).

 Without the included patch, cairo, pango, and xrender link against the
 libraries in /usr/X11:

 {{{
 checking for X... libraries /usr/X11/lib, headers /usr/X11/include
 ...
  /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I. -I/opt/local-x11/include
 -isysroot
  /Developer/SDKs/MacOSX10.4u.sdk -I/opt/local-x11/include
 -I/usr/X11/include -DX
 THREADS -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
 -mmac
 osx-version-min=10.4 -c Color.c  -fno-common -DPIC -o .libs/Color.o
 }}}

 And things link against libXau:

 {{{
 $ otool -L /opt/local-x11/lib/libXrender.dylib
 /opt/local-x11/lib/libXrender.dylib:
         /opt/local-x11/lib/libXrender.1.dylib (compatibility version
 5.0.0, current version 5.0.0)
         /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current
 version 9.0.0)
         /usr/X11/lib/libXau.6.dylib (compatibility version 7.0.0, current
 version 7.0.0)
         /usr/X11/lib/libXdmcp.6.dylib (compatibility version 7.0.0,
 current version 7.0.0)
         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 111.0.0)
 }}}

 After uninstalling everything and applying the patch, libraries are found
 in /usr/X11R6:

 {{{
 checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
 ...
  /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I. -I/opt/local-x11/include
 -isysroot
  /Developer/SDKs/MacOSX10.4u.sdk -I/opt/local-x11/include
 -I/usr/X11R6/include -
 DXTHREADS -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch
 i386 -mm
 acosx-version-min=10.4 -c Color.c  -fno-common -DPIC -o .libs/Color.o
 }}}

 But things still link against libXau in /usr/X11:

 {{{
 $ otool -L /opt/local-x11/lib/libXrender.dylib
 /opt/local-x11/lib/libXrender.dylib:
         /opt/local-x11/lib/libXrender.1.dylib (compatibility version
 5.0.0, current version 5.0.0)
         /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current
 version 9.0.0)
         /usr/X11/lib/libXau.6.dylib (compatibility version 7.0.0, current
 version 7.0.0)
         /usr/X11/lib/libXdmcp.6.dylib (compatibility version 7.0.0,
 current version 7.0.0)
         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 111.0.0)
 }}}

 Additionally, I get this error, with or without the patch, so the build
 doesn't progress as far as gtk2:

 {{{
 ld: warning, duplicate dylib /opt/local-x11/lib/libz.1.dylib
 ld: warning, duplicate dylib /opt/local-x11/lib/libiconv.2.dylib
 ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
 collect2: ld returned 1 exit status
 ld: warning, duplicate dylib /opt/local-x11/lib/libz.1.dylib
 ld: warning, duplicate dylib /opt/local-x11/lib/libiconv.2.dylib
 ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib
 collect2: ld returned 1 exit status
 lipo: can't open input file: /var/tmp//ccSu2Oew.out (No such file or
 directory)
 make[4]: *** [libpangocairo-1.0.la] Error 1
 make[3]: *** [all-recursive] Error 1
 make[2]: *** [all] Error 2
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2

 Warning: the following items did not execute (for pango):
 org.macports.activate org.macports.build org.macports.destroot
 org.macports.install
 Error: The following dependencies failed to build: pango shared-mime-info
 libxml2 p5-xml-parser perl5.8 tiff
 Error: Status 1 encountered during processing.
 }}}

 So it seems that the universal_sysroot doesn't have an effect on where X11
 headers and libraries are found? Sorry for the long reply.

-- 
Ticket URL: <http://trac.macports.org/ticket/15569#comment:6>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list