* Building guile-1.6.1 on MacOS X -- fails to link
@ 2002-12-17 17:00 Norman Gray
0 siblings, 0 replies; only message in thread
From: Norman Gray @ 2002-12-17 17:00 UTC (permalink / raw)
Greetings,
I'm having problems building guile-1.6.1 on MacOS X. With a suitable
gcc flag and a small source edit it largely compiles, but finally
fails to link. Details of that at the bottom.
1. Adjustment to configure for OS X
We need to use CPPFLAGS='-traditional-cpp' for ./configure, or else we
get _lots_ of warnings/errors, and the compilation of eval.c appears
to hang.
2. Patch to gc_os_dep.c to detect OS X correctly
Following patch is necessary or else we get the `unknown machine type'
error when compiling gc_os_dep.c:
*** libguile/gc_os_dep.c-orig Mon Dec 16 21:19:39 2002
--- libguile/gc_os_dep.c Mon Dec 16 22:32:42 2002
***************
*** 240,244 ****
# define mach_type_known
# endif
! # if defined(macosx)
# define MACOSX
# define POWERPC
--- 240,244 ----
# define mach_type_known
# endif
! # if defined(macosx) || defined(__APPLE__)
# define MACOSX
# define POWERPC
According to their compiler docs, testing for __APPLE__ appears to be
the preferred way to test whether you're on OS X. With that addition,
the resulting set of defined preprocessor constants looks right-ish.
I had the same problems with guile-1.6.0 and 1.5.6,
but I've been using 1.4 perfectly happily for a while, so I've
never been forced to try terribly hard to debug the build problems
with the 1.6 series.
This is on OSX 10.1.5 -- it may not be fully bang up-to-date, but
it's pretty close. I haven't tried building it on 10.2 yet.
Millie:builds/guile-1.6.1> uname -a
Darwin Millie.home 5.5 Darwin Kernel Version 5.5: Thu May 30 14:51:26 PDT 2002; root:xnu/xnu-201.42.3.obj~1/RELEASE_PPC Power Macintosh powerpc
The system compiler is a conservative release of gcc:
Millie:builds/guile-1.6.1> cc --version
2.95.2
The final link fails, failing to find _environ to link against:
Millie:builds/guile-1.6.1> make
make all-recursive
Making all in oop
Making all in goops
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in qt
Making all in md
make[3]: Nothing to be done for `all'.
Making all in time
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in libguile-ltdl
Making all in upstream
make all-am
make[4]: Nothing to be done for `all-am'.
make[3]: Nothing to be done for `all-am'.
Making all in libguile
/bin/sh ../libtool --mode=link cc -g -O2 -Wall -Wmissing-prototypes -o libguile.la -rpath /Volumes/Maxwell/data/norman/tools/guile-1.6.1/lib -version-info 15:0:3 -export-dynamic -no-undefined alist.lo arbiters.lo async.lo backtrace.lo boolean.lo chars.lo continuations.lo debug.lo deprecation.lo dynl.lo dynwind.lo environments.lo eq.lo error.lo eval.lo evalext.lo extensions.lo feature.lo fluids.lo fports.lo gc.lo gc_os_dep.lo gdbint.lo gh_data.lo gh_eval.lo gh_funcs.lo gh_init.lo gh_io.lo gh_list.lo gh_predicates.lo goops.lo gsubr.lo guardians.lo hash.lo hashtab.lo hooks.lo init.lo ioext.lo iselect.lo keywords.lo lang.lo list.lo load.lo macros.lo mallocs.lo modules.lo numbers.lo objects.lo objprop.lo options.lo pairs.lo ports.lo print.lo procprop.lo procs.lo properties.lo random.lo rdelim.lo read.lo root.lo rw.lo scmsigs.lo script.lo simpos.lo smob.lo sort.lo srcprop.lo stackchk.lo stacks.lo stime.lo strings.lo strop.lo strorder.lo strports.lo struct.lo symbols.lo throw.lo values.lo variable.lo vectors.lo version.lo vports.lo weaks.lo symbols-deprecated.lo ramap.lo unif.lo filesys.lo posix.lo net_db.lo socket.lo regex-posix.lo ../libguile-ltdl/libguile-ltdl.la -lm
rm -fr .libs/libguile.la .libs/libguile.* .libs/libguile.*
cc -r -keep_private_externs -nostdlib -o .libs/libguile.12.3.0.dylib-master.o alist.lo arbiters.lo async.lo backtrace.lo boolean.lo chars.lo continuations.lo debug.lo deprecation.lo dynl.lo dynwind.lo environments.lo eq.lo error.lo eval.lo evalext.lo extensions.lo feature.lo fluids.lo fports.lo gc.lo gc_os_dep.lo gdbint.lo gh_data.lo gh_eval.lo gh_funcs.lo gh_init.lo gh_io.lo gh_list.lo gh_predicates.lo goops.lo gsubr.lo guardians.lo hash.lo hashtab.lo hooks.lo init.lo ioext.lo iselect.lo keywords.lo lang.lo list.lo load.lo macros.lo mallocs.lo modules.lo numbers.lo objects.lo objprop.lo options.lo pairs.lo ports.lo print.lo procprop.lo procs.lo properties.lo random.lo rdelim.lo read.lo root.lo rw.lo scmsigs.lo script.lo simpos.lo smob.lo sort.lo srcprop.lo stackchk.lo stacks.lo stime.lo strings.lo strop.lo strorder.lo strports.lo struct.lo symbols.lo throw.lo values.lo variable.lo vectors.lo version.lo vports.lo weaks.lo symbols-deprecated.lo ramap.lo unif.lo filesys.lo posix.lo net_db.lo socket.lo regex-posix.lo && cc -dynamiclib -o .libs/libguile.12.3.0.dylib .libs/libguile.12.3.0.dylib-master.o -L../libguile-ltdl/.libs -lguile-ltdl -lm -lc -install_name /Volumes/Maxwell/data/norman/tools/guile-1.6.1/lib/libguile.12.dylib -compatibility_version 16 -current_version 16.0
ld: Undefined symbols:
_environ
/usr/bin/libtool: internal link edit command failed
make[2]: *** [libguile.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I imagine the fix is pretty simple, but I'm trying desperately not to
find it myself, since (a) libtool scares the hell out of me, and (b) OS
X is my I-don't-know-how-it-works-so-I-CANNOT-tweak-it platform, and I'm
jealously guarding my ignorance about its internals. Nevertheless, I hope
this report is specific enough that it'll afford someone a `doh!' moment.
All the best,
Norman
--
---------------------------------------------------------------------------
Norman Gray http://www.astro.gla.ac.uk/users/norman/
Physics and Astronomy, University of Glasgow, UK norman@astro.gla.ac.uk
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-17 17:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-17 17:00 Building guile-1.6.1 on MacOS X -- fails to link Norman Gray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).