[MacPorts] #17558: connection errors when macports libs are used with Tiger X11 headers

MacPorts noreply at macports.org
Tue Jan 6 20:54:44 PST 2009


#17558: connection errors when macports libs are used with Tiger X11 headers
----------------------------------+-----------------------------------------
  Reporter:  vinc17@…             |       Owner:  jeremyhu@…           
      Type:  defect               |      Status:  reopened             
  Priority:  High                 |   Milestone:  Port Bugs            
 Component:  ports                |     Version:  1.6.0                
Resolution:                       |    Keywords:  crash                
      Port:  xorg                 |  
----------------------------------+-----------------------------------------

Comment(by david@…):

 Replying to [comment:45 jeremyhu@…]:
 > so in summary:
 >   * Make a symlink for /Developer/SDKs/MacOSX10.4u.sdk/usr/X11
 >   * x11prefix /usr/X11R6
 >   * universal_sysroot /Developer/SDKs/MacOS10.4u.sdk
 >   * +universal
 >   * Try changing your build order to only keep imake installed for the
 ports that explicitly depend on it.

 Thanks for the help. The steps above didn't work. I started with a fresh
 checkout of MacPorts r44970 configured this way:

 {{{
 ./configure --prefix=/opt/local-test --with-tclpackage=/Library/Tcl
 /macports-test --with-universal-target=10.4 --with-universal-
 sysroot=/Developer/SDKs/MacOSX10.4u.sdk --with-x11-prefix=/usr/X11R6
 }}}

 I added {{{+universal}}} to /opt/local-test/etc/macports/variants.conf. In
 /Developer/SDKs/MacOSX10.4u.sdk I ran {{{sudo ln -s X11R6 X11}}}. Then

 {{{
 cd /usr/X11/bin
 sudo mv xmkmf xmkmf.bak
 sudo mv imake imake.bak
 }}}

 {{{which xmkmf imake}}} gives no results.

 I configured the /opt/local-test installation to use the modified ports
 tree I use for building releases, except that I took out the --x-includes
 and --x-libraries stuff. I didn't want to complicate the test but without
 the patch cairo doesn't honor important universal flags like -isysroot and
 will link against the 10.5 SDK regardless. (To see the patch I used, run
 {{{svn cat
 svn://svn.insecure.org/zenmap/install_scripts/macosx/macports-1.8.0-universal.diff@11598}}}
 and remove the --x-includes and --x-libraries bits.)

 Finally I ran {{{sudo /opt/local-test/bin/port -d install gtk2}}}.
 (Actually I did this twice. The first time I forgot to patch cairo, so had
 to remove cairo and build again.) gtk2 quit in a failure I haven't seen
 before:

 {{{
 libtool: compile:  /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I../..
 -DG_LOG_DOMA
 IN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk
 -DG_DISABLE_CAST_CH
 ECKS -D_REENTRANT -I/opt/local-test/include/glib-2.0 -I/opt/local-
 test/lib/glib-
 2.0/include -I/opt/local-test/include -I/opt/local-test/include/pango-1.0
 -I/opt
 /local-test/include/cairo -I/opt/local-test/include/pixman-1 -I/opt/local-
 test/include/freetype2 -I/opt/local-test/include/libpng12
 -I/usr/X11/include -I/opt/lo
 cal-test/include -no-cpp-precomp -DX_LOCALE -isysroot
 /Developer/SDKs/MacOSX10.5
 .sdk -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES
 -DGDK_PIXBUF_DISA
 BLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/usr/X11/include
 -DGDK_PIXBU
 F_DISABLE_DEPRECATED -O2 -funroll-loops -fstrict-aliasing -isysroot
 /Developer/S
 DKs/MacOSX10.5.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4 -Wall -c
 gdkev
 ents-x11.c  -fno-common -DPIC -o .libs/gdkevents-x11.o
 gdkevents-x11.c: In function 'gdk_event_translate':
 gdkevents-x11.c:2110: error: 'RRNotify' undeclared (first use in this
 function)
 gdkevents-x11.c:2110: error: (Each undeclared identifier is reported only
 once
 gdkevents-x11.c:2110: error: for each function it appears in.)
 ...
 }}}

 But apart from that, cairo, pango, and gtk2 all link against the /usr/X11
 libraries and libXau.dylib in particular. Here are excerpts from the build
 log:

 {{{
 --->  Configuring cairo
 ...
 checking for X... libraries /usr/X11/lib, headers
 ...
 --->  Configuring pango
 ...
 DEBUG: Environment: CFLAGS='-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
 -arch ppc -arch i386 -mmacosx-version-min=10.4' CPPFLAGS='-I/opt/local-
 test/include -no-cpp-precomp -isysroot /Developer/SDKs/MacOSX10.4u.sdk'
 CXXFLAGS='-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch
 i386 -mmacosx-version-min=10.4' MACOSX_DEPLOYMENT_TARGET='10.4'
 CPP='/usr/bin/cpp-4.0' CXX='/usr/bin/g++-4.0' F90FLAGS='-O2'
 LDFLAGS='-L/opt/local-test/lib -no-undefined -bind_at_load
 -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
 -arch ppc -arch i386 -mmacosx-version-min=10.4' FCFLAGS='-O2'
 OBJC='/usr/bin/gcc-4.0' INSTALL='/usr/bin/install -c' OBJCFLAGS='-O2'
 FFLAGS='-O2' CC='/usr/bin/gcc-4.0'
 DEBUG: Assembled command: 'cd "/opt/local-test/var/macports/build
 /_Users_david_macports-sources_ports.test_x11_pango/work/pango-1.22.4" &&
 ./configure --prefix=/opt/local-test --enable-static --disable-dependency-
 tracking'
 ...
 }}}

 And otool verifies that they are linked with libXau.dylib.

 I'll try your suggestion from comment 46. Am I supposed to put that code
 in the portfiles in place of --x-includes and --x-libraries?

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


More information about the macports-tickets mailing list