[Mono-list] RE: Mac X and latest cvs source

Matthieu Cormier mcormier@cs.dal.ca
Tue, 19 Aug 2003 21:55:10 -0300 (ADT)


Thanks for the responses, they help me get much closer to building
the latest source

Andy, I have decided not to use fink, though I was using it. There is a
recent news item on their site about using fink with gcc 3.3 that you
might want to read.

We'll I still need some help so like last time, I've included a written
log of what I tried in the order I tried it.

Thanks M@

---- BEGIN Install NOTES ---

installed gcc 3.3
changed libtool to glibtool and libtoolize to glibtoolize in autogen.sh

added --program-transform-name=s/libtool/glibtool/ to conf_flags in autogen.sh
	probably don't need to do this

./autogen.sh --prefix=/usr/local
	This will complain about line 8056 -->
		PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)

comment out the line
	# PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
in "configure" file

./configure --prefix=/usr/local --enable-maintainer-mode --enable-compile-warnings --program-transform-name=s/libtool/glibtool/

make
	make crashed on mini
-------------------------- Begin error example ----------------------
../../mono/metadata/.libs/libmonoruntime.al(reflection.lo) definition of _mono_assembly_get_object in section (__TEXT,__text)
../../mono/metadata/.libs/libmonoruntime.al(reflection.lo) definition of _mono_assembly_get_object in section (__TEXT,__text)
ld: multiple definitions of symbol _mono_custom_attrs_construct
....

pages and pages of ld: multipe definition errors

...
../../mono/utils/.libs/libmonoutils.al(strtod.lo) definition of ___bsd_dtoa in section (__TEXT,__text)
../../mono/utils/.libs/libmonoutils.al(strtod.lo) definition of ___bsd_dtoa in section (__TEXT,__text)
ld: multiple definitions of symbol _bsd_strtod
../../mono/utils/.libs/libmonoutils.al(strtod.lo) definition of _bsd_strtod in section (__TEXT,__text)
../../mono/utils/.libs/libmonoutils.al(strtod.lo) definition of _bsd_strtod in section (__TEXT,__text)

---------------------- End error example -----------------------------

make > make_output

	do this so we can distinguish between stderr and stdout

	STDERR output on failed mini compile

	gcc: unrecognized option `-version-script=./ldscript'
	/usr/bin/libtool: internal link edit command failed
	make[4]: *** [libmono.la] Error 1
	make[3]: *** [all] Error 2
	make[2]: *** [all-recursive] Error 1
	make[1]: *** [all-recursive] Error 1
	make: *** [all] Error 2

OKay now I'm gonna try a quick and gross hack because /usr/bin/libtool
is defined somewhere and I don't want that being used:

---- START UGLY TEST HACK ---
cd /usr/bin
sudo mv libtool apple_libtool
sudo cp glibtool libtool
make
----- END UGLY TEST HACK ---

	This time I don't get any errors but it still doesn't compile.
	Here's my output:


----- BEGIN Make output----------
Making all in mini
make  all-am
/bin/sh ../../libtool --mode=link gcc  -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings  -pthread -o libmono.la -rpath
/usr/local/lib -Wl,-version-script=./ldscript mini.lo dominators.lo cfold.lo regalloc.lo inssel.lo helpers.lo liveness.lo ssa.lo
driver.lo debug-mini.lo linear-scan.lo aot.lo graph.lo mini-ppc.lo exceptions-ppc.lo tramp-ppc.lo ../../mono/metadata/libmonoruntime.la
../../mono/metadata/libmetadata.la ../../mono/io-layer/libwapi.la ../../mono/utils/libmonoutils.la  -lpthread
rm -fr .libs/libmono.la .libs/libmono.* .libs/libmono.*
gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libmono.0.0.0.dylib  mini.lo dominators.lo cfold.lo regalloc.lo inssel.lo
helpers.lo liveness.lo ssa.lo driver.lo debug-mini.lo linear-scan.lo aot.lo graph.lo mini-ppc.lo exceptions-ppc.lo tramp-ppc.lo
-all_load  ../../mono/metadata/.libs/libmonoruntime.al ../../mono/metadata/.libs/libmetadata.al ../../mono/io-layer/.libs/libwapi.al
../../mono/utils/.libs/libmonoutils.al  ../../mono/metadata/.libs/libmonoruntime.al ../../mono/metadata/.libs/libmetadata.al
../../mono/io-layer/.libs/libwapi.al ../../mono/utils/.libs/libmonoutils.al -lpthread -lc -version-script=./ldscript -install_name
/usr/local/lib/libmono.0.dylib -compatibility_version 1 -current_version 1.0
gcc: unrecognized option `-version-script=./ldscript'
libtool: unrecognized option `-arch_only'
Try `libtool --help' for more information.
make[4]: *** [libmono.la] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
------------END Make output -------------


clean up and move things back the way ther were

sudo mv apple_libtool  libtool


Question Period:
	Where is "/usr/bin/libtool: internal link edit command failed" being defined?

	Any ideas what to do from here?