Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#13052 closed defect (fixed)

glib2 build error on PowerPC Mac OS X 10.5 Leopard

Reported by: mac.telia.net@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: mac.telia.net@…, ryandesign (Ryan Carsten Schmidt), sbplrports@…, nick.kreeger@…, rhwood@…
Port:

Description

I have the recent version of both Leopard and Macports (1.600 / svn rev: 30518).

When I tried to build glib2, macports gave me this:

--->  Building glib2 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_ax_svn_macports_dports_devel_glib2/work/glib-2.14.2" && make all " returned error 2
Command output: if /bin/sh ../libtool --mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I.. -I..  -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION   -I/opt/local/include -D_REENTRANT  -O2 -funroll-loops -fstrict-aliasing -Wall -MT gspawn.lo -MD -MP -MF ".deps/gspawn.Tpo" \
	  -c -o gspawn.lo `test -f 'gspawn.c' || echo './'`gspawn.c; \
	then mv -f ".deps/gspawn.Tpo" ".deps/gspawn.Plo"; \
	else rm -f ".deps/gspawn.Tpo"; exit 1; \
	fi
 /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -I/opt/local/include -D_REENTRANT -O2 -funroll-loops -fstrict-aliasing -Wall -MT gspawn.lo -MD -MP -MF .deps/gspawn.Tpo -c gspawn.c  -fno-common -DPIC -o .libs/gspawn.o
/bin/sh ../libtool --mode=link /usr/bin/gcc-4.0  -O2 -funroll-loops -fstrict-aliasing -Wall  -L/opt/local/lib -bind_at_load -framework Carbon -o libglib-2.0.la -rpath /opt/local/lib  -version-info 1400:2:1400 -export-dynamic  -export-symbols-regex "^g.*" garray.lo gasyncqueue.lo gatomic.lo gbacktrace.lo gbase64.lo gbookmarkfile.lo gcache.lo gcompletion.lo gconvert.lo gdataset.lo gdate.lo gdir.lo gerror.lo gfileutils.lo ghash.lo ghook.lo giochannel.lo gkeyfile.lo glist.lo gmain.lo gmappedfile.lo gmarkup.lo gmem.lo gmessages.lo gnode.lo goption.lo gpattern.lo gprimes.lo gqsort.lo gqueue.lo grel.lo grand.lo gregex.lo gscanner.lo gsequence.lo gshell.lo gslice.lo gslist.lo gstdio.lo gstrfuncs.lo gstring.lo gthread.lo gthreadpool.lo gtimer.lo gtree.lo guniprop.lo gutf8.lo gunibreak.lo gunicollate.lo gunidecomp.lo gutils.lo gprintf.lo libcharset/libcharset.la  giounix.lo gspawn.lo  -liconv  pcre/libpcre.la -lintl  
generating symbol list for `libglib-2.0.la'
/usr/bin/nm -p  .libs/garray.o .libs/gasyncqueue.o .libs/gatomic.o .libs/gbacktrace.o .libs/gbase64.o .libs/gbookmarkfile.o .libs/gcache.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gregex.o .libs/gscanner.o .libs/gsequence.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gutils.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o  libcharset/.libs/libcharset.a pcre/.libs/libpcre.a | sed -n -e 's/^.*[ 	]\([BCDEGRST][BCDEGRST]*\)[ 	][ 	]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libglib-2.0.exp
/usr/bin/grep -E -e "^g.*" ".libs/libglib-2.0.exp" > ".libs/libglib-2.0.expT"
mv -f ".libs/libglib-2.0.expT" ".libs/libglib-2.0.exp"
rm -fr .libs/libglib-2.0.lax
mkdir .libs/libglib-2.0.lax
rm -fr .libs/libglib-2.0.lax/libcharset.a
mkdir .libs/libglib-2.0.lax/libcharset.a
Extracting /opt/local/var/macports/build/_Users_ax_svn_macports_dports_devel_glib2/work/glib-2.14.2/glib/libcharset/.libs/libcharset.a
(cd .libs/libglib-2.0.lax/libcharset.a && ar x /opt/local/var/macports/build/_Users_ax_svn_macports_dports_devel_glib2/work/glib-2.14.2/glib/libcharset/.libs/libcharset.a)
rm -fr .libs/libglib-2.0.lax/libpcre.a
mkdir .libs/libglib-2.0.lax/libpcre.a
Extracting /opt/local/var/macports/build/_Users_ax_svn_macports_dports_devel_glib2/work/glib-2.14.2/glib/pcre/.libs/libpcre.a
(cd .libs/libglib-2.0.lax/libpcre.a && ar x /opt/local/var/macports/build/_Users_ax_svn_macports_dports_devel_glib2/work/glib-2.14.2/glib/pcre/.libs/libpcre.a)
sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < .libs/libglib-2.0.exp > .libs/libglib-2.0-symbols.expsym
/usr/bin/gcc-4.0 -dynamiclib ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/libglib-2.0.0.1400.2.dylib  .libs/garray.o .libs/gasyncqueue.o .libs/gatomic.o .libs/gbacktrace.o .libs/gbase64.o .libs/gbookmarkfile.o .libs/gcache.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gregex.o .libs/gscanner.o .libs/gsequence.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gutils.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o  .libs/libglib-2.0.lax/libcharset.a/localcharset.o  .libs/libglib-2.0.lax/libpcre.a/pcre_chartables.o .libs/libglib-2.0.lax/libpcre.a/pcre_compile.o .libs/libglib-2.0.lax/libpcre.a/pcre_config.o .libs/libglib-2.0.lax/libpcre.a/pcre_dfa_exec.o .libs/libglib-2.0.lax/libpcre.a/pcre_exec.o .libs/libglib-2.0.lax/libpcre.a/pcre_fullinfo.o .libs/libglib-2.0.lax/libpcre.a/pcre_get.o .libs/libglib-2.0.lax/libpcre.a/pcre_globals.o .libs/libglib-2.0.lax/libpcre.a/pcre_info.o .libs/libglib-2.0.lax/libpcre.a/pcre_maketables.o .libs/libglib-2.0.lax/libpcre.a/pcre_newline.o .libs/libglib-2.0.lax/libpcre.a/pcre_ord2utf8.o .libs/libglib-2.0.lax/libpcre.a/pcre_refcount.o .libs/libglib-2.0.lax/libpcre.a/pcre_study.o .libs/libglib-2.0.lax/libpcre.a/pcre_tables.o .libs/libglib-2.0.lax/libpcre.a/pcre_try_flipped.o .libs/libglib-2.0.lax/libpcre.a/pcre_ucp_searchfuncs.o .libs/libglib-2.0.lax/libpcre.a/pcre_valid_utf8.o .libs/libglib-2.0.lax/libpcre.a/pcre_version.o .libs/libglib-2.0.lax/libpcre.a/pcre_xclass.o   -L/opt/local/lib /opt/local/lib/libiconv.dylib -lc /opt/local/lib/libintl.dylib  -framework Carbon -install_name  /opt/local/lib/libglib-2.0.0.dylib -Wl,-compatibility_version -Wl,1401 -Wl,-current_version -Wl,1401.2
ld: bc out of range (572176 max is +/-64K) from _g_atomic_int_exchange_and_add in .libs/gatomic.o to _g_atomic_int_exchange_and_add$stub in .libs/libglib-2.0.0.1400.2.dylib in _g_atomic_int_exchange_and_add from .libs/gatomic.o
collect2: ld returned 1 exit status
make[4]: *** [libglib-2.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

Error: Status 1 encountered during processing.

How can I solve this problem? (I saw that build glib2 on Leopard is possible: http://trac.macports.org/projects/macports/ticket/12995 - Here the glib2 build is successfully completed.) Thanks!

Attachments (1)

glib2.diff (1.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 17 years ago.
potential fix, thanks to David DeHaven

Download all attachments as: .zip

Change History (16)

comment:1 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mac.telia.net@… ryandesign@… added
Milestone: Port Bugs
Owner: changed from macports-dev@… to ryandesign@…

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

This was reported on the mailing list last month, and there's a patch included. Can you check if that fixes the problem for you?

comment:3 Changed 17 years ago by sbplrports@…

glib2 doesnt build on my G5 PPC Quad. It builds fine for me on a MacBook Pro i386. Both running Leopard.

comment:4 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: glib2 build error on Leopardglib2 build error on Mac OS X 10.5 Leopard

mac.telia.net: are you on Intel or PowerPC?

sbplrports: is this with or without the aforementioned patch?

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

Cc: sbplrports@… added

comment:6 Changed 17 years ago by sbplrports@…

That is without. Have the files. Not quite sure how to patch it....yet. Sorry. I am not running svn build though either. 1.5.2 base.

comment:7 Changed 17 years ago by mac.telia.net@…

I'm on PPC (powerbook g4 1.67). Trying the patch now..

comment:8 Changed 17 years ago by mac.telia.net@…

Patch applied, everything is working well, build OK.

(for the record: I read that mail list before, but I don't realize that patch... my bad! :)

Thank you guys very much!

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

Thank you for confirming the fix. I have opened bug 491990 with the developers of glib and provided them with the patch. Before committing the change to MacPorts, I'd like to wait for a response from them to make sure this is a reasonable fix for the issue.

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

Summary: glib2 build error on Mac OS X 10.5 Leopardglib2 build error on PowerPC Mac OS X 10.5 Leopard

sbplrports: If you'd like to try the patch, you can download the file I'm about to attach to this ticket to your Desktop and open the Terminal and type this:

cd `port dir glib2`
patch -p0 < ~/Desktop/glib2.diff
sudo port install glib2

Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: glib2.diff added

potential fix, thanks to David DeHaven

comment:11 Changed 17 years ago by sbplrports@…

worked a charm. thanks much.

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

Cc: nick.kreeger@… added
Status: newassigned

Has duplicate #12120.

comment:13 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: rhwood@… added

rhwood committed the fix in r30578.

Meanwhile the gnome/glib folks have pointed to me their bug 445362 which has a different analysis of the problem.

comment:14 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Updated to glib 2.14.4 in r31556 which already includes a different fix for this issue, making our local patch unnecessary.

comment:15 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.