Deploying apps to other distros - what dependencies?

Linux specific forum
User avatar
greyhoundcode
Enthusiast
Enthusiast
Posts: 112
Joined: Sun Dec 30, 2007 7:24 pm

Deploying apps to other distros - what dependencies?

Post by greyhoundcode »

This is a basic question for a Linux minded individual, I'm sure, but I couldn't find the information in any other threads.

Basically, I have an app I use for my own purposes on an Ubuntu laptop. I'm now thinking of distributing the app. If I were using Windows (as I also do) there is no problem - if the app does not depend on any external DLLs then all I need to do is distribute the .exe file.

On Linux, is this also the case or if not is there a means of determining the dependencies?
User avatar
idle
Always Here
Always Here
Posts: 5835
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Deploying apps to other distros - what dependencies?

Post by idle »

type "ldd application"
/purebasic/compilers$ ldd pbcompiler
linux-gate.so.1 => (0x00d75000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0x009dc000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0x00194000)
/lib/ld-linux.so.2 (0x00949000)
Windows 11, Manjaro, Raspberry Pi OS
Image
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Re: Deploying apps to other distros - what dependencies?

Post by remi_meier »

Here is my favourite line for this

Code: Select all

EXE=purebasic FILES=`ldd $EXE | cut -d= -f1 | cut -f2 | cut -d" " -f1` ; echo -e "### FILES ###\n$FILES\n\n### PACKAGES ###" ; dpkg -S $FILES | fgrep "$FILES"
replace 'purebasic' with your executable and it will
return a list of shared objects which are needed
and a list of debian-packages which contain those
shared objects.
So if you are targeting Debian systems, that might
work well for you.
Athlon64 3700+, 1024MB Ram, Radeon X1600
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Deploying apps to other distros - what dependencies?

Post by MachineCode »

I thought a major feature of PureBasic was the fact that it produced a single standalone executable? Does that apply only to Windows?
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Deploying apps to other distros - what dependencies?

Post by Polo »

It doesn't require anything that's not included in Linux AFAIK, except the mozilla embed shared library.
Maybe a Linux user can confirm this, i don't use linux and don't plan to :)
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Re: Deploying apps to other distros - what dependencies?

Post by remi_meier »

For the 10th(?) time in history:
PB does require external libraries, on Windows as
well as on Linux.

On Windows:
PB mostly uses DLLs that come with Windows,
but for advanced functionality like Ogre, Scintilla,
SQLite, etc. it requires non-preinstalled DLLs to be
installed.

On Linux:
PB mostly uses .SOs that come with Linux (glibc),
but as Linux has several distributions, it might be
that even for GUI where it uses the GTK libraries,
that those .SOs are _not_ installed. And therefore
you might need to mark them as a dependency.

The reality is, that on Linux you will have to worry
more about external dependencies because
not all distributions come with the same set of
libraries. On Windows you just have 1 distribution.
Athlon64 3700+, 1024MB Ram, Radeon X1600
User avatar
greyhoundcode
Enthusiast
Enthusiast
Posts: 112
Joined: Sun Dec 30, 2007 7:24 pm

Re: Deploying apps to other distros - what dependencies?

Post by greyhoundcode »

Good answers, thanks all.
Post Reply