Cannot compile Dictionary under cygwin

hi again,

this is part II of root.cern.ch/phpBB2/viewtopic.php?t=3810
i made a new thread as my forum membership is now activated…

the suggestion previously was to use gcc 3.4.4-2… so here’s what i did.

  1. completely scorched my cygwin install, and started over, now selecting gcc 3.4.4-2 as Axel suggested.
  2. built root:

cd $ROOTSYS ./configure win32gcc make make install
this worked perfectly, and i could start root, open a TBrowser etc…
3. tried again to build my trivial little test program (tarball attached to this post)

make distclean make

the output was

g++ -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include -D_REENTRANT -I/cygdrive/c/root/include -g -c test.cpp Generating dictionary [ testDict.cpp ] from [ test.h testLinkDef.h ] g++ -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include -D_REENTRANT -I/cygdrive/c/root/include -g -c testDict.cpp In file included from testDict.cpp:16: testDict.h:1:1: warning: null character(s) ignored In file included from testDict.cpp:16: testDict.h:10: error: `G__linked_taginfo' does not name a type testDict.h:11: error: `G__linked_taginfo' does not name a type testDict.h:12: error: `G__linked_taginfo' does not name a type testDict.h:13: error: `G__linked_taginfo' does not name a type testDict.h:14: error: `G__linked_taginfo' does not name a type testDict.h:15: error: `G__linked_taginfo' does not name a type testDict.h:16: error: `G__linked_taginfo' does not name a type testDict.h:17: error: `G__linked_taginfo' does not name a type testDict.h:18: error: `G__linked_taginfo' does not name a type testDict.h:19: error: `G__linked_taginfo' does not name a type testDict.h:20: error: `G__linked_taginfo' does not name a type testDict.h:21: error: `G__linked_taginfo' does not name a type testDict.h:22: error: `G__linked_taginfo' does not name a type testDict.h:23: error: `G__linked_taginfo' does not name a type testDict.h:24: error: `G__linked_taginfo' does not name a type In file included from testDict.cpp:28: /cygdrive/c/root/include/RtypesImp.h:16:2: #error RtypesImp.h should only be included by ROOT dictionaries. testDict.cpp:146: error: expected constructor, destructor, or type conversion before ';' token testDict.cpp:147: error: expected declaration before '}' token make: *** [testDict.o] Error 1

this not precisely the same errors i got under gcc 3.3.3, but still errors are being thrown at the dictionary compile step that i don’t understand…

this app is so trivial (just a mainframe and a quit button)… it compiles and runs perfectly under OSX Tiger. i also tried it under RH linux and of course there’s no problems there either, just under cygwin…

attachments are the tarball, and also the text file that cygwin’s setup.exe writes… i’m quite positive i selected 3.4.4-2 from that application…

any comments would be very much appreciated… cheers,
bill
cygwinsetup.txt (572 KB)
test.tar.gz (18.1 KB)

Hi Bill,

using your Makefile works nicely for me. Can you make sure that you indeed have updated your gcc installation? cygwin’s setup.exe is far from perfect - it took me a while to get all of gcc’s modules to 3.4.4-2 and make it install the binaries, not just uninstall 3.4.4-1. Anyway, could you check the output of cygcheck -c | grep gcc - it should show $ cygcheck -c | grep gcc gcc 3.4.4-2 OK gcc-core 3.4.4-2 OK gcc-g++ 3.4.4-2 OK gcc-g77 3.4.4-2 OK (and maybe a few more packages).

Also, ROOT doesn’t notice that the compiler version changed (and even if it wouldn’t know what to think about that). So you’ll have to do ./configure; make distclean; make; make install Otherwise the new GCC won’t be picked up.

Cheers, Axel.

hi again Axel,

$ cygcheck -c | grep gcc gcc 3.4.4-2 OK gcc-core 3.4.4-2 OK gcc-g++ 3.4.4-2 OK gcc-g77 3.4.4-2 OK gcc-mingw-core 20050522-1 OK gcc-mingw-g++ 20050522-1 OK gcc-mingw-g77 20050522-1 OK

and my root rebuild came after i scorched cygwin and then untarred the root sources tarball again from scratch inside the new cygwin areas, so it had no choice but to see the right compiler…

so, i’m still stumped - but many thanks again for your comments… cheers,
bill

Update:

so i went to a different computer (a Dell), and did all the same things. installed cygwin w/ gcc 3.4.4-2, downloaded and built root from sources (no problems, root.exe ran fine), and then attempted to built my test GUI.

this time it worked perfectly

previously i was doing all of this on a MacBook Pro which was running Windows XP via Parallels Workstation…

i can only imagine that there is something about Parallels that cygwin doesn’t like…

looks like it’s off to “[color=red]BootCamp[/color]” for me now… thanks again for all the suggestions… cheers,
bill

Hi Bill,

using the MS VC8 compiler things work perfectly fine in WinXP SP2 in Parallels on my MacBook Pro. But cygwin’s gcc I’ve not tried.

Cheers, Fons.

hi fons - thanks for that comment…

just to update… i can confirm that, in cygwin w/ gcc 3.4.4-2 while booting natively into XP pro via bootcamp:
root builds and runs fine as always…
my little test GUI builds and runs fine too!!! i’ll test my actual ‘big’ GUI project tonight, but since the test GUI threw the same errors that i saw w/ the big project, i expect success…

so, [color=blue]there is certainly something about parallels that cygwin doesn’t like[/color] (or vice versa)…

i know i need to get on-board w/ the visual studio approach eventually, but for now i’ve got a cygwin environment that seems solid… huzzah!

thanks again for all the comments, cheers
bill