Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Jenna on January 03, 2010, 05:10:40 pm

Title: svn r6035 build broken on 64-bit linux and 32-bit windows
Post by: Jenna on January 03, 2010, 05:10:40 pm
Error message:
Code
||=== Code::Blocks - Unix, Squirrel ===|
include/scripting/include/squirrel.h|79|error: ‘SQUnsignedInteger’ does not name a type|
include/scripting/include/squirrel.h|84|error: ‘SQUnsignedInteger’ does not name a type|
include/scripting/include/squirrel.h|85|error: ‘SQInteger’ does not name a type|
include/scripting/include/squirrel.h|233|error: ‘SQInteger’ does not name a type|
include/scripting/include/squirrel.h|243|error: ‘SQRawObjectVal’ does not name a type|
include/scripting/include/squirrel.h|256|error: ‘SQInteger’ does not name a type|
[...]
||=== Build finished: 772 errors, 8 warnings ===|

The #ifdef's in squirrel.h seem to be broken.
No time to figure it out at the moment.
Title: Re: svn r6035 build broken on 64-bit linux
Post by: stahta01 on January 03, 2010, 10:00:40 pm
Was it an 32 or 64 bit target platform? Missed 64 bit in the message Title.

Tim S.
Title: Re: svn r6035 build broken on 64-bit linux and 32-bit windows
Post by: Jenna on January 03, 2010, 10:14:07 pm
As the title said it was on a 64-bit linux and it was a standard-build via project-file, that means target is also 64-bit.

The following patch works for me, it readds the defines for 64-bit non-windows-platforms from the original squirrel.h.
But I do not know, if it can interfere with other changes made for 64-bit windows compatibility.
So I will not commit it, at least not without a check by Biplab, who made the changes for windows.


EDIT:
Does not work (only for my first error) !
I get the same linking error as described below.
Code
--- tmp/tmpJqjCWW-meld/squirrel.h 
+++ home/jens/codeblocks-build/codeblocks.trunk/src/include/scripting/include/squirrel.h
@@ -52,6 +52,10 @@
 typedef long long SQInteger;
 typedef unsigned long long SQUnsignedInteger;
 typedef unsigned long long SQHash; /*should be the same size of a pointer*/
+#else /* all other 64-bit platforms */
+typedef long SQInteger;
+typedef unsigned long SQUnsignedInteger;
+typedef unsigned long SQHash; /*should be the same size of a pointer*/
 #endif
 typedef int SQInt32;
 #else
Title: 6035 breaking build on winxp 32bit with mingw
Post by: ouch on January 04, 2010, 12:36:42 am
Code
sdk\scripting\lib\libsqstdlib.a(sqstdio.o)||In function `sqstd_register_iolib':|
C:\codeblocks\src\sdk\scripting\sqstdlib\sqstdio.cpp|398|undefined reference to `declare_stream(SQVM*, char const*, void*, char const*, tagSQRegFunction*, tagSQRegFunction*)'|
sdk\scripting\lib\libsqstdlib.a(sqstdblob.o)||In function `sqstd_register_bloblib':|
C:\codeblocks\src\sdk\scripting\sqstdlib\sqstdblob.cpp|249|undefined reference to `declare_stream(SQVM*, char const*, void*, char const*, tagSQRegFunction*, tagSQRegFunction*)'|
||=== Build finished: 2 errors, 0 warnings ===|

usually I just svn update, double click CodeBlocks.cbp, hit build and I get a new exe. I tried rebuilding to no avail as well.
Title: Re: 6035 breaking build on winxp 32bit with mingw
Post by: stahta01 on January 04, 2010, 01:10:32 am
I have the same link error on Windows 7 32 bit.

Tim S.
Title: Re: svn r6035 build broken on 64-bit linux and 32-bit windows
Post by: Jenna on January 04, 2010, 07:14:10 am
I just merged the topic started by ouch with this one, because the cause for that problem seems to be the change for 64-bit windows in svn r6034 and r6035.
Title: Re: svn r6035 build broken on 64-bit linux and 32-bit windows
Post by: MortenMacFly on January 04, 2010, 07:31:31 am
The following patch works for me, it readds the defines for 64-bit non-windows-platforms from the original squirrel.h.
While merging I noticed other Linux 64bit changes introduced in our C::B version have been removed, too. What mean "works for me"? Just compilation works or did you also try running basic test scripts (e.g. a scripted plugin and/or wizards)?
Title: Re: svn r6035 build broken on 64-bit linux and 32-bit windows
Post by: Jenna on January 04, 2010, 07:49:03 am
The following patch works for me, it readds the defines for 64-bit non-windows-platforms from the original squirrel.h.
While merging I noticed other Linux 64bit changes introduced in our C::B version have been removed, too. What mean "works for me"? Just compilation works or did you also try running basic test scripts (e.g. a scripted plugin and/or wizards)?
No just compiling (until it steps over the error), but I get the same linking error (declare_stream), but I totally overlooked it yesterday (too much things to do in parallel).

I think it was a little late for me yesterday  :( .
It's time to go to work and relax from holiday  :) .
Title: Re: 6035 breaking build on winxp 32bit with mingw
Post by: MortenMacFly on January 04, 2010, 08:51:40 am
Code
sdk\scripting\lib\libsqstdlib.a(sqstdio.o)||In function `sqstd_register_iolib':|
C:\codeblocks\src\sdk\scripting\sqstdlib\sqstdio.cpp|398|undefined reference to `declare_stream(SQVM*, char const*, void*, char const*, tagSQRegFunction*, tagSQRegFunction*)'|
sdk\scripting\lib\libsqstdlib.a(sqstdblob.o)||In function `sqstd_register_bloblib':|
C:\codeblocks\src\sdk\scripting\sqstdlib\sqstdblob.cpp|249|undefined reference to `declare_stream(SQVM*, char const*, void*, char const*, tagSQRegFunction*, tagSQRegFunction*)'|
||=== Build finished: 2 errors, 0 warnings ===|
This can be easily resolved: We patched squirrel to use "const SQChar* name" instead of "SQChar* name" as function argument to make the GCC compiler happy. This is still in the header file, but in the implementation file the const is  missing. I'll apply the fix later in SVN.
Title: Re: 6035 breaking build on winxp 32bit with mingw
Post by: Biplab on January 04, 2010, 09:33:16 am
This can be easily resolved: We patched squirrel to use "const SQChar* name" instead of "SQChar* name" as function argument to make the GCC compiler happy. This is still in the header file, but in the implementation file the const is  missing. I'll apply the fix later in SVN.

I missed it. Thanks for pointing it out.

While merging I noticed other Linux 64bit changes introduced in our C::B version have been removed, too. What mean "works for me"? Just compilation works or did you also try running basic test scripts (e.g. a scripted plugin and/or wizards)?

If any portion of C::B specific patch is missing, feel free to add it. It seems I have missed out a number of things. I'll look into this issue later. :)
Title: Re: svn r6035 build broken on 64-bit linux and 32-bit windows
Post by: Biplab on January 04, 2010, 10:50:42 am
Hi Jens and Morten,

I've taken the liberty of applying your patches to trunk. Thanks for pointing this and coming up with a patch. Please post if other issues are there.

As written in my previous post, I'll look into C::B specific patches (which I've missed out in my previous commit) later. Before I committed the patch I tested it on Win 64 and the build went fine.


Thanks & Regards,

Biplab
Title: Re: svn r6035 build broken on 64-bit linux and 32-bit windows
Post by: ouch on January 06, 2010, 02:57:33 am
everything compiles fine now for me, thanks!