Author Topic: svn r6035 build broken on 64-bit linux and 32-bit windows  (Read 12946 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
svn r6035 build broken on 64-bit linux and 32-bit windows
« 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.
« Last Edit: January 04, 2010, 07:05:36 am by jens »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: svn r6035 build broken on 64-bit linux
« Reply #1 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.
« Last Edit: January 03, 2010, 10:03:17 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: svn r6035 build broken on 64-bit linux and 32-bit windows
« Reply #2 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
« Last Edit: January 04, 2010, 07:50:29 am by jens »

Offline ouch

  • Almost regular
  • **
  • Posts: 223
6035 breaking build on winxp 32bit with mingw
« Reply #3 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: 6035 breaking build on winxp 32bit with mingw
« Reply #4 on: January 04, 2010, 01:10:32 am »
I have the same link error on Windows 7 32 bit.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: svn r6035 build broken on 64-bit linux and 32-bit windows
« Reply #5 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: svn r6035 build broken on 64-bit linux and 32-bit windows
« Reply #6 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)?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: svn r6035 build broken on 64-bit linux and 32-bit windows
« Reply #7 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  :) .

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: 6035 breaking build on winxp 32bit with mingw
« Reply #8 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: 6035 breaking build on winxp 32bit with mingw
« Reply #9 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. :)
Be a part of the solution, not a part of the problem.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: svn r6035 build broken on 64-bit linux and 32-bit windows
« Reply #10 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
Be a part of the solution, not a part of the problem.

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: svn r6035 build broken on 64-bit linux and 32-bit windows
« Reply #11 on: January 06, 2010, 02:57:33 am »
everything compiles fine now for me, thanks!