Ubuntu 24.04 installing blitzmax libs/packages to successfully build and run

Started by William, September 21, 2024, 16:42:12

Previous topic - Next topic

William

i had to google errors and use these workarounds to run blitzmax and successfully build all modules for ubuntu 24.04, it wasnt too bad.

the gist is based on the lib dependencies that derron gave me. some of them weren't needed today.

https://gist.github.com/zarosath/a2130c1609078f8471b958545d2d1d99


using this release of blitzmax https://github.com/bmx-ng/bmx-ng/releases/tag/v0.144.3.57.202409150204.linux.x64

:)
im still interested in game app development even if its oldschool. i have ideas i want to try myself in this project if i can ever accomplish it.

William

#1
except my ubuntu install is using wayland and my maxgui app seems X11 dependent

help?

Executing:Client.debug
(Client.debug:164315): Gdk-CRITICAL **: 10:23:31.674: gdk_x11_window_get_xid: assertion 'GDK_IS_X11_WINDOW (window)' failed
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  14 (X_GetGeometry)
  Resource id in failed request:  0x0
  Serial number of failed request:  40
  Current serial number in output stream:  40

i can switch to X11 but tbh the app mouse input not working as should in openb3d atm, i will troubleshoot this later. i will be trying libsgd eventually.
im still interested in game app development even if its oldschool. i have ideas i want to try myself in this project if i can ever accomplish it.

Baggey

DUDE! Do yourself a favor and use windows 10? :-X 

I like Linux too! But it never dose what you want it to?

Kind Regards Baggey
Running a PC that just Aint fast enough!? i7 4Ghz Quad core 32GB ram  2x1TB SSD and NVIDIA Quadro K1200 on Acer 24" . DID Technology stop! Or have we been assimulated!

Windows10, Parrot OS, Amiga mini, ZX Spectrum 48k, C64, ORIC Atmos 48K, Enterprise 128K, The SID chip. Im Misunderstood!

dawlane

Until BlitzMax is updated to work with newer Linux distribution releases. You're going to have a lot of fun. And besides. You shouldn't be trying to force install old packages into a Linux system. You could end up breaking it.

William

Quote from: Baggey on September 21, 2024, 19:24:31DUDE! Do yourself a favor and use windows 10? :-X

I like Linux too! But it never dose what you want it to?

Kind Regards Baggey
i'm into systems and blitz coding.

there's no favor when i can use both.

@dawlane it doesnt break anything and its not hacking the OS, just installing dependency packages.
im still interested in game app development even if its oldschool. i have ideas i want to try myself in this project if i can ever accomplish it.

Derron

Ubuntu will be the distribution the least "developers" will use in the near future. 
.deb packages less easy to use? snap... and all this stuff.

Ok, so installed 24.04 in a VM, had to switch from QXL to libvirt graphics as I else only got a black screen (known problem with ubuntu 24.04 ...).

Downloaded latest BlitzMaxNG***.xz for Linux, extracted it and MaxIDE did not start - happens because it links to a lib which Ubuntu somehow failed to proper symlink.

Fixed that, MaxIDE started.

Installed dependencies as suggested in the website (had to update the webkit-lib version)


SuperStrict

Framework SDL.SDLRenderMax2D

Graphics 800,600

Repeat
Cls
DrawText("Hello World", 10, 10)
Flip
Until AppTerminate() Or KeyHit(KEY_ESCAPE)





compiled and executed maxgui.mod/maxgui.mod/doc/createbutton.bmx (after moving the "strict" to the first line ...)


Notes I have taken:
Ubuntu (24.04)
#libwebkit2gtk-4.1-dev instead of libwebkit2gtk-4.0-dev
sudo apt install g++ libglu1-mesa-dev libasound2-dev libfreetype6-dev libxpm-dev libxft-dev libxxf86vm-dev libpulse-dev libopenal-dev libwebkit2gtk-4.1-dev libgtk-3-dev

#libesd not available
sudo apt install libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev libaudio-dev

$ ./MaxIDE
./MaxIDE: error while loading shared libraries: libwebkit2gtk-4.0.so.37: cannot open shared object file: No such file or directory
MaxIDE needs to be rebuild to link to libwebkit2gtk-4.1 instead (symlink to 4.0 broken?)
Or backports needs to be installed ...
Or some symlink could do:
sudo ln -sf /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0 /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37



Ok ... so this aside - errors like what you are getting happen to me when I update the GPU driver and skipped restarting... so maybe check your driver and/or simply restart.


bye
Ron

William

reply @Derron i dont know what you mean, the no such file or directory? i am having no errors after installing dependencies that were not there.

why use
#libwebkit2gtk-4.1-dev instead of libwebkit2gtk-4.0-dev
instead of 4.0? i am curious your reasoning except successfully using later versions, perhaps you did not need to add the archive ubuntu 22 repository?

anyhow, i do not see any reason not to use Ubuntu if that is ones preference. you keep saying that but its great for dev imo.

i forgot to update everyone here that there are compatibility layers like xwayland for x11 apps (i havent tested) and ubuntu still supports x11 for the time being and the ubuntu 24.4 release could potentially be used 10+ years although i like using the latest releases. just that eventually it may not be supported and blitzmax applications will not run on linux without wine or some potential workaround.
im still interested in game app development even if its oldschool. i have ideas i want to try myself in this project if i can ever accomplish it.

Derron

why us libwebkit2gtk-4.1-dev?

Because this is installed by default in ubuntu 24.04 while the old 4.0 version is not installed and the 4.1 does not correctly symlink itself to also "react" to 4.0 requests. This is why the symlink (ln) command has to be used.

Why the symlink? Because when installing ubuntu 24.04 you won't be able to run MaxIDE except you installed other things. In other words: does not run out of the box there - but as said, am only talking about the Ubuntu OS, not Linux Mint, Debian or others.

Ubuntu wants to use their .snap, begins to dislike .deb files (removed some support in GUI tools for it) - just to make it harder for "external" software to get installed (think of chrome (not chromium) and the likes).


Regarding "what devs use": NO developer will focus on a ubuntu 24.04 only. Yeah, you might test your application there, but you for sure will not compile there. Why? because it wont run on older Ubuntu then (and older Mint, Debian ...). Wrote about glibc a lot in the past (here and on discord) and yeah ... this is still the issue linuxers have to face.
An no, a source based distribution is not possible in all cases, and packages for various distros are also not everybodys taste (regarding efforts to build them). And no, appimage/snap have similar issues (and share certain files of the parent OS).



bye
Ron

William

@Derron i do not remember whats the story about glibc, its no longer being updated? sorry i kinda left and came back forgetting about it for some reason. err.. . just letting you know. i remember you said something about it but nothing more.
im still interested in game app development even if its oldschool. i have ideas i want to try myself in this project if i can ever accomplish it.

Derron

feel free to use the search functionality here and/or on discord.

In short: if you compile on a system with glibc "v2.22" it wont run on systems having glibc "< v2.22" installed. And you cannot simply install an update because it is a really "core"-ish thing.
Thus means your compilation OS should have a rather "low" glibc version number to allow execution on the majority of distributions. Of course older versions = bugs, security concerns, lacking functions (we do not use them) ... yet nothing _I_ would worry regarding our games. Use an Ubuntu 16.04 in a VM and compile your "final" binary there. Think Brucey does the same for NG binaries. This will include almost 8 year old OS installations - and yeah, side note, 16.04 should be still supported (till 2026) - albeit not needed for compilation.


bye
Ron

Shardik

Quote from: Derron on September 25, 2024, 16:04:23... - and yeah, side note, 16.04 should be still supported (till 2026) - ...

https://ubuntu.com/about/release-cycle

Quote"Ubuntu LTS releases receive 5 years of standard security maintenance for all packages in the 'Main' repository. With an Ubuntu Pro subscription, you get access to Expanded Security Maintenance (ESM) covering security fixes for packages in both the 'Main' and 'Universe' repositories for 10 years."

QuoteOptional Legacy support add-on on top of Ubuntu Pro extends the security maintenance and support for an additional 2 years, resulting in 12 years coverage overall.

So the standard unpaid support for Ubuntu LTS releases is 5 years and 10 years for paid Ubuntu Pro subscriptions. The support extension from 10 to 12 years (until 2016 for Ubuntu 16.04) does even cost more.

Derron

I did not say it is for free, it can still receive a kind of support. And as written: it is not of importance for the basic issue.

You can also use a different OS - a while ago people preferred Cent OS 7 for these things (which is why I nagged Brucey a lot until we got 32 bit builds working on Cent OS 7). It had a rather low glibc version.
Maybe not the newest overview... https://repology.org/project/glibc/versions


bye
Ron

William

@Derron i guess i still do not understand. blitzmax may not be updated for this glibc version is that the case? however it is not as though i am contributing (programming) to this i think i remember it was said it may require a complete redesign. (blitzmax)
im still interested in game app development even if its oldschool. i have ideas i want to try myself in this project if i can ever accomplish it.

Derron

Quote from: Derron on September 25, 2024, 16:04:23feel free to use the search functionality here and/or on discord.

[...]
Simply search for glibc and "issues" (via google, duckduck, ...)

While it is also a blitzmax "issue" it is an issue _many_ binaries (written in other languages etc) have. the glibc-issue affects all binaries people provide which somehow have a glibc dependency. Yes, there are "newer" (some are last updated 2012 or 2018) like musl, diet-libc (gpl ...),  ulibc, ulibc-ng, .. which you could link to instead. But they will have their own issues (eg not all functions covered or so), some are slower, some more secure (not an issue) and some require to pay attention to their licence (GPL ...).
If you now use some stuff in your code which is not properly working in the replacement lib ... you will not be guaranteed to catch that until someone reports it to you. Surely a lot of efforts would have to be put into fixing these things then.


bye
Ron

William

@Derron honestly i dont know what issue your raising regarding glibc i understand there may be issue but i couldnt find anything on google

dig this https://www.google.com/search?client=ubuntu-sn&channel=fs&q=glibc+compatibility+with+older+apps
QuoteGlibc has a versioning system that allows backward compatibility (older programs built to run on older versions of glibc will continue to run on new glibc); but it is of no help the other way around: programs that depend on newer glibc will usually not run on systems with older glibc.

so?
im still interested in game app development even if its oldschool. i have ideas i want to try myself in this project if i can ever accomplish it.