Hi!
This thread is about PureBasic, Linux and the truth about dependencies. Recently I started a small project to build a little web application using the Linux version of PureBasic. I got a web-host that is very user friendly and allows users to run their own hosting processes behind the main serving Apache etc.
So I made a small demo server (console application based on the web server in the examples) just to see if I could get the basics to work. When I upload the web server to my webhost-server and execute the server i get this error:
./webserver.exe: error while loading shared libraries: libgio-2.0.so.0: cannot open shared object file: No such file or directory
Looking at the first page on purebasic.com one of the features listed is: "- No external DLLs, runtime interpreter or anything else required when creating executables"
Now, I'm a reasonable person and I know that a unix/linux system is attached to the current lib at a much closer level than a windows system, so it's not like I'm surprised about this, but what I think would be a very good thing would be to have a document or FAQ that describes the additional packages/libs required in the most popular Linux distributions to run PureBasic executables.
Example: My webhost is running CentOS release 5.2 (final). This is one of the major distributions, and it would be great to have some place to go to find out exactly the additional packages required on CentOS to have PureBasic executables to run. As it is now I might contact some nice representative of my web-host and say: Could you please install libgio-2.0? I'm almost sure they would help me with that. But if I then need another lib? and another?
I'm sure you see why it would be much more smooth if I could just present a list of packages required at once to them and ask them to install it if possible.
This information is of course also vital for distributing any kind of software written in PureBasic to any potential Linux customers.
If there exist a FAQ or thread about this already I'm very sorry I brought this up again, I however did search for libgio-2.0 in the forum and I couldn't find any hit.
edit: grammar/spelling
Linux and dependencies (libgio-2.0)
GIO is not a separate package. It is part of the GLib package which is a dependency of Gtk (and rarely installed separately). My guess is that your hoster simply does not have Gtk installed, which makes perfect sense. What you have to do is avoid any PB commands that have something to do with GUI stuff (even MessageRequester()). This way you can avoid the dependency on Gtk.
Maintaining a list of specific packages to install is simply impossible even for the major distributions only. There are simply too many of them and their release cycles are so short that just trying to keep up with the changes they make is a fulltime job.
The list of things required to run PB programs is not that long actually:
glibc: required by every PB exe, but pretty much present on every Linux system
libstdc++: required for the ScintillaGadget and a few other commands. This is also present almost everywhere.
Gtk: for anything GUI related
SDL/OpenGl: for Sprite/Screen
libgnome: Dunno what that is needed for right now
libgnomeprintui: For 2DDrawing to a printer
libxine: for Movie/Multimedia stuff
iodbc: for database stuff
(doing this from the top of my head so i may have forgotten something. Also i do not know what is required to run Ogre right now)
Of course all these come in slightly different package names depending on the distribution and have a large number of dependencies, but it is not our job to list all these combinations for any possible distribution. As i said above, this is an impossible task because the list will be outdated the minute it was published.
Maintaining a list of specific packages to install is simply impossible even for the major distributions only. There are simply too many of them and their release cycles are so short that just trying to keep up with the changes they make is a fulltime job.
The list of things required to run PB programs is not that long actually:
glibc: required by every PB exe, but pretty much present on every Linux system
libstdc++: required for the ScintillaGadget and a few other commands. This is also present almost everywhere.
Gtk: for anything GUI related
SDL/OpenGl: for Sprite/Screen
libgnome: Dunno what that is needed for right now
libgnomeprintui: For 2DDrawing to a printer
libxine: for Movie/Multimedia stuff
iodbc: for database stuff
(doing this from the top of my head so i may have forgotten something. Also i do not know what is required to run Ogre right now)
Of course all these come in slightly different package names depending on the distribution and have a large number of dependencies, but it is not our job to list all these combinations for any possible distribution. As i said above, this is an impossible task because the list will be outdated the minute it was published.
quidquid Latine dictum sit altum videtur
This lead me into the right track. Of course I had forgot a few MessageRequester(). After removing them the web server works like charm!What you have to do is avoid any PB commands that have something to do with GUI stuff (even MessageRequester())
Yes, you are probably right about this. I didn't intend to sound disrespectful in the first post in any way and now that I see the newbie error I made myself I understand that the request itself was pretty useless, as the PureBasic program actually runs precisely as it should do as a simple console app once I removed the GUI-commands from it.Of course all these come in slightly different package names depending on the distribution and have a large number of dependencies, but it is not our job to list all these combinations for any possible distribution. As i said above, this is an impossible task because the list will be outdated the minute it was published.
Thanks a lot for the useful advise and for clearing things up for me regarding the lib-dependencies.