Hi all I have done a fresh svn co http://www.squeakvm.org/svn/squeak/branches/Cog After doing that my previously successfull cmake build bit the dust. As a sanity check, I then attempted a mvm build in build.linux32x86/squeak.cog.v3/build/mvm and this bombed out. The same mvm build on an older source tree works fine. For the c build, it gripes a lot about a lot of 'x' is used but never defined and ends with:
My cmake build (which was working prior to my svn CO of the latest) started complaining along similar lines:
Any pointers on how to think about this are appreciated. cheers. tty thx. tty |
On Sat, Jul 19, 2014 at 1:18 PM, gettimothy <[hidden email]> wrote: --
It looks like you have the "treat warnings as errors" compiler flag switched on. I admire the purity of those that think this is appropriate but we're not there yet. There are very few warnings issued from the interpreter, one form the cogit, but many from plugins. And that warning form the cogit is IMO fascist, and I'm not interested in buckling under ;-)
aloha, Eliot
|
Hi Eliot. I was able to get the code to compile by modifiying the function declarations in cogit.c and gcc3x-interp.c Apologies in advance if my terms are not exact--I am a bit tired and my brain is duller than usual. Taking the first compile error as representative,
the problem was the "NoDbgRegParms" tacked on to the end of the function declaration at line 384 and not being there on the function implementation at 1820--that error happened for all the declarations. you can see them here:
I noticed too that my old branch did not have those NoDbgRegParms tacked on while the live Cog trunk does. So, I edited both cogit.c and gcc3x-cointerp.c and got rid of those NoDbgRegParms and then torched the -DNDEBUG -DDEBUGVM flags and the thing compiled in both cmake and make and ran. (The cmake version does use the -D flags) It will be a couple of days before I can devote a study session to your email on the assertion inlining stuff. I just wanted to bring this to your attention in case some 'assertion inlined code' was submitted to svn if such a thing is possible. Thanks for your pointers on the -w stuff. I have always lived in fear of gcc output, but I am starting to look at it logically; I am beginning to see the outlines of a forest for the trees (: cordially, tty. |
Hi Timothy,
On Sun, Jul 20, 2014 at 12:40 PM, gettimothy <[hidden email]> wrote:
Read the commit comment for r2922: Slang: In non-production VMs add an attribute to disable register parameters (at least for GCC-compliant compilers), allowing all static functions to be called from
gdb even in the -O1 assert VMs. These defines, which precede the external declaration of e.g. abstractRegisterForConcreteRegister: #if !PRODUCTION && defined(__GNUC__) && !defined(NoDbgRegParms)
# define NoDbgRegParms __attribute__ ((regparm (0))) #endif #if !defined(NoDbgRegParms) # define NoDbgRegParms /*empty*/ #endif should result in
static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg) __attribute__ ((regparm (0))); ... static sqInt
abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg) { ... or
static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg); ... static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)
{ ... The first is legal input to gcc. The second is legal C.
Aloha, Eliot
|
Hi Eliot.
Thank you. I have to switch gears for a couple of days to make some $$. I will study this in detail later this week. Cordially, tty
|
In reply to this post by Eliot Miranda-2
Hi Eliot. What/where sets the PRODUCTION and NoDbgRegParms variables in the #if !PRODUCTION && defined(__GNUC__) && !defined(NoDbgRegParms) check ? Are they set by 'somewhere' by various -D flags in the mvm? I have grepped to no avail. Here is my thinking at the moment. The compiler error is showing that the NoDbgRegParms is not being replaced.
So the question becomes "why not". Well, because the pre-processor (?) is not replacing them. Why? hmmmm.... thx for your time. tty |
On Thu, Jul 31, 2014 at 6:48 AM, gettimothy <[hidden email]> wrote: --
PRODUCTION is defined in platforms/Cross/vm/sqAssert.h
The !defined(NoDbgRegParms) phrase allows someone to define an alternative on the command line via a -D argument, so it allows the
# define NoDbgRegParms __attribute__ ((regparm (0))) def to be a default, rather thna the only way.
Both gcc -v & gcc -E can help debug these kinds of things.
Aloha, Eliot
|
Thank you, I am able to compile by modifying the cogit.h and cointerp.h to unconditionally set the NoDbgRegParms --so that confirms my theory.
ahhh...."ding! ding! ding!" goes the bell in my head...
I see it. -DNDEBUG toggles it , my problems with assert enabled builds probably lies in here....
so, I have two/three more -D definitions to think through...-DNoDbgRegParms -DNoDbgRegParms "something funky here" -DNeverInline Thanks your answer has given me the tools I need to think this through. . cheers. tty |
btw in my builds for windows I needed to declare the ifdef like this: #if !PRODUCTION && defined(__GNUC__) && !(defined(__MINGW32__) || defined(__MINGW64__)) && !defined(NoDbgRegParms) because otherwise mingw build was going crazy :P Esteban
On 31 Jul 2014, at 19:56, gettimothy <[hidden email]> wrote:
|
Hi Estaban,
That is good to know. thx. tty |
In reply to this post by Eliot Miranda-2
Good news. I get the same failure on a pure 32 bit Slackware install on a different computer. (!) That removes one variable from the problem set. I can follow the rabbit trail down on my good workstation with renewed confidence. Work will be slow for a bit, but I am still on it. cordially, tty.
|
Free forum by Nabble | Edit this page |