compiling glib20 in ports with gcc v4.6.2
Sameer R. Manek
manek at ghur.net
Fri Jul 22 17:02:01 UTC 2011
Inside work/glib-2.26.1/glib, Not sure why it's using cc instead gcc46,
below is my /etc/make.conf
cc -shared -fPIC -DPIC .libs/garray.o .libs/gasyncqueue.o
.libs/gatomic-gcc.o .libs/gbacktrace.o .libs/gbase64.o .libs/gbitlock.o
.libs/gbookmarkfile.o .libs/gbuffer.o .libs/gcache.o .libs/gchecksum.o
.libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o
.libs/gdatetime.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o
.libs/ghash.o .libs/ghook.o .libs/ghostutils.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/gpoll.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/gtestutils.o .libs/gthread.o
.libs/gthreadpool.o .libs/gtimer.o .libs/gtimezone.o .libs/gtree.o
.libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o
.libs/gunidecomp.o .libs/gurifuncs.o .libs/gutils.o .libs/gvariant.o
.libs/gvariant-core.o .libs/gvariant-parser.o .libs/gvariant-serialiser.o
.libs/gvarianttypeinfo.o .libs/gvarianttype.o .libs/gprintf.o
.libs/giounix.o .libs/gspawn.o -Wl,--whole-archive
libcharset/.libs/libcharset.a -Wl,--no-whole-archive -Wl,-rpath
-Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib -licui18n
/usr/local/lib/libintl.so /usr/local/lib/libiconv.so
/usr/local/lib/libpcre.so -O2 -mssse3 -march=prescott
-Wl,-Bsymbolic-functions -Wl,-soname -Wl,libglib-2.0.so.0
-Wl,-retain-symbols-file -Wl,.libs/libglib-2.0.exp -o .libs/libglib-2.0.so.0
/usr/bin/ld: unrecognized option '-Bsymbolic-functions'
/usr/bin/ld: use the --help option for usage information
*** Error code 1
/etc/make.conf
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc46)
CC=gcc46
CXX=g++46
CPP=cpp46
CFLAGS+=-mssse3
CPUTYPE?=core2
LD=/usr/local/bin/ld
.endif
-----Original Message-----
From: Koop Mast [mailto:kwm at rainbow-runner.nl]
Sent: Friday, July 22, 2011 2:59 AM
To: Sameer R. Manek
Cc: gnome at FreeBSD.org
Subject: Re: compiling glib20 in ports with gcc v4.6.2
On Fri, 2011-07-22 at 01:31 -0700, Sameer R. Manek wrote:
> While attempting to build glib20 (2.26.1) from ports using gcc v4.6.2,
> I encountered the error
>
Well first glib's configure check if the compiler/linker supports this flag
"checking for -Bsymbolic-functions linker flag... yes".
I also test build glib20 with gcc46 after your report and it works fine.
However I believe that if you use a gcc version from ports it should use
also the linker from the binutils package, not the linker from base.
-Koop
>
> /usr/bin/ld: unrecognized option '-Bsymbolic-functions'
>
>
>
> I'm not sure if the syntax has changed from gcc 4.2.2. to gcc 4.6.2,
> but the following Makefiles need to be adjust for it to properly compile.
>
>
>
> /usr/ports/devel/glib20/work/glib-2.26.1/glib/Makefile
>
> /usr/ports/devel/glib20/work/glib-2.26.1/gmodule/Makefile
>
> /usr/ports/devel/glib20/work/glib-2.26.1/gthread/Makefile
>
> /usr/ports/devel/glib20/work/glib-2.26.1/gobject/Makefile
>
> /usr/ports/devel/glib20/work/glib-2.26.1/gio/Makefile
>
>
>
>
>
> Change the line:
>
> GLIB_LINK_FLAGS = -Wl,-Bsymbolic-functions
>
> to:
>
> GLIB_LINK_FLAGS = -Wl,-Bsymbolic
>
>
>
> Thanks
>
> Sameer
>
>
>
> Relevant versions:
>
> 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu Jul 21 21:35:24 PDT
>
> gcc version 4.6.2 20110715 (prerelease) (FreeBSD Ports Collection)
>
> _______________________________________________
> freebsd-gnome at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
> To unsubscribe, send any mail to "freebsd-gnome-unsubscribe at freebsd.org"
More information about the freebsd-gnome
mailing list