Opened 7 years ago

Closed 7 years ago

#55922 closed defect (fixed)

gtk3 @3.22.28 fails to build on PPC Leopard, Mac OS X 10.5.8, because of "ld: illegal text-relocation to cstring in deprecated/.libs/libgdk_3_la-gdkcolor.o from _gdk_color_copy in deprecated/.libs/libgdk_3_la-gdkcolor.o for architecture ppc"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: leopard Cc: dbevans (David B. Evans), mojca (Mojca Miklavec)
Port: gtk3

Description

Could be this is different to #55870

/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/clang-mp-3.4 -arch ppc -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"Gdk\" -DG_LOG_USE_STRUCTURED=1 -DGDK_COMPILATION -I.. -I../gdk -I.. -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_48 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_50 -D_REENTRANT -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/cairo -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16  -I/opt/local/include -DX_LOCALE   -fvisibility=hidden  -pipe -Os -fstrict-aliasing -arch ppc -Wall -MT libgdk_3_la-gdkresources.lo -MD -MP -MF .deps/libgdk_3_la-gdkresources.Tpo -c -o libgdk_3_la-gdkresources.lo `test -f 'gdkresources.c' || echo './'`gdkresources.c
libtool: compile:  /opt/local/bin/clang-mp-3.4 -arch ppc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Gdk\" -DG_LOG_USE_STRUCTURED=1 -DGDK_COMPILATION -I.. -I../gdk -I.. -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_48 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_50 -D_REENTRANT -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/cairo -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -DX_LOCALE -fvisibility=hidden -pipe -Os -fstrict-aliasing -arch ppc -Wall -MT libgdk_3_la-gdkresources.lo -MD -MP -MF .deps/libgdk_3_la-gdkresources.Tpo -c gdkresources.c  -fno-common -DPIC -o .libs/libgdk_3_la-gdkresources.o
libtool: compile:  /opt/local/bin/clang-mp-3.4 -arch ppc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Gdk\" -DG_LOG_USE_STRUCTURED=1 -DGDK_COMPILATION -I.. -I../gdk -I.. -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_48 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_50 -D_REENTRANT -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/cairo -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -DX_LOCALE -fvisibility=hidden -pipe -Os -fstrict-aliasing -arch ppc -Wall -MT libgdk_3_la-gdkresources.lo -MD -MP -MF .deps/libgdk_3_la-gdkresources.Tpo -c gdkresources.c -o libgdk_3_la-gdkresources.o >/dev/null 2>&1
mv -f .deps/libgdk_3_la-gdkresources.Tpo .deps/libgdk_3_la-gdkresources.Plo
/bin/sh ../libtool  --tag=CC   --mode=link /opt/local/bin/clang-mp-3.4 -arch ppc  -fvisibility=hidden  -pipe -Os -fstrict-aliasing -arch ppc -Wall  -version-info 2200:28:2200 -export-dynamic -rpath /opt/local/lib   -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -o libgdk-3.la -rpath /opt/local/lib  deprecated/libgdk_3_la-gdkcolor.lo libgdk_3_la-gdk-private.lo libgdk_3_la-gdk.lo libgdk_3_la-gdkapplaunchcontext.lo libgdk_3_la-gdkcairo.lo libgdk_3_la-gdkcursor.lo libgdk_3_la-gdkdeprecated.lo libgdk_3_la-gdkdevice.lo libgdk_3_la-gdkdevicepad.lo libgdk_3_la-gdkdevicetool.lo libgdk_3_la-gdkdevicemanager.lo libgdk_3_la-gdkdisplay.lo libgdk_3_la-gdkdisplaymanager.lo libgdk_3_la-gdkdnd.lo libgdk_3_la-gdkdrawingcontext.lo libgdk_3_la-gdkevents.lo libgdk_3_la-gdkframetimings.lo libgdk_3_la-gdkgl.lo libgdk_3_la-gdkglcontext.lo libgdk_3_la-gdkglobals.lo libgdk_3_la-gdkkeys.lo libgdk_3_la-gdkkeyuni.lo libgdk_3_la-gdkmonitor.lo libgdk_3_la-gdkoffscreenwindow.lo libgdk_3_la-gdkframeclock.lo libgdk_3_la-gdkframeclockidle.lo libgdk_3_la-gdkpango.lo libgdk_3_la-gdkpixbuf-drawable.lo libgdk_3_la-gdkproperty.lo libgdk_3_la-gdkrectangle.lo libgdk_3_la-gdkrgba.lo libgdk_3_la-gdkscreen.lo libgdk_3_la-gdkseat.lo libgdk_3_la-gdkseatdefault.lo libgdk_3_la-gdkselection.lo libgdk_3_la-gdkvisual.lo libgdk_3_la-gdkwindow.lo libgdk_3_la-gdkwindowimpl.lo libgdk_3_la-gdkenumtypes.lo libgdk_3_la-gdkmarshalers.lo libgdk_3_la-gdkresources.lo -L/opt/local/lib -lpangocairo-1.0 -lpango-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -Wl,-framework -Wl,CoreFoundation -lfontconfig -lfreetype -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lcairo -lX11 -lXext -lepoxy -lm  x11/libgdk-x11.la      
libtool: link: /opt/local/bin/clang-mp-3.4 -arch ppc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libgdk-3.0.dylib  deprecated/.libs/libgdk_3_la-gdkcolor.o .libs/libgdk_3_la-gdk-private.o .libs/libgdk_3_la-gdk.o .libs/libgdk_3_la-gdkapplaunchcontext.o .libs/libgdk_3_la-gdkcairo.o .libs/libgdk_3_la-gdkcursor.o .libs/libgdk_3_la-gdkdeprecated.o .libs/libgdk_3_la-gdkdevice.o .libs/libgdk_3_la-gdkdevicepad.o .libs/libgdk_3_la-gdkdevicetool.o .libs/libgdk_3_la-gdkdevicemanager.o .libs/libgdk_3_la-gdkdisplay.o .libs/libgdk_3_la-gdkdisplaymanager.o .libs/libgdk_3_la-gdkdnd.o .libs/libgdk_3_la-gdkdrawingcontext.o .libs/libgdk_3_la-gdkevents.o .libs/libgdk_3_la-gdkframetimings.o .libs/libgdk_3_la-gdkgl.o .libs/libgdk_3_la-gdkglcontext.o .libs/libgdk_3_la-gdkglobals.o .libs/libgdk_3_la-gdkkeys.o .libs/libgdk_3_la-gdkkeyuni.o .libs/libgdk_3_la-gdkmonitor.o .libs/libgdk_3_la-gdkoffscreenwindow.o .libs/libgdk_3_la-gdkframeclock.o .libs/libgdk_3_la-gdkframeclockidle.o .libs/libgdk_3_la-gdkpango.o .libs/libgdk_3_la-gdkpixbuf-drawable.o .libs/libgdk_3_la-gdkproperty.o .libs/libgdk_3_la-gdkrectangle.o .libs/libgdk_3_la-gdkrgba.o .libs/libgdk_3_la-gdkscreen.o .libs/libgdk_3_la-gdkseat.o .libs/libgdk_3_la-gdkseatdefault.o .libs/libgdk_3_la-gdkselection.o .libs/libgdk_3_la-gdkvisual.o .libs/libgdk_3_la-gdkwindow.o .libs/libgdk_3_la-gdkwindowimpl.o .libs/libgdk_3_la-gdkenumtypes.o .libs/libgdk_3_la-gdkmarshalers.o .libs/libgdk_3_la-gdkresources.o   -Wl,-force_load,x11/.libs/libgdk-x11.a  -L/opt/local/lib /opt/local/lib/libpangocairo-1.0.dylib /opt/local/lib/libpango-1.0.dylib /opt/local/lib/libgdk_pixbuf-2.0.dylib /opt/local/lib/libcairo-gobject.dylib /opt/local/lib/libgio-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/libfontconfig.dylib /opt/local/lib/libfreetype.dylib /opt/local/lib/libXinerama.dylib /opt/local/lib/libXi.dylib /opt/local/lib/libXrandr.dylib /opt/local/lib/libXcursor.dylib /opt/local/lib/libXrender.dylib /opt/local/lib/libXcomposite.dylib /opt/local/lib/libXdamage.dylib /opt/local/lib/libxcb.dylib /opt/local/lib/libXau.dylib /opt/local/lib/libXdmcp.dylib /opt/local/lib/libXfixes.dylib /opt/local/lib/libcairo.dylib /opt/local/lib/libX11.dylib /opt/local/lib/libXext.dylib /opt/local/lib/libepoxy.dylib -lm  -arch ppc -Os -arch ppc -Wl,-headerpad_max_install_names -arch ppc -Wl,-framework -Wl,CoreFoundation   -framework CoreFoundation -framework ApplicationServices -pthread -install_name  /opt/local/lib/libgdk-3.0.dylib -compatibility_version 2201 -current_version 2201.28 -Wl,-single_module
ld: illegal text-relocation to cstring in deprecated/.libs/libgdk_3_la-gdkcolor.o from _gdk_color_copy in deprecated/.libs/libgdk_3_la-gdkcolor.o for architecture ppc
collect2: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)
make[4]: *** [libgdk-3.la] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.28/gdk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.28/gdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.28/gdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.28'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.28'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_gnome_gtk3/gtk3/work/gtk+-3.22.28" && /usr/bin/make -w all CC="/opt/local/bin/clang-mp-3.4 -arch ppc" CC_FOR_BUILD="/opt/local/bin/clang-mp-3.4 -arch ppc" V=1 CPP_FOR_BUILD="/usr/bin/cpp" 
Exit code: 2

Attachments (2)

main.log (268.8 KB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
Main.log from PPC Leopard
portconfigure.tcl (31.9 KB) - added by ballapete (Peter "Pete" Dyballa) 7 years ago.
Local /opt/local/libexec/macports/lib/port1.0/portconfigure.tcl

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Leopard

comment:1 Changed 7 years ago by kencu (Ken)

SIgh -- I have got to push that commit to fix the compiler selection on PPC. I had posted up what I thought was the fix, but it didn't get much attention. But I think I'd better go ahead and shove that on through.

  • clang-3.4 is useless on PPC. If the default compiler is blacklisted, need to fallback to gcc6
  • many (most, maybe all) 32 bit builds of ports need configure.ldflags-append -Wl,-read_only_relocs,suppress

those two changes will solve many of the PPC build issues. IMHO they should be in base.

The issues that still persist after that are trickier.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:2 Changed 7 years ago by kencu (Ken)

Peter, would you please test this PR out on your PPC machines and see if it fixes this for you?

<https://github.com/macports/macports-base/pull/58>

comment:3 in reply to:  2 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

Peter, would you please test this PR out on your PPC machines and see if it fixes this for you?

<https://github.com/macports/macports-base/pull/58>

No, it does not, because my local version of /opt/local/libexec/macports/lib/port1.0/portconfigure.tcl is different. I'll attach it to this report.

I also cannot see a way to download to download your patch…

Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: portconfigure.tcl added

Local /opt/local/libexec/macports/lib/port1.0/portconfigure.tcl

comment:4 in reply to:  1 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

SIgh -- I have got to push that commit to fix the compiler selection on PPC. I had posted up what I thought was the fix, but it didn't get much attention. But I think I'd better go ahead and shove that on through.

  • clang-3.4 is useless on PPC. If the default compiler is blacklisted, need to fallback to gcc6
  • many (most, maybe all) 32 bit builds of ports need configure.ldflags-append -Wl,-read_only_relocs,suppress

Gtk3 built with configure.compiler=macports-gcc-6. I did not need to add he configure.ldflags-append -Wl,-read_only_relocs,suppress.

comment:5 Changed 7 years ago by kencu (Ken)

I know. There is a ticket from every release of gtk about the exact same thing...

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:6 Changed 7 years ago by kencu (Ken)

I have commited (with Mojca) the fix for the base part of this!!!!!!!

Now we need to change the gcc blacklisting we see everywhere to something like *gcc-4* instead of *gcc* and these should all be fixed for PPC!

comment:7 Changed 7 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:8 Changed 7 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed

closed by this commit.

Note: See TracTickets for help on using tickets.