Page 1 of 1

Deploying apps to other distros - what dependencies?

Posted: Tue Sep 13, 2011 8:40 pm
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?

Re: Deploying apps to other distros - what dependencies?

Posted: Tue Sep 13, 2011 9:36 pm
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)

Re: Deploying apps to other distros - what dependencies?

Posted: Tue Sep 13, 2011 9:38 pm
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.

Re: Deploying apps to other distros - what dependencies?

Posted: Tue Sep 13, 2011 10:37 pm
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?

Re: Deploying apps to other distros - what dependencies?

Posted: Tue Sep 13, 2011 11:10 pm
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 :)

Re: Deploying apps to other distros - what dependencies?

Posted: Wed Sep 14, 2011 8:15 am
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.

Re: Deploying apps to other distros - what dependencies?

Posted: Wed Sep 14, 2011 4:03 pm
by greyhoundcode
Good answers, thanks all.