ROOT v5.32.00 compile error on OSX 10.6.8

Hi,

I am hitting a compilation error in core/textinput/src/Getline.cxx in ROOT v5.32.00, while building on OSX10.6.8 with

[ul]
]$ g++ -v # This is the system compiler rather than one on AFS
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
[/ul]

and the configuration

[ul]
./configure
macosx64
–enable-cintex
–enable-explicitlink
–enable-gdml
–enable-genvector
–enable-krb5
–enable-mathmore
–enable-minuit2
–enable-mysql
–enable-oracle
–enable-python
–enable-qt
–enable-qtgsi
–enable-reflex
–enable-roofit
–enable-table
–enable-unuran
–enable-builtin-freetype
–disable-xrootd
–disable-qt
–with-f77=gfortran
–prefix="$prefix"
–datadir="$prefix"
–bindir="$prefix/bin"
–libdir="$prefix/lib"
–incdir="$prefix/include"
–etcdir="$prefix/etc"
–docdir="$prefix"
[/ul]

The error seems to indicate a small fix to Getline.cxx is needed,

[ul]
g++ -O2 -m64 -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -DR__HAVE_CONFIG -pthread -I/Users/wbell/sw/scratch/root/core/textinput/sr
c -o core/textinput/src/Getline.o -c /Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx
/Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx: In function ‘void G
l_histadd(const char*)’:
/Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx:176: error: declaration of C function ‘void Gl_histadd(const char*)’ conflicts with
include/Getline.h:34: error: previous declaration ‘void Gl_histadd(char*)’ here
/Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx: In function ‘const char* Getlinem(EGetLineMode, const char*)’:
/Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx:184: error: declaration of C function ‘const char* Getlinem(EGetLineMode, const char*)’ conflicts with
include/Getline.h:28: error: previous declaration ‘char* Getlinem(EGetLineMode, const char*)’ here
/Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx: In function ‘const char* Getline(const char*)’:
/Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx:238: error: declaration of C function ‘const char* Getline(const char*)’ conflicts with
include/Getline.h:27: error: previous declaration ‘char* Getline(const char*)’ here
/Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx: In function ‘void Gl_histinit(const char*)’:
/Users/wbell/sw/scratch/root/core/textinput/src/Getline.cxx:261: error: declaration of C function ‘void Gl_histinit(const char*)’ conflicts with
include/Getline.h:33: error: previous declaration ‘void Gl_histinit(char*)’ here
make: *** [core/textinput/src/Getline.o] Error 1
[/ul]

?

Thanks and best regards,

Will

Hi Will,

you have an old include/Getline.h that make for some reason din’t overwrite with the new one. Just remove it and run make again.

Cheers, Axel.

Hi Axel,

Thanks for your reply. Deleting the old file did indeed fix the problem.

Best regards,

Will