I think you should read this: http://en.wikipedia.org/wiki/Package_management_system for better understanding.
I think you should read this: http://en.wikipedia.org/wiki/Package_management_system for better understanding.
Addu,
Your initial problem with failing to load the program could be helped by some of these:
- Reading the man page for ldd (1) and running it on your executable.
- Reading the man page for ld.so (8) particularly about the environment variable LD_LIBRARY_PATH and also when it is ignored.
- Using a script to wrap your executable and adjust with the LD_LIBRARY_PATH before handling off to your executable.
- Building a statically linked executable (but read and understand your Qt License first).
Without being able to read minds we cannot help you with packaging your product. You need to tell us:
- Whether you can distribute source or the product is binary only. If you can distribute source, and the end-user can build it, then you may only need to put dependency info in a Readme file. If binary only you need to package using a tool that the target OS can understand so the user does not have to guess.
- What your target Linux audience is: tech savvy, not tech savvy, people who normally use Windows, paying or non-paying users etc.
- What distros they are running. Packaging for Ubuntu (Debian), Redhat (CentOS), Gentoo or Slackware is different. Google for dpkg, RPM, ebuild, ...
It almost always helps to tell people what you have already tried, provide exact error messages if that's what you are asking about, provide that actual code of a minimal program that reproduces the fault if possible, explain what you expected to happen etc. Put some effort into asking smart questions and you'll get much more helpful answers.
I'm not sure whether this is the best solution, but I was able to deploy on linux (ubuntu 9.04) like this:
create a file myapp.conf in /etc/ld.so.conf.d/
Inside that myapp.conf file, you should list the directory where your application plus libs reside.
For example myapp.conf will contain a single line:
/home/schnitzel/myapp
I believe you have to then run the command ldconfig. This method is way better than futzing around with LD_LIBRARY_PATH.
My app uses dynamic linking so my application folder contains only qt core, gui libs, two third party libs and some plugins.
I still have to wrap my head around creating a package in order to make the install procedure as simple as possible.
Is it possible to create an ubuntu package with only binaries in it?
This method affects the system globally and does leave you open to dynamically linking to the first libQtCore.so.4 (a symlink to a specific version like libQtCore.so.4.5.2) the system finds in the ld.so search path. Normally this is not a problem but can be if, for example, you rely on a fix Qt in 4.5.3 and the first Qt that is found is a Qt 4.5.0 because that's in the path earlier. Conversely, your version might be found first and break someone else's app. Binaries I have built tend to link by name to libQtCore.so.4 (i.e. any Qt4 vers) and not libQtCore.so.4.5.2, but there is probably a way to force this if a specific version is required.This method is way better than futzing around with LD_LIBRARY_PATH.
The script approach makes the change local to your application. For example this is the wrapper for the Google Earth app on my machine:
Qt Code:
#!/bin/sh cd "/opt/googleearth" if [ -n "." ] ; then if [ "${LD_LIBRARY_PATH+set}" = "set" ] ; then export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:." else export LD_LIBRARY_PATH="." fi fi exec ./googleearth "$@"To copy to clipboard, switch view to plain text mode
Last edited by ChrisW67; 25th October 2009 at 09:20. Reason: updated contents
schnitzel (25th October 2009)
Hi
i referred the ldd and ld.so commands
In Qt unstalled systems i ran the following command.
ldd ./my application
it gave me
libQtCore.so.4 not fond
libQtGui.so.4 not found
But i have plaed both libs in my application folder.
Now i ran ./configure -static -prefix /qt instaliton path
then i have used make command
Then i went ot lib of Qt .. there i have the command make install..
still i didn't replace old libs , once i replaced and update here
Thanks
Yuvaraj R
As stated above, unless the application directory is contained in LD_LIBRARY_PATH, then its not going to find the libraries in the application dir. You shouldn't be messing with LD_LIBRARY_PATH either, but instead package your application so the installer will automatically install Qt if its not there already. Why include 10MB of libraries if you don't have to?
Thanks for your reply
I used libs path in my application. I got solved issues regarding qt libs
Now new issues has been raised
It is showing Glibc _2.4 not found
Then i installed glibc_2.7 ,but i am getting same error.. is i have
install same version ?
Thanks
Yuvaraj R
Same erro here.
I'm using Kubuntu 10.04 to develop and a fresh install of Kubuntu 8.04 to execute but it falls.
if I use Qt static libraries:
if I use Qt shared libraries:./bcFinal
./bcFinal: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.9' not found (required by ./bcFinal)
./bcFinal: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by ./bcFinal)
the commandSegmentation fault.
What I can do to solve this ?$ ldd ./bcFinal
linux-gate.so.1 => (0xb7f7f000)
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xb786d000)
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xb76f9000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb76e0000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb75ed000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb75c8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb75bd000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb746e000)
libaudio.so.2 => /usr/lib/libaudio.so.2 (0xb7458000)
libXt.so.6 => /usr/lib/libXt.so.6 (0xb7406000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb73e3000)
libSM.so.6 => /usr/lib/libSM.so.6 (0xb73db000)
libICE.so.6 => /usr/lib/libICE.so.6 (0xb73c3000)
libz.so.1 => /usr/lib/libz.so.1 (0xb73ae000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb73a9000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb739f000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb72ee000)
libXi.so.6 => /usr/lib/libXi.so.6 (0xb72e6000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb72de000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb72d8000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb72d3000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb72c9000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb72c6000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7259000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb722f000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb7221000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb713a000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7135000)
/lib/ld-linux.so.2 (0xb7f80000)
libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb710e000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb70ed000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb70ea000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb70e7000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb70cf000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb70ca000)
Last edited by MaikoID; 30th June 2010 at 20:02.
Linux, like all operating systems, does NOT guarantee backward compatibility. If you developed under Kubuntu 10.04, your app is NOT going to run under Kubuntu 8.04 or any other version earlier than 10.04. Your application fails because the C runtime version it was built against doesn't exist on your test machine.
Thanks for the answer.
What Qt in static mode can I install in kubuntu 8.04 to compile and excute my app ? Qt 3 or Qt 4 ? Where can I download ?
which libs gcc download ?, can you help me
Bookmarks