Re: [Lazarus] lazopenglcontext on Raspberry Pi?
On Fri, 20 Oct 2017 22:03:34 -0400, Anthony Walter via Lazaruswrote: > I've done a bit of work on Pi and OpenGL and thought I'd give you some > advice. > > 1) Pi only supports OpenGL ES contexts > > 2) Depending on your raspberry OS configuration, OpenGL ES might only be > supported when X window manager is not running. > > 2a) Raspbian defaults to allow OpenGL in with X window manager running, > but currently the actual driver does not function to the correct OpenGL > ES specifications under that situation. > > For me personally, I configured Raspbian to use the correct OpenGL ES > specifications, and that means the driver will fail to create a GL > context if X windows is running. Don't ask me what the differences are, > I really don't want to bother researching it, but there are problems. > I've posted about it extensively on the Pi support forums and under Pi > area of the new SDL forum. Thank you for the notes: My application only used OpenGL as an unnecessary side offering, so after removing all the OpenGL references, I was able to get the application to run. I did end up with the following error after trying to compile: Error: Can't call the assembler, error -1 switching to external assembling I solved that by reading some other postings where you suggested to reduce the GPU memory which I did as follows: Raspberry menu -> Raspberry Pi Configuration -> Performance -> GPU Memory = 32 (from 64). I'd still like to get opengl working with my application on the RPi one day, but it is not critical for me. Thanks, Anthony -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
On Sat, 21 Oct 2017 10:29:25 +0200, Mattias Gaertner via Lazaruswrote: > On Fri, 20 Oct 2017 20:32:49 -0400 > Anthony Tekatch via Lazarus wrote: > > >[...] > > Then installed Lazarus for Raspbian defined here: > > http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi > > sudo apt-get update > > sudo apt-get upgrade > > sudo apt-get install fpc > > sudo apt-get install lazarus > > Ok. These are probably the Debian packages. > Maybe they are doing something strange. I will check. Thank you for checking that. For now, I just copied the compiled lazopenglcontext files from: /home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 into my project directory. My project compiles now but gives this error when running: Project myproject raised exception class 'External: SIGSEGV'. In file 'glgtkglxcontext.pas' at line 660: FBConfig := FBConfigs[BestFBConfig]; Thanks. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
On Fri, 20 Oct 2017 20:32:49 -0400 Anthony Tekatch via Lazaruswrote: >[...] > Then installed Lazarus for Raspbian defined here: > http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi > sudo apt-get update > sudo apt-get upgrade > sudo apt-get install fpc > sudo apt-get install lazarus Ok. These are probably the Debian packages. Maybe they are doing something strange. I will check. >[...] > idemake.cfg contains this line: > -Fu/home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 > > The openglcontext.ppu exists in this directory: >/home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 Good. > For cleanliness, I started over again by completely removing fpc, Lazarus, > ~/.lazarus and did not use fpcupdelux this time. > > Starting Lazarus for the first time gives this error which I am not > concerned about: > The package EditorMacroScript (pascalscript macros) has detected a > problem and was deactivated. The package failed its selftest with the > message: "Failed getstr2 [Exp: "456" / Got: "abc"]" Yes, that's normal. Some features are not yet supported on arm. > package->install->lazopenglcontext->rebuild-ide gives this error: > lazarus.pp(1,1) Fatal: Cannot find lazopenglcontext used by Lazarus. > Check if package LazOpenGLContext creates lazopenglcontext.ppu, check > nothing deletes this file and check that no two packages have access to > the unit source.. > > no lazopenglcontext.ppu can be found in here: > /home/pi/.lazarus/units/arm-linux/gtk2 Good. That's the directory for the IDE itself. > package->uninstall->lazopenglcontext->rebuild-ide is back to normal. > > package->open-lpk->lazopenglcontext.lpk->compile builds ppu files in here: > /home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 Good. > use->install->rebuild-now compiles then closes lazarus > start lazarus > compiles new program fine > lazopenglcontext appears in installed packages > > Try compiling my program which includes: > openglcontext > in the uses section, get this error: > vector.pas(14,5) Fatal: Cannot find openglcontext used by vector. Check > if package LazOpenGLContext creates openglcontext.ppu, check nothing > deletes this file and check that no two packages have access to the > unit source.. > > idemake.cfg contains this line: > -Fu/home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 > > The openglcontext.ppu exists in this directory: >/home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 Strange. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
On Fri, Oct 20, 2017 at 9:03 PM, Anthony Walter via Lazaruswrote: > I've done a bit of work on Pi and OpenGL and thought I'd give you some > advice. > > 1) Pi only supports OpenGL ES contexts > > 2) Depending on your raspberry OS configuration, OpenGL ES might only be > supported when X window manager is not running. > > 2a) Raspbian defaults to allow OpenGL in with X window manager running, but > currently the actual driver does not function to the correct OpenGL ES > specifications under that situation. > > For me personally, I configured Raspbian to use the correct OpenGL ES > specifications, and that means the driver will fail to create a GL context > if X windows is running. Don't ask me what the differences are, I really > don't want to bother researching it, but there are problems. I've posted > about it extensively on the Pi support forums and under Pi area of the new > SDL forum. > Hello, I am not very smart nor clever and I did not find this documentation. Could you link to it? This is the best explanation for the weirdness I was experiencing. I read about the OpenGL ES hack to allow X11 compositing(?) but never anything about configuration. Respectfully, R0b0t1 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
I've done a bit of work on Pi and OpenGL and thought I'd give you some advice. 1) Pi only supports OpenGL ES contexts 2) Depending on your raspberry OS configuration, OpenGL ES might only be supported when X window manager is not running. 2a) Raspbian defaults to allow OpenGL in with X window manager running, but currently the actual driver does not function to the correct OpenGL ES specifications under that situation. For me personally, I configured Raspbian to use the correct OpenGL ES specifications, and that means the driver will fail to create a GL context if X windows is running. Don't ask me what the differences are, I really don't want to bother researching it, but there are problems. I've posted about it extensively on the Pi support forums and under Pi area of the new SDL forum. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
On Fri, 20 Oct 2017 23:57:11 +0200, Mattias Gaertner via Lazaruswrote: > How did you install Lazarus? I installed Raspbain as defined here: https://www.raspberrypi.org/downloads/raspbian/ Then installed Lazarus for Raspbian defined here: http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi sudo apt-get update sudo apt-get upgrade sudo apt-get install fpc sudo apt-get install lazarus Then after getting lazopenglcontext failures, I tried fpcupdelux which did not help. > > Also, the .ppu is being generated when I try to install the > > lazopenglcontext package: > > > > $ ls -al ~/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 > > Good. > Is this path in ~/.lazarus/idemake.cfg ? > Note that the ~/ will be the real path in the cfg. Yes, idemake.cfg contains this line: -Fu/home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 The openglcontext.ppu exists in this directory: /home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 For cleanliness, I started over again by completely removing fpc, Lazarus, ~/.lazarus and did not use fpcupdelux this time. Starting Lazarus for the first time gives this error which I am not concerned about: The package EditorMacroScript (pascalscript macros) has detected a problem and was deactivated. The package failed its selftest with the message: "Failed getstr2 [Exp: "456" / Got: "abc"]" package->install->lazopenglcontext->rebuild-ide gives this error: lazarus.pp(1,1) Fatal: Cannot find lazopenglcontext used by Lazarus. Check if package LazOpenGLContext creates lazopenglcontext.ppu, check nothing deletes this file and check that no two packages have access to the unit source.. no lazopenglcontext.ppu can be found in here: /home/pi/.lazarus/units/arm-linux/gtk2 package->uninstall->lazopenglcontext->rebuild-ide is back to normal. package->open-lpk->lazopenglcontext.lpk->compile builds ppu files in here: /home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 use->install->rebuild-now compiles then closes lazarus start lazarus compiles new program fine lazopenglcontext appears in installed packages Try compiling my program which includes: openglcontext in the uses section, get this error: vector.pas(14,5) Fatal: Cannot find openglcontext used by vector. Check if package LazOpenGLContext creates openglcontext.ppu, check nothing deletes this file and check that no two packages have access to the unit source.. idemake.cfg contains this line: -Fu/home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 The openglcontext.ppu exists in this directory: /home/pi/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 Thanks for any more clues, Anthony -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
On Fri, 20 Oct 2017 15:07:22 -0400 Anthony Tekatch via Lazaruswrote: >[..] > $ ls -al /usr/lib/lazarus/1.6.2/components/opengl/ How did you install Lazarus? > Also, the .ppu is being generated when I try to install the > lazopenglcontext package: > > $ ls -al ~/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 Good. Is this path in ~/.lazarus/idemake.cfg ? Note that the ~/ will be the real path in the cfg. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
On Fri, 20 Oct 2017 03:12:27 -0700 (MST), leledumbo via Lazaruswrote: > Should be in components folder. On Fri, 20 Oct 2017 12:25:57 +0200, Mattias Gaertner via Lazarus wrote: > It is part of the Lazarus sources. > lazarus/components/opengl/lazopenglcontext.lpk Yes, the lazopenglcontext.lpk exists on the disk here: $ ls -al /usr/lib/lazarus/1.6.2/components/opengl/ total 144 drwxr-xr-x 3 root root 4096 Oct 18 16:06 . drwxr-xr-x 75 root root 4096 Oct 18 16:05 .. drwxr-xr-x 2 root root 4096 Oct 18 16:05 example -rw-r--r-- 1 root root 10173 Aug 16 2015 glcarbonaglcontext.pas -rw-r--r-- 1 root root 15248 Nov 20 2015 glcocoanscontext.pas -rw-r--r-- 1 root root 30842 Sep 15 2015 glgtkglxcontext.pas -rw-r--r-- 1 root root 8168 Nov 21 2014 glqtcontext.pas -rw-r--r-- 1 root root 24564 Sep 27 2015 glwin32wglcontext.pas -rw-r--r-- 1 root root 2850 Apr 5 2017 lazopenglcontext.lpk -rw-r--r-- 1 root root 384 Aug 16 2015 lazopenglcontext.pas -rw-r--r-- 1 root root 20770 Sep 27 2015 openglcontext.pas -rw-r--r-- 1 root root 4200 Oct 5 2013 openglcontext.res Also, the .ppu is being generated when I try to install the lazopenglcontext package: $ ls -al ~/.lazarus/lib/LazOpenGLContext/lib/arm-linux/gtk2 total 552 drwxr-xr-x 2 pi pi 4096 Oct 20 14:35 . drwxr-xr-x 3 pi pi 4096 Oct 20 14:17 .. -rw-r--r-- 1 pi pi 240648 Oct 20 14:17 glgtkglxcontext.o -rw-r--r-- 1 pi pi 23005 Oct 20 14:17 glgtkglxcontext.ppu -rw-r--r-- 1 pi pi523 Oct 20 14:35 LazOpenGLContext.compiled -rw-r--r-- 1 pi pi 2808 Oct 20 14:35 lazopenglcontext.o -rw-r--r-- 1 pi pi 1325 Oct 20 14:35 lazopenglcontext.ppu -rw-r--r-- 1 pi pi 234308 Oct 20 14:17 openglcontext.o -rw-r--r-- 1 pi pi 32001 Oct 20 14:17 openglcontext.ppu -rw-r--r-- 1 pi pi 4200 Oct 20 14:17 openglcontext.res The error remains the same: lazarus.pp(1,1) Fatal: Cannot find lazopenglcontext used by Lazarus. Check if package LazOpenGLContext creates lazopenglcontext.ppu, check nothing deletes this file and check that no two packages have access to the unit source.. Thanks for any more clues, Anthony -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] lazopenglcontext on Raspberry Pi?
> Is there a Raspberry Pi distribution that contains the lazopenglcontext package, or some method to get that package installed on the Raspberry Pi? Should be in components folder. -- Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/ -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] lazopenglcontext on Raspberry Pi?
I cannot get the lazopenglcontext package to install on Raspbian stretch. The error is: lazarus.pp(1,1) Fatal: Cannot find lazopenglcontext used by Lazarus. Check if package LazOpenGLContext creates lazopenglcontext.ppu, check nothing deletes this file and check that no two packages have access to the unit source.. Is there a Raspberry Pi distribution that contains the lazopenglcontext package, or some method to get that package installed on the Raspberry Pi? Thanks, Anthony -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus