Failure compiling from source under Cygwin/gcc 3.4.4

Hi,

I have imported in XP SP2 with Cygwin/gcc 3.4.4 first V5.08.00b and
next V4.04.02g. They both fail compilation right away, like this:

nbcalcaterra:/cern/root> make
gcc -O -foptimize-sibling-calls -finline-functions -pipe -Wall -D_DLL -Iinclude -I/usr/X11R6/include -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/cppsetup.o -c build/rmkdepend/cppsetup.c
In file included from build/rmkdepend/cppsetup.c:30:
build/rmkdepend/def.h:138: error: conflicting types for ‘getline’
/usr/include/sys/stdio.h:31: error: previous declaration of ‘getline’ was here
build/rmkdepend/def.h:138: error: conflicting types for ‘getline’
/usr/include/sys/stdio.h:31: error: previous declaration of ‘getline’ was here
make: *** [build/rmkdepend/cppsetup.o] Error 1

Before, for almost a year I had run 4.04.00 precompiled for gcc 3.2.3,
adding my own compiled libraries w/o any problem; now, cygwin
bumped my gcc from 3.2.3 to 3.4.4.
Libraries compiled with it won’t load under root pre-compiled with 3.2.3
and the source won’t even start compiling.

The solution appears to be “in CVS” since January 25th: may we know
what it was please? Alternatively: could you please give
a recipe spelling out how to fix either 4.04.02g or (better) 5.08.00g?

            thanks! Sandro Calcaterra (BaBar)

Hi Sandro,[quote=“acal”]In file included from build/rmkdepend/cppsetup.c:30:
build/rmkdepend/def.h:138: error: conflicting types for ‘getline’
/usr/include/sys/stdio.h:31: error: previous declaration of ‘getline’ was here

The solution appears to be “in CVS” since January 25th: may we know
what it was please? Alternatively: could you please give
a recipe spelling out how to fix either 4.04.02g or (better) 5.08.00g?[/quote]You can do cd $ROOTSYS;cvs diff -u -D2006-01-24 -D2006-01-26 build/rmkdepend | patch -p0 to include this patch in both 4.04.02g and 5.08.00g sources. I.e. you’ll have to start from sources. Or you just use the attached rmkdepend.exe, putting it into $ROOTSYS/bin.

[quote=“acal”]Before, for almost a year I had run 4.04.00 precompiled for gcc 3.2.3,
adding my own compiled libraries w/o any problem; now, cygwin
bumped my gcc from 3.2.3 to 3.4.4.
Libraries compiled with it won’t load under root pre-compiled with 3.2.3
and the source won’t even start compiling.[/quote]Cygwin does its best to surprise us with incompatble changes. That, the fact that there are known problems with cygwin (search for cygwin and rootcint), and that win32gcc is a lot slower than the regular win32(gdk) build is the reason why win32gcc is not the production grade windowes version of root, but win32gdk.

Cheers, Axel.
rmkdepend.zip (42.2 KB)