freeBSD 6.1 and root 5.14

dear all,
I was trying to install root on a freeBSD 6.1 system and I had got this error:

bin/rmkdepend -R -fbase/src/TError.d -Y -w 1000 – -pipe -W -Wall -fPIC -I/usr/X11R6/include -Iinclude -pthread -D__cplusplus – base/src/TError.cxx
g++ -O -pipe -W -Wall -fPIC -I/usr/X11R6/include -Iinclude -pthread -o base/src/TError.o -c base/src/TError.cxx
base/src/TError.cxx: In function void ErrorHandler(Int_t, const char*, const char*, char*)': base/src/TError.cxx:189: error:__va_copy’ undeclared (first use this function)base/src/TError.cxx:189: error: (Each undeclared identifier is reported only once for each function it appears in.)
gmake: *** [base/src/TError.o] Error 1

Does the system lack of something? I made a full system installation (development, X, and all the other stuffs) and I don’t know how to move around this.
Many thanks.
Roberto

Hi,

according to:

pl.freebsd.org/projects/c99/index.html

va_copy should be there. Can you try the following change in root/base/inc/Varargs.h:

#if !defined(R__VA_COPY)

if defined(GNUC)

define R__VA_COPY(to, from) __va_copy((to), (from))

to

#if !defined(R__VA_COPY)

if defined(GNUC) && !defined(FreeBSD) <-- add this test

define R__VA_COPY(to, from) __va_copy((to), (from))

and let me know if that solves the problem.

Cheers, Fons.

yes,
now it compiles and that error has gone away.
Thanks a lot.
Are you planning to include that patch in the next root versions?
cheers
roberto

Hi,

the fix is now in cvs.

Cheers, Fons.

this is another error I found this morning (my PC is quite slow, I compiled during the night and that’s what I found)

g++ -shared -Wl,-x -Wl,-soname,libPyROOT.so -O -o lib/libPyROOT.so pyroot/src/TPyClassGenerator.o pyroot/src/RootModule.o pyroot/src/TRflxCallback.o pyroot/src/G__PyROOT.o pyroot/src/TPython.o pyroot/src/TPyReturn.o pyroot/src/TPyROOTApplication.o pyroot/src/TSetItemHolder.o pyroot/src/RootWrapper.o pyroot/src/Pythonize.o pyroot/src/PropertyProxy.o pyroot/src/FunctionHolder.o pyroot/src/ConstructorHolder.o pyroot/src/ClassMethodHolder.o pyroot/src/MethodHolder.o pyroot/src/MemoryRegulator.o pyroot/src/Executors.o pyroot/src/Converters.o pyroot/src/Adapters.o pyroot/src/Utility.o pyroot/src/PyBufferFactory.o pyroot/src/ObjectProxy.o pyroot/src/MethodProxy.o pyroot/src/TPyException.o pyroot/src/PyRootType.o -Llib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -Llib -lReflex -ldl -L/usr/local/lib -lpython2.4 -pthread -Llib -lCore -lCint
/usr/bin/ld: cannot find -ldl

I guess the problem is due to the fact that the libld library is in a non common directory

/usr/compat/linux/lib/libdl-2.3.2.so
/usr/compat/linux/lib/libdl.so.2

I did’n have the time to fix it (or to try to do it), I should run at office.
By the way, you will have a better solution than me…
roberto

Hi,

I 've no further experience with FreeBSD and no access to such a machine. Please try to figure it out yourself and mail me the patches.

Cheers, Fons.

Hi Roberto,
you can try to create a symbolic link to those libraries in the /usr/lib directory, where in Linux machines are usually located.

m

that was actually the way I had in mind to solve quickly the problem on my PC…
but I would like that directory to behave just like /usr/lib. I think probably there could be some further useful stuffs in it.
I should work on it.
thanks a lot

I discovered that freBSD systems have the dl functions in libc instead of in libdl (as it it in linux), so the libdl has not to be linked (that’s why it doesn’t exist in the std library directory).
The libdl I found in my freeBSD system is there because I enabled the linux compatibility, and so some linux features are there.

To solve the problem I had just compiled libPyROOT.so by hands without the -ldl flag.
The library compiles now.