Raspberry pi 4 not finding OpenGL


Tweet opengl raspberry-pi
(Posted 8 months ago) imaan2011

Hi. I'm actually new to bmax. I have installed Blitzmax latest release on raspberry pi 4 but I get the following compile error when i try compiling any of the provided samples:

/usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference to glDisable' /usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference toglDisable'
/usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference to glEnable' /usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference toglAlphaFunc'
/usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference to glDisable' /usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference toglDisable'
/usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference to glEnable' /usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference toglBlendFunc'
/usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference to glDisable' /usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference toglEnable'
/usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference to glBlendFunc' /usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference toglDisable'
/usr/bin/ld: /home/pi/Downloads/BlitzMax/mod/sdl.mod/gl2sdlmax2d.mod/.bmx/main.bmx.debug.raspberrypi.arm.c undefined reference to `glEnable'

it looks that the compiler can't find OpenGL driver. I highly appriciate it if someone help me on this issue.
many thanks

(Posted 8 months ago) RonTek commented:

Hey imaan2011, Welcome to the forums!

I am not sure if vanilla blitzmax will work with pi 4 or even pi, so perhaps you can just check out BlitzMax NG with a specific release for Raspberry Pi. D

https://github.com/bmx-ng/bmx-ng/releases/download/v0.115.3.40.rpi/BlitzMax_rpi_0.115.3.40.tar.xz

Install Notes:

BlitzMax has been built against the latest Raspbian, and for graphics, expects to have access to OpenGL.

also before installing, you should use the following command to get the latest development libraries installed for use

sudo apt install g++ libglu1-mesa-dev libasound2-dev libfreetype6-dev libxpm-dev libxft-dev libxxf86vm-dev libpulse-dev libopenal-dev libwebkitgtk-dev libaudio-dev libesd0-dev libwebkit2gtk-4.0-dev libgtk-3-dev

More Info:
https://github.com/bmx-ng/bmx-ng/releases/tag/v0.115.3.40.rpi

(Posted 8 months ago) imaan2011 commented:

thanks so much for your fast reply.
actually I already have installed all the libraries that you had mentioned in your reply on my RPI4. also I'm using the BlitzMax release for Raspberry pi but it looks that it can't see OpenGL at all.
based on install Notes, it says "Blitzmax expects to have access to OpenGL". should I do anything to provide access for it? what I know is that OpenGL is already installed and is enabled on my pi.

(Posted 8 months ago) RonTek commented:

I see. Try installing and adding these additional OpenGL related dev packages and see if it solves the glDisable error:

libglfw3-dev libgles2-mesa-dev
(Posted 8 months ago) imaan2011 commented:

I have just checked. both dev packages are already installed.

(Posted 8 months ago) RonTek commented:

Ah ok. I found some related problems on Pi forums and it is talking about enabling opengl in raspi-config.

https://www.raspberrypi.org/forums/viewtopic.php?t=191087#p1199749

(Posted 8 months ago) imaan2011 commented:

many thanks for your reply. I checked the raspi-config. OpenGL driver was already enabled. do you think that Blitzmax will work if i install Ubuntu on my rpi instead of raspbian?

(Posted 8 months ago) RonTek commented:

Sure thing and yes Blitzmax, even with vanilla/BRL version works with Linux/Ubuntu.

On the other hand, Pi is still supported, but it seems it's still an early stage since the installation does not yet go smoothly unlike the usual platforms like win/mac/linux.

btw, I have not tried using a raspbian yet but since emulation is now available I will check out on this soon.

Update: got it working with the vanilla Linux version! I have not encountered any glDisable errors but there was other issues that got resolved. Installation guide here.

Reply To Topic (minimum 10 characters)

Please log in to reply