Author Topic: Compilation error with SuSE Linux 9.3 on AMD64  (Read 12213 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #15 on: May 03, 2006, 02:01:47 pm »
Yes, I know. I 'm the one trying to port AS to 64bit ;)
You have your hands everywhere... don't you?! :shock: :lol:

What I see is:
Code: [Select]
#define _LP64 1
Ok, found. There is another one:
Code: [Select]
#define __LP64__ 1
just below this:
Code: [Select]
#define __PTRDIFF_TYPE__ long int
Anyway: So this is OK. Still remaining: Why is the assertion raised if have that define set? And why is it on my system only?

By the way: I tried to integrate AS 2.6.0 by now. But I get a lot of compiler erros, allthough I set #define AS_64BIT_PTR in as_config.h:
Code: [Select]
g++ -DHAVE_CONFIG_H -I. -I. -I../../../src/sdk -I/home/ftmh/tmp/opt/wx/2.6/lib/wx/include/gtk2-unicode-release-2.6 -I/home/ftmh/tmp/opt/wx/2.6/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK_
_ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -I../../../src/sdk/wxscintilla/include -I../../../src/sdk/tinyxml -I../../../src/sdk -I../../../src/sdk/as/include -I/home/ftmh/
tmp/opt/wx/2.6/lib/wx/include/gtk2-unicode-release-2.6 -I/home/ftmh/tmp/opt/wx/2.6/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1
 -O2 -ffast-math -g -O2 -I/home/ftmh/tmp/opt/wx/2.6/lib/wx/include/gtk2-unicode-release-2.6 -I/home/ftmh/tmp/opt/wx/2.6/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64
 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -MT as_anyobject.lo -MD -MP -MF .deps/as_anyobject.Tpo -c ./source/as_anyobject.cpp  -fPIC -DPIC -o .libs/as_anyobject.o
In file included from source/as_gcobject.h:45,
                 from source/as_anyobject.h:45,
                 from source/as_anyobject.cpp:36:
source/as_array.h:110: error: prototype for `asUINT asCArray<T>::GetLength()
   const' does not match any in class `asCArray<T>'
source/as_array.h:53: error: candidate is: size_t asCArray<T>::GetLength()
   const
source/as_array.h:110: error: template definition of non-template `asUINT
   asCArray<T>::GetLength() const'
source/as_array.h:116: error: prototype for `const T&
   asCArray<T>::operator[](unsigned int) const' does not match any in class `
   asCArray<T>'
source/as_array.h:59: error: candidates are: T& asCArray<T>::operator[](long
   unsigned int)
source/as_array.h:58: error:                 const T&
   asCArray<T>::operator[](long unsigned int) const
source/as_array.h:116: error: template definition of non-template `const T&
   asCArray<T>::operator[](unsigned int) const'
source/as_array.h:124: error: prototype for `T&
   asCArray<T>::operator[](unsigned int)' does not match any in class `
   asCArray<T>'
source/as_array.h:116: error: candidates are: const T&
   asCArray<T>::operator[](unsigned int) const
source/as_array.h:59: error:                 T& asCArray<T>::operator[](long
   unsigned int)
source/as_array.h:58: error:                 const T&
   asCArray<T>::operator[](long unsigned int) const
source/as_array.h:124: error: template definition of non-template `T&
   asCArray<T>::operator[](unsigned int)'
source/as_array.h:149: error: prototype for `void
   asCArray<T>::Allocate(unsigned int, bool)' does not match any in class `
   asCArray<T>'
source/as_array.h:46: error: candidate is: void asCArray<T>::Allocate(long
   unsigned int, bool)
source/as_array.h:149: error: template definition of non-template `void
   asCArray<T>::Allocate(unsigned int, bool)'
source/as_array.h:174: error: prototype for `asUINT asCArray<T>::GetCapacity()
   const' does not match any in class `asCArray<T>'
source/as_array.h:47: error: candidate is: size_t asCArray<T>::GetCapacity()
   const
source/as_array.h:174: error: template definition of non-template `asUINT
   asCArray<T>::GetCapacity() const'
source/as_array.h:180: error: prototype for `void
   asCArray<T>::SetLength(unsigned int)' does not match any in class `
   asCArray<T>'
source/as_array.h:52: error: candidate is: void asCArray<T>::SetLength(long
   unsigned int)
source/as_array.h:180: error: template definition of non-template `void
   asCArray<T>::SetLength(unsigned int)'
source/as_array.h:189: error: prototype for `void asCArray<T>::Copy(const T*,
   unsigned int)' does not match any in class `asCArray<T>'
source/as_array.h:55: error: candidate is: void asCArray<T>::Copy(const T*,
   long unsigned int)
source/as_array.h:189: error: template definition of non-template `void
   asCArray<T>::Copy(const T*, unsigned int)'
make[4]: *** [as_anyobject.lo] Error 1
make[4]: Leaving directory `/home/ftmh/projects/codeblocks/src/sdk/as'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ftmh/projects/codeblocks/src/sdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ftmh/projects/codeblocks/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ftmh/projects/codeblocks/src'
make: *** [all-recursive] Error 1
I guess due to my limited knowledge it's maybe the best I give up with AMD64 and try Ubuntu 5.10 (32) now. Hopefully this is going to be easier... at least more productive. ;-)
With regards, Morten.

Edit: Changed angelscript.h to as_config.h.
« Last Edit: May 03, 2006, 02:06:31 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #16 on: May 03, 2006, 02:19:30 pm »
[...]and try Ubuntu 5.10 (32) now. Hopefully this is going to be easier... at least more productive. ;-)

Hello,

Yes, I think you will have no problem on Ubuntu 5.10 (32). All works fine so far :).

Happy try :).

Best wishes,
Michael

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #17 on: May 03, 2006, 02:22:20 pm »
Quote
By the way: I tried to integrate AS 2.6.0 by now. But I get a lot of compiler erros

I 've fixed these errors but I haven't submitted this patch yet.
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #18 on: May 03, 2006, 02:33:23 pm »
I 've fixed these errors but I haven't submitted this patch yet.
...well... why doesn't this make me wonder? You are unbelievable. :shock: I feel small now. ;-)

...but serioulsy: If you (or others?) don't have any other suggestions/ideas I think I'm not going to investigate in that any further. It would just have been cool to have C::B running on that server. That's because the software I'm developing is used primary on Windows and secondary on that server where I still have to use Makefiles for development which simply sucks. Anyway: Running any linux system remotely for testing which can run C::B is helpful, too. That would be the case with Ubuntu...

I'm going to monitor AS development in addition - if a new version is out I'm going to try again. And if you need "beta-testers" for AS feel free to set me on the list - as you can see I've access to evil 64bit systems... ;-)

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #19 on: May 03, 2006, 02:46:47 pm »
...just one last addition:
The assertion stated RegisterAnyObject which is also called in the constructor asCScriptEngine::asCScriptEngine(). So am I right that even if we commented out the things in scriptbindings.cpp that as soon as a script engine object is constructed the assertion has to be raised anyway? (I'm still trying to understand when and why the assertion is raised...).
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #20 on: May 03, 2006, 03:44:13 pm »
Wait, I have a hunch:

Try deleting the new project wizard plugin...

Edit: yes, this should be the reason. I haven't built this plugin in my Ubuntu64 yet because I know it won't work. That explains everything now.
« Last Edit: May 03, 2006, 03:46:57 pm by mandrav »
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #21 on: May 03, 2006, 04:07:08 pm »
mandrav, I really appreciate how you are trying to help... anyway:
Try deleting the new project wizard plugin...
I've done that with and without the #ifdef in scriptbindings.cpp.

Edit: yes, this should be the reason. [...]
The result: I come (indeed!) one step further having done that. I see the compiler selection dialog and then a message box pops up complaining that an unnused lock file in /tmp has been removed. I click ok and I'm back on the compiler select dialog. I select the GCC compiler and hit OK and (unfortunately) then I receive the same assertion.
To sum up: Yes, C::B runs further but still I believe since the AS engine object is constructed anyway which calls RegisterAnyObject it is not surprising that the assertion is raised. I would guess that it is issued later now because the asEngine object is not creeted in the project wizard plugin but somehwere else... :-(

I think to really get rid of this issue the construction of the AS engine should be ommited. But how to do that? And (more important): Does it make sense to find a workaround for this knowing that the real issue (AS 64 bit incompatibility) is already being investigated? Again: I really appreciate you are trying to help me but maybe we are "fighting" on the wrong place...?!

With best regards, Morten.
« Last Edit: May 03, 2006, 04:09:23 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #22 on: May 03, 2006, 05:47:47 pm »
What doesn't make sense is for me (and anyone else I know with 64bit systems) AS doesn't get in the way: it just doesn't work. But the rest of the program does...
Anyway, I 'll try to fix this tonight.
Be patient!
This bug will be fixed soon...

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #23 on: May 03, 2006, 06:01:17 pm »
That's because the software I'm developing is used primary on Windows and secondary on that server where I still have to use Makefiles for development which simply sucks. Anyway: Running any linux system remotely for testing which can run C::B is helpful, too. That would be the case with Ubuntu...
You can use C::B in your Windows pc and compile remotely in your Linux server: http://forums.codeblocks.org/index.php?topic=2378.0  :wink:

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #24 on: May 03, 2006, 06:07:42 pm »
Morten,

I can't make it go wrong here.
Are you allowed to use the debugger in that linux server? It would help a lot if we could get our hands on the backtrace...
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #25 on: May 03, 2006, 06:11:34 pm »
You can use C::B in your Windows pc and compile remotely in your Linux server: http://forums.codeblocks.org/index.php?topic=2378.0  :wink:
Thanks Takeshi, I'm aware of that. But compiling remotely is not enough. I need to run the programs for testing and thus require to capture the output (on the screen and in output files). So I would need a shell and X anyway. I'm doing a XDMCP connection currently which allows me to do testing. Just if I could run C::B I could automise quite some of the steps... :roll:
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #26 on: May 03, 2006, 06:12:47 pm »
Are you allowed to use the debugger in that linux server?
Yes, just tell me what to do. Because it seems there is no log file written?!
With regards, Morten.

Edit: What might help to reproduce: I do all "configures" (wxGTK and C::B) with --prefix /home/[user]/tmp. The folder ~/tmp holds a directory structure just as the linux root. So I'm not installing to /usr/local (or whatever) but to /home/[user]/tmp.
« Last Edit: May 03, 2006, 06:16:13 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Compilation error with SuSE Linux 9.3 on AMD64
« Reply #27 on: May 10, 2006, 02:48:44 pm »
I just wanted to say that I resolved this issue in a way that I added a "return;" on top of the function that throwed the assertion (void RegisterAnyObject(asCScriptEngine *engine)). Now I can compile and run under SuSE linux (after I removed the project wizard plugin). I haven't had any negative side-effects until now but there maybe some... Just for someone else stumbling on that issue - it is at least a quick fix that allows one to work with C::B... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ