[R-SIG-Mac]Problem building 1.5.0 from sources
Luke Tierney
luke@stat.umn.edu
Thu, 16 May 2002 10:04:16 -0500
On Thu, May 16, 2002 at 06:52:00AM -0700, Don MacQueen wrote:
> I have Jan de Leeuw's build of Darwin R 1.5.0 installed and running
> happily; thank you very much.
>
> I would also like to be able to build from sources. I do this on a
> Solaris machine at work, but haven't been able to do it on either of
> two OS X machines.
>
> I've included a ton of output below, but here's one error message
> from the make step that may be a major clue:
> symbol _tgoto used from dynamic library
> /usr/lib/libm.dylib(tgoto.o) not from earlier dynamic library
> /sw/lib/libncurses.dylib.5(lib_tgoto.o)
> which suggests a version mismatch. /usr/lib/libm.dylib is from the
> Developer Tools.
>
> There are also many error messages of this form:
>
It looks to me that the only place you actually fail is at the end in
building tcltk. I think this means methods has been built, and as
that runs R for dumping methods it should mean that you have a
functioning R at this point. You might check that.
Look at the second cc line below, the one that creates tcltk.so:
> cc -no-cpp-precomp -I../../../../include -I/sw/include
> -I/usr/X11R6/include -I/sw/include -fno-common -g -O2 -c
> ../../../../../source/src/library/tcltk/src/tcltk.c -o tcltk.o
> cc -bundle -bundle_loader ../../../../bin/R.bin -o tcltk.so tcltk.o
> -L/sw/lib -lm
> /usr/bin/ld: Undefined symbols:
> _TclFreeObj
> _Tcl_CreateCommand
> ....
You can see that it is not linking in the tcl and tk libraries, which
explains the unresolved symbols. What you need to figure out is why
it is not linking in those libraries. Looking at the way the make
file is constructed it would appear that configure has gotten confused
into thinkining you have tcl/tk but at the same time not being able to
find the libraries.
I would try starting from scratch with a clean untar of the sources.
Then try to build without Tcl/TK support and make sure that works.
Then see if you can configure it to use tcl/tk. Look carefully at
what configure reports in config.log and see if you can make sense of
that.
On my system, which uses a fairly bleeding edge fink, I have three
tcltk packages: tcltk, tcltk-dev, and tcltk-shlibs. The fink folks
seem to have been rearrranging the way they pack these things
recently, so there is a possibility that you have not go al the stuff
you need to build with tcltk--you might check that your packages are
up to date.
One other point to be aware of on Mac OS X, though it does not seem to
be the issue here, is that Mac OS X uses a rather idiosyncratic way of
managing shared libraries. Some would argue that their mechanism is
highly advanced and superior to anything else out there; others might
give a less complementary description. At any rate, there is a slew
of environment variables that control how dynamic linking works (see
man dyld). There is also a fink package, libxpg4 that seems to set
two of these, DYLD_INSERT_LIBRARIES and DYLD_FORCE_FLAT_NAMESPACE.
Unfortunately R will not run when DYLD_FORCE_FLAT_NAMESPACE is set
because of a variable defined both in libcurses and libreadline.4.2.
This may be a transient issue, and may not apply if you are using a
more stable version of fink, but the point is: be aware that setting
of the DYLD_??? variables given in man dyld may affect whether R runs
or not, so check for these if you have problems.
luke
--
Luke Tierney
University of Minnesota Phone: 612-625-7843
School of Statistics Fax: 612-624-8868
313 Ford Hall, 224 Church St. S.E. email: luke@stat.umn.edu
Minneapolis, MN 55455 USA WWW: http://www.stat.umn.edu