Author Topic: undefined reference problem on PPC Ubuntu linux  (Read 7381 times)

dbtsai

  • Guest
undefined reference problem on PPC Ubuntu linux
« on: January 18, 2006, 08:11:50 pm »
Code
/home/build/codeblocks/trunk/src/sdk/.libs/libcodeblocks.so: undefined reference  to `PrepareSystemFunction(asCScriptFunction*, asSSystemFunctionInterface*, asCS criptEngine*)'
/home/build/codeblocks/trunk/src/sdk/.libs/libcodeblocks.so: undefined reference  to `CallSystemFunction(int, asCContext*, void*)'
/home/build/codeblocks/trunk/src/sdk/.libs/libcodeblocks.so: undefined reference  to `DetectCallingConvention(bool, asUPtr const&, int, asSSystemFunctionInterfac e*)'
collect2: ld returned 1 exit status
make[3]: *** [codeblocks] Error 1

That is from SVN 2006-01-19, and simlply I make it, but I get the above message.

How could I solve it??
I am a first time encounter this problem. Have an idea or patch?

Thanks...

by the way, hi 280Z28,
您好唷~ 您是從中國大陸來的吧?? 我是台灣人, 目前CodeBlocks有沒有中文po? 如果沒有, 我可以效力. 謝謝了.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: undefined reference problem on PPC Ubuntu linux
« Reply #1 on: January 18, 2006, 08:20:13 pm »
try

Code
make clean
make

takeshimiya

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #2 on: January 18, 2006, 08:41:03 pm »
lol, that's EXACTLY the same linker errors I get with AngelScript on my Ubuntu x64. Didn't have the (disk) space to check them.

Do you have a 64 bit OS?

dbtsai

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #3 on: January 18, 2006, 11:10:26 pm »
lol, that's EXACTLY the same linker errors I get with AngelScript on my Ubuntu x64. Didn't have the (disk) space to check them.

Do you have a 64 bit OS?

No, I run it on my ibook. It's a 32 bit powerpc.

takeshimiya

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #4 on: January 18, 2006, 11:16:29 pm »
So it seems AngelScript only compiles fine on x86 32 bits.

It's probable that it's because the functions call optimizations.

dbtsai

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #5 on: January 18, 2006, 11:34:52 pm »
try

Code
make clean
make

Still not work.

dbtsai

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #6 on: January 18, 2006, 11:36:01 pm »
So it seems AngelScript only compiles fine on x86 32 bits.

It's probable that it's because the functions call optimizations.

But about one mounth ago, I could compile SVN on my ibook.
What's up?

venix

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #7 on: January 23, 2006, 01:20:00 am »
#define AS_MAX_PORTABILITY

Add that to your src/sdk/as/source/as_config.h file.
Any place outside of #ifdef's that arent for your specific system would be fine.

I didn't really look for another way of activating that. But it allowed me to compile it with a 64bit system.

takeshimiya

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #8 on: January 23, 2006, 01:48:13 am »
Yes, I've done that, but there are some other things that prevents compiling.
Anyways, I'll make a patch.
And more anyways, having support for fast calls in 64 bits (thus no need for AS_MAX_PORTABILITY) is planned for the next release version.

venix

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #9 on: January 23, 2006, 02:08:59 am »
Yah, just ran into that issue as I tried to run it.  Seems most the problem lies with Angelscript not being 64bit compatible. If you check the WIP page, it is first on their todo list.
« Last Edit: January 23, 2006, 02:13:38 am by venix »

dbtsai

  • Guest
Re: undefined reference problem on PPC Ubuntu linux
« Reply #10 on: February 02, 2006, 05:37:51 pm »
From
http://www.gamedev.net/community/forums/topic.asp?topic_id=372641

You need to define the compiler flag AS_MAX_PORTABILITY so that AngelScript is built with the generic calling convention. The drawback of this is that all functions registered with AngelScript must use the asCALL_GENERIC calling conventions.

So we may just define AS_MAX_PORTABILITY to solve this problem temporily.