[fpc-devel] fpc fails to link against libc on some architectures due to multiarch

2011-08-12 Thread peter green

reassign 636802 fpc
thanks

From my testing on armel I now belive that the issue causing the 
lazarus build failures is a problem with freepascal and multiarch. I 
haven't tried to troubleshoot the issue on powerpc or sparc as I don't 
have access to them but I presume it is the same issue.


On armel the problem seems to be that freepascal can't find crti.o in 
the new multiarch path. Confusingly if freepascal can't find crti.o then 
rather than throwing an error it simply omits it from link.res. Manually 
pointing freepascal at the multiarch path by using 
-Fl/usr/lib/arm-linux-gnueabi (for armel) allows the test program to be 
built successfully. I presume the problem is the same on powerpc and 
sparc but I have no way of testing those.


So it would seem that the multiarch library path for the relavent 
architecture needs to be added to the default freepascal search path 
either through adding it to the default configuration file or adding it 
to the hardcoded list in fpcsrc/compiler/systems/t_linux.pas .



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 12-8-2011 14:54, Flávio Etrusco wrote:
|
Look at the documentation, that is easier:
http://developer.android.com/sdk/ndk/index.html as a start.
Almost ALL OpenGl calls are available under Android Gingerbread.
In all my postings I am talking about Gingerbread or higher.
But indeed, I am just experimenting. Wait until I post a link to my 
code. It works. And it is simple.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Flávio Etrusco
On Fri, Aug 12, 2011 at 9:18 AM, Michael Schnell  wrote:
> On 08/12/2011 01:56 PM, Thaddy wrote:
>>
>> It is not slow at all, it is lightning fast.
>
> So it obviously does use rendering hardware.
>>
>> As far as I suspect the framebuffer manipulation is indeed through the
>> kernel.
>
> I did not take a look into the framebuffer driver API, but it's quite
> obvious that it does provide support for hardware rendering.
>>
>> If you use openGL v2 there's of course just one abstraction layer extra.
>
> Yep. I did understand wrong that not using GL would imply not using the
> rendering hardware and directly writing to  the pixel array instead.
>
> -Michael
>

I remember people complaining that Android didn't do (IIRC) screen
composition on the GPU, and this was even officially disclaimed.
Unfortunately all I could find right now is this:
http://androidforums.com/android-lounge/29584-why-doesnt-androids-gui-use-gpu-acceleration.html
Hmm, and this: 
http://android-developers.blogspot.com/2011/03/android-30-hardware-acceleration.html

-Flávio
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Dariusz Mazur

And more important for me: the same code I can use on several OS:
Android, WebOs, Linux, Windows, .. iOs ( I hope that FPC will be able to
crosscompile to iOs soon), server can be embedded or standalone


This might not be possible from non Apple targets, because of Apple's
licence restrictions (the OS X users might be able to tell more
regarding this). If you have a OS X and the iPhone SDK this is already
possible...


I count on it. Purchase  machine with OS X is not problem, when I come 
around than my source will work.





--
  Darek



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 12-8-2011 14:18, Michael Schnell wrote:

If you use openGL v2 there's of course just one abstraction layer extra.
Yep. I did understand wrong that not using GL would imply not using 
the rendering hardware and directly writing to  the pixel array instead.
Will not only provide screenshot but actual, dismal! - what-if kind of 
code link, scratchpad,  code this weekend. That seems more useful for 
the forum.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/12/2011 01:56 PM, Thaddy wrote:

It is not slow at all, it is lightning fast.

So it obviously does use rendering hardware.
As far as I suspect the framebuffer manipulation is indeed through the 
kernel. 
I did not take a look into the framebuffer driver API, but it's quite 
obvious that it does provide support for hardware rendering.

If you use openGL v2 there's of course just one abstraction layer extra.
Yep. I did understand wrong that not using GL would imply not using the 
rendering hardware and directly writing to  the pixel array instead.


-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/12/2011 10:52 AM, Dariusz Mazur wrote:


For me browser has more capabilities than native widgets.


But you can't use the Lazarus GUI designer. I feel that without same the 
development is far more stressful.


-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 12-8-2011 14:06, Michael Schnell wrote:

On 08/11/2011 05:28 PM, Thaddy wrote:

Not really/ somewhat / close enough

Can you provide a photo ?

 - Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Course. Mail it when I am at home.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/11/2011 05:28 PM, Thaddy wrote:

Not really/ somewhat / close enough

Can you provide a photo ?

 - Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 12-8-2011 13:44, Michael Schnell wrote:

On 08/11/2011 11:24 PM, Graeme Geldenhuys wrote:

I will offer fpGUI support to anybody that works on LCL-fpGUI though.
So if you do go that route and get stuck with fpGUI concepts, don't
hesitate to send me a mail.

Great.

Sven: For me right now the biggest problem with fpGUI/LCL is that 
Application.QueuAsyncCall (and similar things) does not work.


Maybe we can work together on improving fpGUI/LCL.

-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
I volunteer to be an easy target. Not good enough at Android and 
compiler stuff yet, although my stuff works. I am more than good enough 
at coding and review, though. And comparing different languages on the 
same platform. (C, C++, Java, Pascal)

At least my toolchain seems to be working ;-)
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 12-8-2011 13:16, Michael Schnell wrote:

On 08/11/2011 04:09 PM, Jeppe Græsdal Johansen wrote:
 Android also has some support for a pixbuf object in native mode, 
which I guess could be used for the same
Having the processor write into the pixel array would be horribly 
slow. I am right now planning a hardware design using TI ARM 
processors that also very often are used in Android devices. Many of 
them do have hardware for creating 2D and 3D graphics (similar to PC 
graphics hardware and somehow Direct-X compatible.


So I do suppose that there are means in the Linux Kernel framebuffer 
driver to use this feature.


-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

It is not slow at all, it is lightning fast.
As far as I suspect the framebuffer manipulation is indeed through the 
kernel. If you use openGL v2 there's of course just one abstraction 
layer extra.


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/11/2011 11:24 PM, Graeme Geldenhuys wrote:

I will offer fpGUI support to anybody that works on LCL-fpGUI though.
So if you do go that route and get stuck with fpGUI concepts, don't
hesitate to send me a mail.

Great.

Sven: For me right now the biggest problem with fpGUI/LCL is that 
Application.QueuAsyncCall (and similar things) does not work.


Maybe we can work together on improving fpGUI/LCL.

-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/11/2011 09:58 PM, Graeme Geldenhuys wrote:

Umm.. I'm getting more and more interested in the Android platform.
Maybe it's time I officially start working on a OpenGL backend for
fpGUI. fpGUI would at least guarantee a small executable - at least
compared to LCL.

Great !!

Of course fpGUI / LCL would be a nice and easy way to have an 
application run on Android.


As you know I am working on a bare metal embedded ARM Linux system (no 
Android installed). I did install GTK so maybe an application with GTK 
Widget type could work, but for embedded stuff fpGUI makes more sense.


Right now I have a testing hardware with a processor that does not do 
hardware rendering and the GUI (I just tested some standard "Desktop"s) 
seem rather sluggish. In the end I supposedly will use a chip that has a 
hardware rendering unit, thus using fpGUI with openGL support seem a 
perfect choice.


Thanks for your work, (and let me know when I can of any help...)
-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Sven Barth

Am 12.08.2011 10:52, schrieb Dariusz Mazur:


Even if KSD or now FireMonkey supports ARM Linux this does not mean
anything for Android. While Android does support native Linux
applications it does not have a X server. Currently the only possibility
for this is to run a X server through a VNC viewer and thus you can not
reproduce the usual feel of an Android application.



I prefer other approach. My application have webapp with embedded http
server, crosscompiled to ARM as Android library
Whole GUI act in webview
(http://developer.android.com/reference/android/webkit/WebView.html )
Only small Jni is needed to loadlibrary

For me browser has more capabilities than native widgets. With full css3
support i can use gradient background, rounded corners etc.
HTML5 today is most powerful attempt to GUI : fast,full-featured,
multiplaftorm, OS agnostic,

And more important for me: the same code I can use on several OS:
Android, WebOs, Linux, Windows, .. iOs ( I hope that FPC will be able to
crosscompile to iOs soon), server can be embedded or standalone


This might not be possible from non Apple targets, because of Apple's 
licence restrictions (the OS X users might be able to tell more 
regarding this). If you have a OS X and the iPhone SDK this is already 
possible...


Regards,
Sven

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/11/2011 05:20 PM, Thaddy wrote:


Since you have access to a NDI native  screenbuffer 
Does this mean, you can't use the hardware rendering (if the Chip 
provides it) ?


you can use opengl v 2 to render anything directly without qt if you 
want, so small is definitely possible.

That answers the question I asked before :) .

So FireMonkey aka KSDev/GLScene should be working out of the box.

Thus XE2 (using FPC) should be able to create GUI programs not only for 
iPhone/iPAD, but also for Android phones and Pads from the same source code.


Great for Delphi users and for FPC

-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/11/2011 04:33 PM, Thaddy wrote:


I have qt code running myself on an very cheap Android 2.3 tab from a 
toyshop and it works a charm.

GREAT !

Maybe you might be ablt to check if OpenGL is supported, too.

I also have Mono/.net code running on it.

Great ;)
Currently both under C and C#. The Freepascal examples run a bit 
strange (maybe ARM EABIv7 for Cortex 8, still palyimng with it)

We4 trust that you will get it going :).

You definitely only need JNI before Android 2.3. So that part is correct.

Sounds encouraging !

-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/11/2011 04:09 PM, Jeppe Græsdal Johansen wrote:
 Android also has some support for a pixbuf object in native mode, 
which I guess could be used for the same
Having the processor write into the pixel array would be horribly slow. 
I am right now planning a hardware design using TI ARM processors that 
also very often are used in Android devices. Many of them do have 
hardware for creating 2D and 3D graphics (similar to PC graphics 
hardware and somehow Direct-X compatible.


So I do suppose that there are means in the Linux Kernel framebuffer 
driver to use this feature.


-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 12-8-2011 11:07, Felipe Monteiro de Carvalho wrote:
Just one hint: Android is a *lot* more then just drawing some 
graphics. For example: 1> Virtual keyboard. There are dozens and 
dozens, even widespread devices like Galaxy Tab come with non-standard 
keyboards, some of them only for China, some only for Taiwan. The 
manufacturers always make sure the standard widgets work fine with 
those keyboards, but custom drawn toolkits have a really hard time 
keeping up. And you can't test this with the emulator, you need 100+ 
devices to make sure it works everywhere. I don't know what Qt did, 
but I bet it doesn't work with half of the virtual keyboards out there.

qt specifies Gingerbread (2.3) afaik. I may be wrong here.

Besides, it is a simple XML configuration file for the keyboard mapping 
and if you want to use it: JNI is inconvienient but NOT difficult.
There is C++ code for IME softkeybord bindings available from the 
android developer website.


From the platform highlights 2.3:
"*Native input and sensor events*

Applications that use native code can now receive and process input and 
sensor events directly in their native code, which dramatically improves 
efficiency and responsiveness.


Native libraries exposed by the platform let applications handle the 
same types of input events as those available through the framework. 
Applications can receive events from all supported sensor types and can 
enable/disable specific sensors and manage event delivery rate and 
queueing."



2> Action completion. In standard apps you can for example click on a 
video and complete the action with any installed video player, and 
this requires access to the SDK which is only available from the Java 
side or from the bindings which I built 

See the 2.3 platform highlights above.

3> Application lifecycle, also something different from other platforms

What do you mean? It isn't.( persé).
If your APK is packaged and signed correctly, an Android machine that 
isn't supported won't see your app in the market. If that is what you mean.

I think this is rather neat/cute/wonderful and saves headaches.

4> Orientation change, the app needs to respond to it. With standard 
widgets it automagically works.
Also lower than 2.3 issue, but you have to provide for it in code or use 
a browser approach, that's true.


I must say I am still playing and can't say I have things working in a 
generic way. Just that some code that works in the emulator also works 
on my Android machine and in a predictable manner.




___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Felipe Monteiro de Carvalho
On Thu, Aug 11, 2011 at 9:58 PM, Graeme Geldenhuys
 wrote:
> Umm.. I'm getting more and more interested in the Android platform.
> Maybe it's time I officially start working on a OpenGL backend for
> fpGUI. fpGUI would at least guarantee a small executable - at least
> compared to LCL.
>
> I'll be Google'ing some more tonight. :)

Just one hint: Android is a *lot* more then just drawing some
graphics. For example:

1> Virtual keyboard. There are dozens and dozens, even widespread
devices like Galaxy Tab come with non-standard keyboards, some of them
only for China, some only for Taiwan. The manufacturers always make
sure the standard widgets work fine with those keyboards, but custom
drawn toolkits have a really hard time keeping up. And you can't test
this with the emulator, you need 100+ devices to make sure it works
everywhere. I don't know what Qt did, but I bet it doesn't work with
half of the virtual keyboards out there.

2> Action completion. In standard apps you can for example click on a
video and complete the action with any installed video player, and
this requires access to the SDK which is only availabla from the Java
side or from the bindings which I built

3> Application lifecycle, also something different from other platforms

4> Orientation change, the app needs to respond to it. With standard
widgets it automagically works

-- 
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 12-8-2011 10:52, Dariusz Mazur wrote:

My previous post crossed yours! Tnx for the good work.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 12-8-2011 7:33, Felipe Monteiro de Carvalho wrote:
This could be fixed by introducing some phone-like layouts in the LCL, 
like the linear layouts from Android.
That's what I am currently experimenting with in opengl. I don't mean to 
turn it into a full widgetset, though.

Another way is maybe to use html5 browser rendering for a UI.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Dariusz Mazur


Even if KSD or now FireMonkey supports ARM Linux this does not mean
anything for Android. While Android does support native Linux
applications it does not have a X server. Currently the only possibility
for this is to run a X server through a VNC viewer and thus you can not
reproduce the usual feel of an Android application.



I prefer other approach. My application have webapp with embedded http 
server, crosscompiled to ARM as Android library
Whole GUI act in webview 
(http://developer.android.com/reference/android/webkit/WebView.html )

Only small Jni is needed to loadlibrary

For me browser has more capabilities than native widgets. With full css3 
support i can use gradient background, rounded corners etc.
HTML5 today is most powerful attempt to  GUI : fast,full-featured, 
multiplaftorm, OS agnostic,


And more important for me: the same code I can use on several OS: 
Android, WebOs, Linux, Windows, .. iOs ( I hope that  FPC will be able 
to crosscompile to iOs soon),  server can be embedded or standalone


It work on toy tablet with android 2.1 and Samsung Galaxy , then same as 
on desktop computers.





--
  Darek



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Thaddy

On 11-8-2011 21:58, Graeme Geldenhuys wrote:
Umm.. I'm getting more and more interested in the Android platform. 
Maybe it's time I officially start working on a OpenGL backend for 
fpGUI. fpGUI would at least guarantee a small executable - at least 
compared to LCL. I'll be Google'ing some more tonight. :) 


Remember to google on gingerbread and ndk, the i was a typo.
This is a good starter link
http://developer.android.com/sdk/ndk/overview.html

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: RE : [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Michael Schnell

On 08/11/2011 04:24 PM, Ludo Brands wrote:

According to http://labs.qt.nokia.com/2011/02/28/necessitas/#comment-19682
the qt port uses the framebuffer driver.
I don't know if this Frambuffer needs to have and/or already has the 
necessary support for OpenGL, that I understand to be what KSD (maybe 
more correctly to be called "KSDev/GLScene") sits on.

There is also a qt port for iOS in
the making. No need to run after KSD...
Seemingly EMB things other (supposedly because they don't dare to 
implement QT or KDE support in the VLC (what the LCL already happily 
provides), they offer a completely new cross-platform GUI kit :( .


It might or might not be a good idea for Lazarus to offer "FireMonkey" 
support as well.


-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Delphi XE2 uses FPC for iOS target

2011-08-12 Thread Sven Barth

Am 12.08.2011 07:33, schrieb Felipe Monteiro de Carvalho:

On Thu, Aug 11, 2011 at 10:33 PM, Sven Barth
  wrote:

I also already thought about using fpGUI, but as a LCL backend. The reason
is that I have two Windows Mobile LCL applications that are tailored to my
own needs that I'd like to use when I have a new Android phone.


The LCL-Android already has some basic components implemented. Button
clicking works, for example.

But I already foresee a difficulty in porting existing apps because
the controls and fonts in Android are much bigger then in desktop
platforms. Fixed-size layouts will have a hard time being ported.



Since some time I've converted to a huge fan of LCL's autosize feature ^^

Also as my current phone has basically the same structure (portrait 
device, not much space) I wouldn't see a problem with those two 
applications of mine.



This could be fixed by introducing some phone-like layouts in the LCL,
like the linear layouts from Android.


As far as
I'm currently aware of the state of LCL-fpGUI (I never tested it yet) I'll
need to implement TTreeView...


If you ever do, please implement it in the Custom Drawn Package from
Lazarus, then we can use this TCDTreeView in both LCL-Android and
LCL-fpgui =)



I thought more in the terms of using the treeview component provided by 
fpGUI (Graeme?)... especially as I only need it working for two apps and 
thus it's rather likely that I'll implement only the features needed.


Regards,
Sven
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel