Recent

Author Topic: New OpenGL Android Example  (Read 97291 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #30 on: November 17, 2011, 10:53:37 am »
And what about dynlibs whether it will work in android with openGL? At the moment he calls the error:

/usr/local/bin/arm-linux-ld: warning: link.res contains output sections; did you forget -T?
/usr/local/bin/arm-linux-ld: skipping incompatible /usr/lib/crti.o when searching for /usr/lib/crti.o
/usr/local/bin/arm-linux-ld: cannot find /usr/lib/crti.o

Please start a separate thread about your problems, since they are not related to the OpenGL example. There you can post a minimal test case to reproduce your issue and detail more about it.

Jonathan

  • New Member
  • *
  • Posts: 40
Re: New OpenGL Android Example
« Reply #31 on: November 17, 2011, 11:16:27 am »
The last part of the more error messages is that :
Code: [Select]
Assembling ndkopengltest
Linking /home/hotcyy/lazarus-ccr/bindings/android-ndk/examples/opengltest/android/libs/armeabi/libmain.so
/home/hotcyy/lazarus/fpc/binutils/ld: warning: /home/hotcyy/lazarus-ccr/bindings/android-ndk/examples/opengltest/android/libs/armeabi/link.res contains output sections; did you forget -T?
/home/hotcyy/lazarus/fpc/binutils/ld: cannot find -lGLESv1_CM
ndkopengltest.pas(36,1) Error: Error while linking
/home/hotcyy/lazarus/fpc/binutils/ld: warning: /home/hotcyy/lazarus-ccr/bindings/android-ndk/examples/opengltest/android/libs/armeabi/link.res contains output sections; did you forget -T?
/home/hotcyy/lazarus/fpc/binutils/ld: cannot find -lGLESv1_CM
ndkopengltest.pas(36,1) Error: Error while linking
ndkopengltest.pas(36,1) Fatal: There were 1 errors compiling module, stopping

the libs paths is not correct.. Is it????

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: New OpenGL Android Example
« Reply #32 on: November 17, 2011, 01:03:43 pm »
And what about dynlibs whether it will work in android with openGL? At the moment he calls the error:

/usr/local/bin/arm-linux-ld: warning: link.res contains output sections; did you forget -T?
/usr/local/bin/arm-linux-ld: skipping incompatible /usr/lib/crti.o when searching for /usr/lib/crti.o
/usr/local/bin/arm-linux-ld: cannot find /usr/lib/crti.o

Please start a separate thread about your problems, since they are not related to the OpenGL example. There you can post a minimal test case to reproduce your issue and detail more about it.
I wrote all here!
http://lazarus.freepascal.org/index.php/topic,15193.msg81702/topicseen.html#new

YarUnderoaker

  • New Member
  • *
  • Posts: 32
Re: New OpenGL Android Example
« Reply #33 on: November 17, 2011, 01:24:17 pm »
2> to modify GLScene so that it doesn't use the points in filenames. Why did they do that anyway? That breaks compatibility with released FPC versions.
No, no! GLScene has over 300 units - rename back will be hard and useless task.
Furthermore we work at new release and can break compatibility with old FPC until new one comes.
Also we like C# naming style which is promote in new latest Delphi and Lazarus - it clearly improves the readability and structuring :)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #34 on: November 17, 2011, 02:07:29 pm »
No, no! GLScene has over 300 units - rename back will be hard and useless task.
Furthermore we work at new release and can break compatibility with old FPC until new one comes.

Then it is your choice to break compatibility with existing FPC compilers like the Android cross-compiler. So you can explain to your users why it will be hard to get GLScene working on Android.

Quote
Also we like C# naming style which is promote in new latest Delphi and Lazarus - it clearly improves the readability and structuring :)

It is not "promoted" in Lazarus. Some support does not equate to "promoting"

YarUnderoaker

  • New Member
  • *
  • Posts: 32
Re: New OpenGL Android Example
« Reply #35 on: November 17, 2011, 03:00:55 pm »
Why are you so aggressively tuned, I'm not blaming anyone, and do not claim to do the work for me? I said something wrong?
We just need couple features and spend free time to do open source project without any own profit for many users which can use Lazarus too, so indirectly by participating in its popularization.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #36 on: November 17, 2011, 03:13:47 pm »
Why are you so aggressively tuned, I'm not blaming anyone, and do not claim to do the work for me?

Ok, sorry, I think I need vacations =D

Jonathan

  • New Member
  • *
  • Posts: 40
Re: New OpenGL Android Example
« Reply #37 on: November 18, 2011, 03:38:48 am »
Hi felipemdc,I'm sorry to trouble you again.At last I find the libs path is not correct ,so I copy all the files of lib to the opengltest directory to fix the problem(why the -Fl  doesnot work? I am confused) ,but another error shows .please do me a favor!
Code: [Select]
Assembling android_native_app_glue
ndkopengltest.pas(37,11) Note: Local variable "dummy" not used
ndkopengltest.pas(204,19) Hint: Local variable "engine" does not seem to be initialized
ndkopengltest.pas(194,11) Hint: Local proc "android_main" is not used
ndkopengltest.pas(4,21) Hint: Unit "native_activity" not used in ndkopengltest
Assembling ndkopengltest
Linking /home/hotcyy/lazarus-ccr/bindings/android-ndk/examples/opengltest/android/libs/armeabi/libmain.so
/home/hotcyy/lazarus/fpc/binutils/ld: warning: /home/hotcyy/lazarus-ccr/bindings/android-ndk/examples/opengltest/android/libs/armeabi/link.res contains output sections; did you forget -T?
ndkopengltest.pas(36,1) Error: Util /home/hotcyy/lazarus/fpc/binutils/strip not found, switching to external linking
ndkopengltest.pas(36,1) Fatal: There were 1 errors compiling module, stopping

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #38 on: November 18, 2011, 07:09:44 am »
Strip is called after the binary was fully generated, so you can just ignore the error if you got your libmain.so file now and move to the next step.

You can check in Project Options in the Linking tab. Disable strip symbols there. But it is strange that it is active, I think it is disabled in the test project.

About the -Fl problem, I have no idea, you could try asking in the free pascal mailling list.

Andru

  • Full Member
  • ***
  • Posts: 112
Re: New OpenGL Android Example
« Reply #39 on: November 21, 2011, 06:32:57 pm »
Quote
In the beginning of February a Android break was introduced, so I would only use revision from January as a starting point.
Hmm, and what was broken? This branch - http://svn.freepascal.org/svn/fpc/branches/fixes_2_6/ works for me, but there are some problems like using unit Unix or math will crash your app. Doest it work with old versions of FPC?
« Last Edit: November 21, 2011, 06:38:56 pm by Andru »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #40 on: November 21, 2011, 06:42:32 pm »
Quote
In the beginning of February a Android break was introduced, so I would only use revision from January as a starting point.
Hmm, and what was broken? This branch - http://svn.freepascal.org/svn/fpc/branches/fixes_2_6/ works for me, but there are some problems like including unit Unix or math will crash your app. Doest it work with old versions of FPC?

does sysutils work for you or de they crash too?

Andru

  • Full Member
  • ***
  • Posts: 112
Re: New OpenGL Android Example
« Reply #41 on: November 21, 2011, 06:59:35 pm »
Quote
does sysutils work for you or de they crash too?
SysUtils, what is this? I have never used them :) But I tried and yes, SysUtils in uses clause make my engine crash at start... Seems now I see where my problems come from. I will try to use static linking with some libraries on older version of FPC, thanks :)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #42 on: November 21, 2011, 08:06:00 pm »
SysUtils, what is this? I have never used them :) But I tried and yes, SysUtils in uses clause make my engine crash at start... Seems now I see where my problems come from. I will try to use static linking with some libraries on older version of FPC, thanks :)

Ok, so that's it then. SysUtils works fine in my cross-compiler from 19th January 2011. This breakage was introduced in February and is present in 2.6. See:

http://bugs.freepascal.org/view.php?id=18833

Another break was introduced very recently. See:

http://bugs.freepascal.org/view.php?id=20726

I'm amazed that you didn't know SysUtils, it is probably the most important unit in Object Pascal, after System and Classes.

Andru

  • Full Member
  • ***
  • Posts: 112
Re: New OpenGL Android Example
« Reply #43 on: November 21, 2011, 08:31:22 pm »
Quote
I'm amazed that you didn't know SysUtils
That was a joke :) I know about this unit, but it makes my programs too fat, so I always avoid using it on every platform(Linux, Windows/WinCE, MacOS, iOS and currently on Android).

Andru

  • Full Member
  • ***
  • Posts: 112
Re: New OpenGL Android Example
« Reply #44 on: November 21, 2011, 09:12:55 pm »
Hmm, revision 1650 doesn't work at all for ZenGL and Chipmunk... And seems this is because of bug with calling functions via references on ARMv5, which was fixed later. And without JNI this is not interesting to play around Android 2.3+...

update: this patch didn't help, so seems there are some other troubles.
« Last Edit: November 21, 2011, 09:22:13 pm by Andru »

 

TinyPortal © 2005-2018