This is a request that might interest a few ROOT users. I am currently working on a FreeBSD 8.2 workstation and I use ROOT for large part of my analysis. I have noticed that ROOT support for FreeBSD systems is outdated. The configure script does not support FreeBSD >7. I have been trying to compile ROOT on my FreeBSD 8.2 workstation using the configuration for FreeBSD 7, but apparently I have been able to compile without problems only ROOT 5.26.00. Any other ROOT version requires quite a bit of modification of the source code of headers, includes and compiler options. My current gcc is v4.2.1.
Is the ROOT development team still willing to support ROOT on FreeBSD systems? In general, it is not too much work to fix the compiler options and includes.
To compile root v5.32.00 (configured with “freebsd7”) on a PC running FreeBSD 8.2-RELEASE-p6, I need only to modify ‘include/TGenCollectionProxy.h’ to #include <stdlib.h> instead of <malloc.h>: the diff file will be attached to this post (might be better to check the version of FreeBSD, but I don’t have any PC running FreeBSD older than 8.2-RELEASE… Furthermore, FBSD-7.4-RELEASE is thought of as a "legacy production release now…)
I’ve NOT tested it thoroughly, though…
By the way, when invoked, it spits warnings like the following; I don’t know whether these are harmless or not…
[code][furutaka@fbsd8xR ~]$ root
*
W E L C O M E to R O O T *
*
Version 5.32/00 2 December 2011 *
*
You are welcome to visit our Web site *
http://root.cern.ch *
*
ROOT 5.32/00 (tags/v5-32-00@42375, Dec 02 2011, 12:42:25 on freebsd7)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Warning: Automatic variable ios_base::nocreate is allocated /usr/local/root/cint/cint/include/iosenum.h:14:
Warning: Automatic variable ios_base::noreplace is allocated /usr/local/root/cint/cint/include/iosenum.h:15:
Warning: Automatic variable ios_base::stdio is allocated /usr/local/root/cint/cint/include/iosenum.h:37:
[/code]
[quote]To compile root v5.32.00 (configured with “freebsd7”) on a PC running FreeBSD 8.2-RELEASE-p6, I need only to modify ‘include/TGenCollectionProxy.h’ to #include <stdlib.h> instead of <malloc.h>:
[/quote]What was the error message without it (so I can properly record why it is needed)?
(...)
g++ -O -pipe -W -Wall -fPIC -I/usr/local/include -Iinclude -pthread -o io/io/src/TGenCollectionStreamer.o -c /usr/home/furutaka/work/root/root_v5.32.00/io/io/src/TGenCollectionStreamer.cxx
In file included from include/TGenCollectionProxy.h:43,
from include/TGenCollectionStreamer.h:23,
from /usr/home/furutaka/work/root/root_v5.32.00/io/io/src/TGenCollectionStreamer.cxx:26:
/usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>"
gmake: *** [io/io/src/TGenCollectionStreamer.o] Error 1
The contents of the ‘/usr/include/malloc.h’ of FreeBSD-8.2-RELEASE-P6:
/* $FreeBSD: src/include/malloc.h,v 1.5.36.1.6.1 2010/12/21 17:09:25 kensmith Exp $ */
#if __STDC__
#error "<malloc.h> has been replaced by <stdlib.h>"
#else
#include <stdlib.h>
#endif
I had some problems installing current ROOT version 5.32.03 on PC-BSD 9.0 (it is basically FreeBSD 9.0). FreeBSD 9.0 implements several different features compared to 8.x. First of all, I had some troubles linking libMathMore, therefore I decided to exclude it
./configure freebsd7 --disable-mathmore
Then I had to patch core/base/src/TTimeStamp.cxx. Attached you can find the diff file. It worked for me. Still I have some warnings when starting root
[pcbsd9] ~> root
*******************************************
* *
* W E L C O M E to R O O T *
* *
* Version 5.32/03 9 May 2012 *
* *
* You are welcome to visit our Web site *
* http://root.cern.ch *
* *
*******************************************
ROOT 5.32/03 (branches/v5-32-00-patches@44167, May 10 2012, 12:31:00 on freebsd7)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Warning: Automatic variable ios_base::nocreate is allocated /usr/local/root/root_v5.32.03/cint/cint/include/iosenum.h:14:
Warning: Automatic variable ios_base::noreplace is allocated /usr/local/root/root_v5.32.03/cint/cint/include/iosenum.h:15:
Warning: Automatic variable ios_base::stdio is allocated /usr/local/root/root_v5.32.03/cint/cint/include/iosenum.h:37:
root [0]