Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#15816 closed defect (fixed)

gtk2 does not build on PowerPC because of glib2

Reported by: js-macports@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: gtk Cc: nox@…, wustenfuchs@…, m.heydtmann@…
Port:

Description

gtk2 does not build with (+x11)

In file included from updateiconcache.c:54:
gtkiconcachevalidator.c: In function 'check_pixel_data':
gtkiconcachevalidator.c:168: warning: pointer targets in passing argument 3 of 'gdk_pixdata_deserialize' differ in signedness
/bin/sh ../libtool --mode=link /usr/bin/gcc-4.0  -O2 -funroll-loops -fstrict-aliasing -Wall  -L/opt/local/lib -o gtk-update-icon-cache  updateiconcache.o ../gdk-pixbuf/libgdk_pixbuf-2.0.la 
/usr/bin/gcc-4.0 -O2 -funroll-loops -fstrict-aliasing -Wall -o .libs/gtk-update-icon-cache updateiconcache.o  -L/opt/local/lib ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/libtiff.dylib -lc /opt/local/lib/libjpeg.dylib /opt/local/lib/libpng12.dylib -lz -lm 
creating gtk-update-icon-cache
GDK_PIXBUF_MODULE_FILE=../gdk-pixbuf/gdk-pixbuf.loaders ./gtk-update-icon-cache --force --ignore-theme-index            \
           --source builtin_icons stock-icons > gtkbuiltincache.h.tmp &&        \
        mv gtkbuiltincache.h.tmp gtkbuiltincache.h
gtk-update-icon-cache: The generated cache was invalid.
make[2]: *** [gtkbuiltincache.h] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Warning: the following items did not execute (for gtk2): org.macports.destroot org.macports.build

Attachments (1)

patch-configure.diff (4.8 KB) - added by jjdanimoth@… 16 years ago.
Configure patch for glib2 that remove the problem

Download all attachments as: .zip

Change History (31)

comment:1 Changed 16 years ago by js-macports@…

Cc: js-macports@… added

Cc Me!

comment:2 Changed 16 years ago by js-macports@…

The problem seems to be that glib was built with the universal variant. It seems that some .h files include wrong information about the byte ordering then.

comment:3 Changed 16 years ago by jmroot (Joshua Root)

Cc: ryandesign@… added; js-macports@… removed
Owner: changed from macports-tickets@… to nox@…

Assigning to maintainer, and cc maintainer of glib2.

comment:4 in reply to:  2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to js-macports@webkeks.org:

The problem seems to be that glib was built with the universal variant. It seems that some .h files include wrong information about the byte ordering then.

I was worried this might happen. I'll see what I can do to fix it.

comment:5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

By the way, what OS version, Xcode version, MacPorts version and processor architecture do you have?

comment:6 Changed 16 years ago by js-macports@…

OS X 10.5.4, XCode 3, latest MacPorts, PPC

comment:7 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: gtk2 does not buildgtk2 does not build on PowerPC

I don't have a PowerPC Leopard machine, but I do have a Power Mac G4 and a MacBook Pro, both with Mac OS X 10.4.11 and Xcode 2.5. I can reproduce your issue on the Power Mac but not on the MacBook Pro. But the problem occurs whether or not glib2 is installed with the universal variant, so there must be a different reason. How did you determine glib2 +universal was the cause?

comment:8 Changed 16 years ago by js-macports@…

I tried debugging it, looked in the C files, found out the byte ordering is wrong, googled, found a mailing list posting where somebody also figured out the byte ordering is wrong and somebody answered that glib2 has problems with universal support, rebuilt glib without the universal flag and then it worked again. IIRC, I didn't have that problem on Tiger with the universal flag.

Is there any reason you can't try Leopard on the PowerMac G4? For me, it was even faster than Tiger on my iBook G4.

comment:9 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

I have now installed Leopard on my Power Mac (with the help of LeopardAssist). Even on Leopard, I can't get gtk2 to build, whether or not glib2 is universal. Also, glib2's glibconfig.h always contains "#define G_BYTE_ORDER G_LITTLE_ENDIAN" and associated conversion directives. Unless I misunderstand, that should be big endian for PowerPC, not little. I'll see if patching that fixes anything.

comment:10 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Someone has apparently developed a patch of glib2 and other ports which makes them universal but failed to inform us of this.........

comment:11 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: nox@… wustenfuchs@… added; ryandesign@… removed
Owner: changed from nox@… to ryandesign@…
Status: newassigned

Has duplicate #15866.

comment:12 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: gtk2 does not build on PowerPCgtk2 does not build on PowerPC because of glib2

The changelog for glib 2.17.3 (the development version, released a day after the stable version 2.16.4) mentions fixes for endian issues. Can you try deactivating glib2 and installing glib2-devel instead to see if that fixes the issue? Please "port sync" first because I just updated glib2-devel to this version.

comment:13 in reply to:  10 Changed 16 years ago by jmroot (Joshua Root)

Replying to ryandesign@macports.org:

Someone has apparently developed a patch of glib2 and other ports which makes them universal but failed to inform us of this.........

Looks like the author of comment:ticket:15569:3 would know something about that.

comment:14 Changed 16 years ago by wustenfuchs@…

( 2003 PowerBook G4 12" + OS-X 10.3.9 + XCode 1.5 + MacPorts 1.6.0 )

I tried with glib2-devel but was still no good.

comment:15 Changed 16 years ago by js-macports@…

As I said before, without the universal flag (for both, glib2 and gtk2), it works for me just fine.

comment:16 in reply to:  14 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jmr@macports.org:

Replying to ryandesign@macports.org:

Someone has apparently developed a patch of glib2 and other ports which makes them universal but failed to inform us of this.........

Looks like the author of comment:ticket:15569:3 would know something about that.

Right!

Replying to wustenfuchs@mac.com:

( 2003 PowerBook G4 12" + OS-X 10.3.9 + XCode 1.5 + MacPorts 1.6.0 )
I tried with glib2-devel but was still no good.

Thanks. I tried too on 10.5.4 PPC with Xcode 3.1 (iPhone SDK beta 8) and it didn't work there either.

Replying to js-macports@webkeks.org:

As I said before, without the universal flag (for both, glib2 and gtk2), it works for me just fine.

Then there must be a difference between your machine and mine, because it does not work for me regardless of whether I build glib2 universal or not. Could you attach your glib2 config.log?

comment:17 Changed 16 years ago by m.heydtmann@…

Cc: m.heydtmann@… added

Cc Me!

comment:18 Changed 16 years ago by jjdanimoth@…

Any news? I try to install gtk this morning and still have this problem. Thanks

comment:19 in reply to:  18 Changed 16 years ago by jjdanimoth@…

Replying to jjdanimoth@gmail.com:

Any news? I try to install gtk this morning and still have this problem. Thanks

I try the same packages on ArchLinux PPC, and I doesn't have this error. Maybe it could help? Here the link at the patches that they use: gtk2: http://www.archlinuxppc.org/packages/1528/ glib2: http://www.archlinuxppc.org/packages/1781/ ( click on View CVS entries ) Tomorrow I will try to use them, and recompile ( If I have understand how is made Portfile :P )

Thanks again

comment:20 Changed 16 years ago by js-macports@…

Yes, because ArchLinux does not have universal binaries. The problem only occours if glib is built as universal binary.

comment:21 in reply to:  20 Changed 16 years ago by jjdanimoth@…

Replying to js-macports@webkeks.org:

Yes, because ArchLinux does not have universal binaries. The problem only occours if glib is built as universal binary.

But I have the same problem if I build glib without the universal flag; I tried also with powerpc flag enabled, but without success. Is there any other option that can help me and other that have only a powerpc machine?

Many thanks

comment:22 Changed 16 years ago by jjdanimoth@…

Cc: jjdanimoth@… added

Cc Me!

comment:23 Changed 16 years ago by jjdanimoth@…

Cc: jjdanimoth@… removed

Cc Me!

Changed 16 years ago by jjdanimoth@…

Attachment: patch-configure.diff added

Configure patch for glib2 that remove the problem

comment:24 Changed 16 years ago by dizzpozable@…

I have the same problem on 10.4.11, Xcode 2.5 and MacPorts 1.600. gtk2 will not build with the following errors:

sudo port install gtk2
--->  Fetching gtk2
--->  Attempting to fetch gtk+-2.12.9.tar.bz2 from http://mandril.creatis.insa-lyon.fr/linux/gnome.org/sources/gtk+/2.12/
--->  Verifying checksum(s) for gtk2
--->  Extracting gtk2
--->  Applying patches to gtk2
--->  Configuring gtk2
--->  Building gtk2 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_gtk2/work/gtk+-2.12.9" && make all " returned error 2
Command output:    && rm -f gtk-media-next-rtl.png                              \
   && ln -s gtk-media-previous-ltr.png gtk-media-next-rtl.png   \
   && rm -f gtk-media-previous-rtl.png                          \
   && ln -s gtk-media-next-ltr.png gtk-media-previous-rtl.png   \
   && rm -f gtk-media-rewind-rtl.png                            \
   && ln -s gtk-media-forward-ltr.png gtk-media-rewind-rtl.png\
   && rm -f gtk-save.png                                        \
   && ln -s gtk-floppy.png gtk-save.png)                        \
done                                                            \
&& touch stamp-icons
make  gtk-update-icon-cache
if /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/opt/local/lib\" -DGTK_DATADIR=\"/opt/local/share\" -DGTK_DATA_PREFIX=\"/opt/local\" -DGTK_SYSCONFDIR=\"/opt/local/etc\" -DGTK_VERSION=\"2.12.9\" -DGTK_BINARY_VERSION=\"2.10.0\" -DGTK_HOST=\"powerpc-apple-darwin8.11.0\" -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file,cups\" -DGTK_PRINT_PREVIEW_COMMAND=\""evince --unlink-tempfile --preview --print-settings %s %f"\" -I../gtk -I.. -I../gdk -I../gdk -I../gdk-pixbuf -I../gdk-pixbuf -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DG_DISABLE_CAST_CHECKS -D_REENTRANT -DXTHREADS -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/cairo -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11R6/include -I/opt/local/include/pixman-1 -I/opt/local/include/atk-1.0        -I/opt/local/include -no-cpp-precomp -DX_LOCALE -I/usr/X11R6/include  -I/usr/X11R6/include  -O2 -funroll-loops -fstrict-aliasing -Wall -MT updateiconcache.o -MD -MP -MF ".deps/updateiconcache.Tpo" \
  -c -o updateiconcache.o `test -f 'updateiconcache.c' || echo './'`updateiconcache.c; \
then mv -f ".deps/updateiconcache.Tpo" ".deps/updateiconcache.Po"; \
else rm -f ".deps/updateiconcache.Tpo"; exit 1; \
fi
In file included from updateiconcache.c:54:
gtkiconcachevalidator.c: In function 'check_pixel_data':
gtkiconcachevalidator.c:168: warning: pointer targets in passing argument 3 of 'gdk_pixdata_deserialize' differ in signedness
/bin/sh ../libtool --mode=link /usr/bin/gcc-4.0  -O2 -funroll-loops -fstrict-aliasing -Wall  -L/opt/local/lib -o gtk-update-icon-cache  updateiconcache.o ../gdk-pixbuf/libgdk_pixbuf-2.0.la 
mkdir .libs
/usr/bin/gcc-4.0 -O2 -funroll-loops -fstrict-aliasing -Wall -o .libs/gtk-update-icon-cache updateiconcache.o  -L/opt/local/lib ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/libtiff.dylib -lc /opt/local/lib/libjpeg.dylib /opt/local/lib/libpng12.dylib -lz -lm 
creating gtk-update-icon-cache
GDK_PIXBUF_MODULE_FILE=../gdk-pixbuf/gdk-pixbuf.loaders ./gtk-update-icon-cache --force --ignore-theme-index            \
   --source builtin_icons stock-icons > gtkbuiltincache.h.tmp &&        \
mv gtkbuiltincache.h.tmp gtkbuiltincache.h
gtk-update-icon-cache: The generated cache was invalid.
make[2]: *** [gtkbuiltincache.h] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

Any help is appreciated and please let me know if more information is needed.

comment:25 in reply to:  24 Changed 16 years ago by dizzpozable@…

Replying to dizzpozable@gmail.com:

It's 10.4.11 PPC.

comment:26 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

@jjdanimoth: thank you very much for the patch. I was going to do something very similar. I'd just use __BIG_ENDIAN__ instead of __ppc__. I'm testing the patch now and assuming it resolves the issue I will commit it shortly.

comment:27 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

glib2 should be fixed in r38288.

comment:28 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

glib2-devel should be fixed in r38290.

comment:29 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

A bug report was already filed with the glib developers so we're done here.

comment:30 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.