Recent

Author Topic: Because LCL is not pure, it can't compile everywhere.  (Read 9262 times)

sainimu78

  • Full Member
  • ***
  • Posts: 117
Because LCL is not pure, it can't compile everywhere.
« on: August 26, 2016, 03:50:11 pm »
I tried to cross compile a new LCL application project with arm-linux-gnueabihf- cross compiler to linux embeded(not ubuntu, it's linux of no GUI).
it failed anyhow.
It is because of widgetset gtk gtk2 and qt can't compile on that target.
I tried out all widgetset and got some error like "libgdk_pixbuf undefined reference to 'g_type_class_adjust_private'", "-lQt4Pas not found", "undefined reference to '_init'"
I searched throughout and got no solution.

This makes me failed on my job.

I chose lazarus because of it can be cross compiled, you know.

Why is there no widgetset that it dosen't based on third part.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #1 on: August 26, 2016, 04:10:05 pm »
There are several attempts (owner drawn etc), but the progression is slow. Maybe you could start to work on it?

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #2 on: August 26, 2016, 04:25:50 pm »
There is a "widget set" that probably works out of the box. It is in FPC and is called FreeVision. The Freepascal textmode ide is based on it ;)

As long as your linux embedded platform has a kernel with framebuffer support, you may try the ownerdrawn widget set with Lazarus, but last time I looked it still depended on X.

What are you trying to achieve? If you want all the nuts and bolds that come with a gui framework based on one of the UI standards (windows, GTK, Qt) you are probably way in over your head to want those kind of looks implemented on an embedded device.

On my Raspberry Pies I use OpenVG to build user interfaces that do not depend on X and so ulimately GTK or Qt , but that is based on classes and not on "drag and draw" ;) i.e.: handcoded from these classes.
Specialize a type, not a var.

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #3 on: August 26, 2016, 05:36:46 pm »
MSEide+MSEgui needs X11 only:
https://sourceforge.net/projects/mseide-msegui/
A FPC Linux-X86->Linux-ARM cross-compiling environment (tested on Raspberry Pi) is here:
https://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/
MSEide has a project template for cross compiling, please read README.TXT.

fpGUI also does not need an external widgetset:
http://fpgui.sourceforge.net/

If there is no X11 support in your target you are out of luck.

sainimu78

  • Full Member
  • ***
  • Posts: 117
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #4 on: August 26, 2016, 06:35:58 pm »
There are several attempts (owner drawn etc), but the progression is slow. Maybe you could start to work on it?
oh, I think I would like to join some popular project. :-*

sainimu78

  • Full Member
  • ***
  • Posts: 117
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #5 on: August 26, 2016, 06:46:00 pm »
There is a "widget set" that probably works out of the box. It is in FPC and is called FreeVision. The Freepascal textmode ide is based on it ;)

As long as your linux embedded platform has a kernel with framebuffer support, you may try the ownerdrawn widget set with Lazarus, but last time I looked it still depended on X.

What are you trying to achieve? If you want all the nuts and bolds that come with a gui framework based on one of the UI standards (windows, GTK, Qt) you are probably way in over your head to want those kind of looks implemented on an embedded device.

On my Raspberry Pies I use OpenVG to build user interfaces that do not depend on X and so ulimately GTK or Qt , but that is based on classes and not on "drag and draw" ;) i.e.: handcoded from these classes.

My project started 2 years ago. My department manager decided to use lazarus+FPC+LCL to develop. This proj is good for both ubuntu and windows.
I'n trying to port this proj to a arm-cortex-A9 device on linux embedded.

I need a framework that my proj can be very easily ported to.

sainimu78

  • Full Member
  • ***
  • Posts: 117
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #6 on: August 26, 2016, 06:49:59 pm »
MSEide+MSEgui needs X11 only:
https://sourceforge.net/projects/mseide-msegui/
A FPC Linux-X86->Linux-ARM cross-compiling environment (tested on Raspberry Pi) is here:
https://sourceforge.net/projects/mseide-msegui/files/fpcrossarm/
MSEide has a project template for cross compiling, please read README.TXT.

fpGUI also does not need an external widgetset:
http://fpgui.sourceforge.net/

If there is no X11 support in your target you are out of luck.

X11 is OK.
But fpGUI is far from LCL, its behavior like message processing is wierd and it needs hard work to porting to

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #7 on: August 26, 2016, 06:57:06 pm »
I tried to cross compile a new LCL application project with arm-linux-gnueabihf- cross compiler to linux embeded(not ubuntu, it's linux of no GUI).
it failed anyhow.
It is because of widgetset gtk gtk2 and qt can't compile on that target.
I tried out all widgetset and got some error like "libgdk_pixbuf undefined reference to 'g_type_class_adjust_private'", "-lQt4Pas not found", "undefined reference to '_init'"
I searched throughout and got no solution.

This makes me failed on my job.

I chose lazarus because of it can be cross compiled, you know.

Why is there no widgetset that it dosen't based on third part.

To compile Qt target you must have libQt4Pas compiled for your target platform (arm).

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #8 on: August 26, 2016, 07:58:28 pm »
I tried to cross compile a new LCL application project with arm-linux-gnueabihf- cross compiler to linux embeded(not ubuntu, it's linux of no GUI).
This is already an abuse of LCL. LCL is a VISUAL component library over various GUI toolkits (or widgetset) that does the actual drawing and event handling mechanism. It makes no sense having LCL applications running in a GUI-less OS.
Why is there no widgetset that it dosen't based on third part.
There is fpGUI backend requiring only X11, but it still requires X11, which your GUI-less OS doesn't (or might not) have. There's also NoGUI backend for creating GUI-less LCL application, such as PDF printer requiring to draw on an invisible canvas. Neither will magically run your GUI application on the GUI-less OS, there's no (easy) way to create a platform neutral widgetset, modern OSes don't let you call interrupt directly from userland, which even if you made it, you will no longer be running on CLI. The only "GUI" (it's actually a TUI) framework capable of running in CLI environment is FreeVision, but there's no LCL backend for it.

sainimu78

  • Full Member
  • ***
  • Posts: 117
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #9 on: August 26, 2016, 08:04:18 pm »
I tried to cross compile a new LCL application project with arm-linux-gnueabihf- cross compiler to linux embeded(not ubuntu, it's linux of no GUI).
it failed anyhow.
It is because of widgetset gtk gtk2 and qt can't compile on that target.
I tried out all widgetset and got some error like "libgdk_pixbuf undefined reference to 'g_type_class_adjust_private'", "-lQt4Pas not found", "undefined reference to '_init'"
I searched throughout and got no solution.

This makes me failed on my job.

I chose lazarus because of it can be cross compiled, you know.

Why is there no widgetset that it dosen't based on third part.

To compile Qt target you must have libQt4Pas compiled for your target platform (arm).

I have no idea for what params should be passed to qmake and make, so I had gave it up. I cannot do this without examples. Maybe I can get some hints on the release  for Nokia N900... this is so hard for me.

sainimu78

  • Full Member
  • ***
  • Posts: 117
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #10 on: August 26, 2016, 08:12:24 pm »
There is fpGUI backend requiring only X11, but it still requires X11, which your GUI-less OS doesn't (or might not) have.

I can use buildroot to add X11 libs, gtk2 libs, qt5 libs, isn't it enough? I truely don't know except specific graphics libraries what else a GUI program runs OK on windows needs for running on no GUI OS.

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #11 on: August 26, 2016, 08:44:39 pm »
There is fpGUI backend requiring only X11, but it still requires X11, which your GUI-less OS doesn't (or might not) have.

I can use buildroot to add X11 libs, gtk2 libs, qt5 libs, isn't it enough? I truely don't know except specific graphics libraries what else a GUI program runs OK on windows needs for running on no GUI OS.
Yes that's enough even now. But hardly "embedded" pulling in multi mb's of code. That's not embedded that's a full - maybe lightweight - linux.
For that the best way is to use the fbdev option. That's in the kernel and I know there is someone working on ownerdrawn controls icm framebuffer only.
In that case, it would make sense.
Embedded has multiple meanings. I for one consider it to be a system that only can bootstrap code. nothing else. It is your responsability to write that code.
Specialize a type, not a var.

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #12 on: August 26, 2016, 08:56:53 pm »
X11 is OK.
But fpGUI is far from LCL, its behavior like message processing is wierd and it needs hard work to porting to
Then try MSEgui. It needs possibly even more work to port but it is worth the effort. ;-)
« Last Edit: August 26, 2016, 08:58:52 pm by mse »

mse

  • Sr. Member
  • ****
  • Posts: 286
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #13 on: August 26, 2016, 08:58:34 pm »
I can use buildroot to add X11 libs, gtk2 libs, qt5 libs, isn't it enough?
X11 libs are not enough, an X11 server implementation is necessary too.

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: Because LCL is not pure, it can't compile everywhere.
« Reply #14 on: August 26, 2016, 09:22:17 pm »
I can use buildroot to add X11 libs, gtk2 libs, qt5 libs, isn't it enough?
X11 libs are not enough, an X11 server implementation is necessary too.
I was not clear, you are correct. A Full X install.
Specialize a type, not a var.

 

TinyPortal © 2005-2018