From: Eric B. <er...@go...> - 2007-07-14 15:49:26
|
Hi Wolfgang, Wolfgang Jansen wrote: > I tried to install the new GOBO (5.6) release and ran > immediately into trouble: my preferred C compiler is "cc" > but command "$GOBO/install.sh cc" stopped with the message > > Unknown C compiler: cc > > It is really surprising that the native C compiler of many platforms > is not supported. The problem is that I only have access to Windows platform. So I can only work and test on this platform. At some point SourceForge made available other platforms through their compile farm: http://en.wikipedia.org/wiki/Compiler_farm But they don't provide this service anymore ;-( The reason why only gcc was made available is because that's the only C compiler that was available on SourceForge's compile farm platforms as far as I know. But people are free to test gec on other platforms and with other C compilers and give me some feedbacks. http://www.gobosoft.com/eiffel/gobo/gec/platforms.html BTW, what platform are you using? > When trying the same with "gcc" then many warnings like the following > were issued: > > gec.c: In function `T202f63': > gec.c:82734: warning: cast to pointer from integer of different size > > Line 82734 in C code reads > > t2 = ((T0*)gevoid(((T202*)(C))->a20, l2)); > > whereas "gevoid" is declared as > > extern int gevoid(T0* C, ...); > > Thus, the bad cast is from "int" to "T0*", i.e. from 4 to 8 bytes > on a Tru64 platform (as I'm working on). I think, the solution is > to redefine "gevoid" like "T0* gevoid(T0* C, ...)". > Just for curiosity, what is "gevoid" good for? Its definition seems > to indicate that it is the check for void targets, but there is no test > (neither in the routine nor around its call), merely printing an error > message and aborting the program. And if aborting in any case has been > planned, why then a return value? 'gevoid' is the result of the code optimizer. It means that in the corresponding Eiffel code, no matter what, this call will result in a call on Void target. For example: local s: STRING do s.append_string ("gobo") 'gevoid' is then emitted instead of the call. I think that the problem above is that I tried to use the same 'gevoid' function to replace all kinds of calls, be them procedures or functions with expanded or reference result. I was hoping that explicit type cast would make the C compiler happy, which it did with the compilers I tried. Apparently I will have to rethink about it and find a better implementation. > After the warnings an error message follows: > > as1: Error: /usr/tmp/cciOAHCE.s, line 5: gp-relative segments together > exceed 64k bytes > > Probably, the generated object file is too large. > (I had the same effect also earlier when bootstrapping the SE compiler > from a single C file instead from a split one.) Hmmm, I asked someone to test on Linux (Ubuntu 7.04) with gcc and everything worked OK. It was not my intention to work on C file splitting in the near future. I will probably have to reconsider. > Then many errors of the form > /usr/users13/wolfgang/eiffel/gobo/install.sh: > /usr/users13/wolfgang/eiffel/gobo/bin/gec: not found > /usr/users13/wolfgang/eiffel/gobo/install.sh: geant: not found > > occurred, probably a consequence of the previous error. Yes. > PS: > After adding the "cc" compiler to "install.sh" the outcome was > as follows: > > cc: Warning: gec.c, line 479288: Non-void function "gevoid" does not > contain a return statement. (missingreturn) > int gevoid(T0* C, ...) > > The bad cast is not rejected and the compilation of "gec" > is successful. Then most of "geant", ... are compiled successfully > where C compilation is again done by "gcc" (to be seen by > the warnings concerning bad casts). Why "gcc"? You will have to configure gec to use cc as C compiler. See section "Back-end C compiler" in: http://www.gobosoft.com/eiffel/gobo/gec/usage.html What this install script does is just generate the binary files in $GOBO/bin. For those of you who don't want to have to generate them by themselves, I made available the binaries for Windows in: https://sourceforge.net/project/showfiles.php?group_id=24591 Anyone is welcome to provide the binaries for his platform so that I can make them available on SourceForge as well. Wolfgang, thank you for your feedback, and don't hesitate to send me a cc.cfg file if you manage to make one working on your platform. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |