Error compiling root on Mac OSX

Dear Rooters

Two hours ago I have downloaded the latest root from CVS, and
started to compile it on my PowerBook using Mac OSX 10.3.1

While root 4.00.04 and earlier versions did compile w/o problems,
this time I got the following error:

g++ -O2 -bind_at_load -flat_namespace -o bin/proofd proofd/src/proofd.o rpdutils/src/daemon.o rpdutils/src/error.o rpdutils/src/net.o rpdutils/src/netpar.o rpdutils/src/rpdutils.o rpdutils/src/ssh.o
clib/src/rsaaux.o clib/src/rsalib.o clib/src/rsafun.o clib/src/snprintf.o -lssl -lcrypto -lkrb5 -lk5crypto -lcom_err -lm -L/sw/lib -lpthread -ldl
g++ -O2 -pipe -Wall -W -Woverloaded-virtual -fsigned-char -fno-common -I/usr/X11R6/include -Iinclude -I/sw/include -D_REENTRANT -o main/src/rmain.o -c main/src/rmain.cxx
g++ -O2 -bind_at_load -flat_namespace -o bin/root.exe main/src/rmain.o -u _G__cpp_setupG__Hist -u _G__cpp_setupG__Graf1 -u _G__cpp_setupG__G3D -u _G__cpp_setupG__GPad -u _G__cpp_setupG__Tree -u _G__cpp_setupG__Matrix
-Llib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -lRint -lm -L/sw/lib -lpthread -ldl
ld: warning prebinding disabled because dependent library: /lib/libCore.dylib is not prebound
ld: warning can’t open dynamic library: /lib/libfreetype.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: Undefined symbols:
make: *** [bin/root.exe] Error 1

Does someone know what may be the reason that root does no
longer compile on the Mac?

Thank you in advance
Best regards

Dear MacRooters

Sorrowly, until now I did not receive an answer, however, I have seen in
the development notes that Fons has made more changes to the makefile,
so 2 hours ago I downloaded the newest version from cvs again and
compiled it again. Sorrowly, I get the identical error as the first time.

Looking in the directory root/lib/ I see that is missing, even
though libfreetype.dylib does exist.

The question is why does libfreetype not compile although the source seems
to be identical to the source from root 4.00.04?

Thank you in advance
Best regards

Dear MacRooters

Since the develoment notes show that Fons has fixed freetype/,
I have just downloaded and compiled root from cvs again.

Sorrowly, the error remains the same. Looking in directory root/lib the
following libraries are missing compared to root 4.00/04:
libAfterImage.a, libASImage.dylib, AND libfreetype.a

Interestingly, instead of libfreetype.a in root 4.00/04, there is now a
dynamic library libfreetype.dylib, which is not present in root 4.00/04.

In the hope that it may be helpful I am now attaching the complete
output from ./configure macosx and from make.

Best regards
confmake_macOSX.txt (487 KB)

Dear MacRooters

Since I realized that configure is no longer able to recognize fink, I have
checked the configure file. In the statement:

if test “x$platform” = “macosx” ; then
finkdir=which fink 2>&1 | sed -ne "s/\/bin\/fink//p"

“macosx” needs to be replaced by “xmacosx”.

Now I am able to compile libAfterImage.a, libASImage.dylib,

Sorrowly, the ERROR for libfreetype STILL exists.
It is not clear to me why suddenly freetype is compiled as libfreetype.dylib
and not as libfreetype.a?
I have no idea where to look for this error.

It would be great if this error could be solved soon.

Best regards

Hi Christian,

concerning the freetype.dylib, see:

as for why I had to make the change from .a to .dylib. A side effect is now that you need to have set DYLD_LIBRARY_PATH to include $ROOTSYS/lib BEFORE building ROOT. I’ll change this later, but for you to build make sure that DYLD_LIBRARY_PATH is correctly set.

Thanks for pointing out the error in configure. Now fixed.

Cheers, Fons.

Dear Fons

Thank you for this information, I have just downloaded and compiled
the newest version (compilation takes 2 hours on my 550MHz PowerBook),
and now everything works.

Best regards


I just tried to compile the CVS version (as of 20/04/05 around 12:00) following the instructions, ie setting the ROOTSYS=/usr/local/cvs/root/ (my target directory), then rebuilding the libraries with the DYLD_LIBRARY_PATH properly set, as advised above, and I found the same type of error:

[quote]make: Entering directory `/Volumes/Home/usr/boudry/Download/root’
g++ -O2 -dynamiclib -single_module -undefined dynamic_lookup -install_name /usr/local/cvs/root/lib/libPyROOT.dylib -o lib/libPyROOT.dylib pyroot/src/ClassMethodHolder.o pyroot/src/ConstructorHolder.o pyroot/src/Converters.o pyroot/src/Executors.o pyroot/src/FunctionHolder.o pyroot/src/MemoryRegulator.o pyroot/src/MethodHolder.o pyroot/src/MethodProxy.o pyroot/src/ObjectProxy.o pyroot/src/PropertyProxy.o pyroot/src/PyBufferFactory.o pyroot/src/Pythonize.o pyroot/src/RootModule.o pyroot/src/RootWrapper.o pyroot/src/TPyClassGenerator.o pyroot/src/TPyException.o pyroot/src/TPyReturn.o pyroot/src/TPython.o pyroot/src/Utility.o pyroot/src/G__PyROOT.o -L/sw/lib -ldl -Wl,-u,_G__cpp_setupG__Hist -Wl,-u,_G__cpp_setupG__Graf1 -Wl,-u,_G__cpp_setupG__G3D -Wl,-u,_G__cpp_setupG__GPad -Wl,-u,_G__cpp_setupG__Tree -Wl,-u,_G__cpp_setupG__Matrix -Llib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix /System/Library/Frameworks/Python.framework/Versions/2.3/Python -lpthread
/usr/bin/libtool: internal link edit command failedld
: warning can’t open dynamic library: /usr/local/cvs/root/lib/libfreetype.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: Undefined symbols:
_FT_Done_Face referenced from libGraf expected to be defined in /usr/local/cvs/root/lib/libfreetype.dylib
_FT_Done_FreeType referenced from libGraf expected to be defined in /usr/local/cvs/root/lib/libfreetype.dylib

Namely “make” build the libGraf so that it finds the libfreetype.dylib in the target directory, but that one hasn’t been install there yet.
I guess the current setting must work if the build and target directories are identical.

Or did I do something wrong ?

Cheers, Vincent.


Whilw waiting for an answer from the MAC gurus, you can
./configure --disable-python

or simply
make -k


This has been happening to me on my computers for quite a long time. Actually, it still happens with ROOT 4.04/02 (I didn’t try a CVS HEAD snapshop yet).
When the problem arises, I usually just copy /usr/X11R6/lib/libfreetype.dylib to $ROOTSYS/lib in order to allow the linking process to be successful.