LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-26-2009, 07:42 AM   #1
mpele
LQ Newbie
 
Registered: Feb 2005
Posts: 3

Rep: Reputation: 0
Qt - Staticly builded


I have installed Qt on Kubuntu 8.10 with sudo apt-get install qt4-dev-tools and it works perfectly. Now I wont to transfer my program to another machine and I need staticly build program. I know that I have to rebuild qt but I don't have source for it. When I download official source code it every time report some errors.

When I try with:
./configure -static -prefix /qt
make sub-src
it goes OK. But when
sudo make install
all remaining code goes to be compiled and then error ocures.

Could anybody give me some advice what to do?
 
Old 02-26-2009, 09:49 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

AFAIK, there are no configure options like : -static -prefix /qt.
Please see './configure --help'

But what you probably mean, is that you want to create 'a statically linked program'
which is your program linked into one executable, including all dependencies ?

Please see 'Ermine' http://magicermine.com/
( and may be 'statifier' http://statifier.sourceforge.net/ )
.....
 
Old 02-27-2009, 01:26 AM   #3
mpele
LQ Newbie
 
Registered: Feb 2005
Posts: 3

Original Poster
Rep: Reputation: 0
The problem was that some packages have not been installed. Afther installing libx11-dev and libxext-dev all works fine.

I have compiled Qt with ptions "-static -prefix /qt". The first means statically linked program, and second to be installed in directory /qt.

Quote:
But what you probably mean, is that you want to create 'a statically linked program'
which is your program linked into one executable, including all dependencies ?
Yes, I want to create statically linked program with qt. And I made it, but I have error on server (targeted) machine:
./test: /lib/libc.so.6: version `GLIBC_2.4' not found (required by ./test)

ldd gives:
./test: /lib/libc.so.6: version `GLIBC_2.4' not found (required by ./test)
librt.so.1 => /lib/librt.so.1 (0x00002b50ec837000)
libdl.so.2 => /lib/libdl.so.2 (0x00002b50ec940000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00002b50eca44000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00002b50ecb59000)
libm.so.6 => /lib/libm.so.6 (0x00002b50ecd57000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002b50eceda000)
libc.so.6 => /lib/libc.so.6 (0x00002b50ecfe7000)
/lib64/ld-linux-x86-64.so.2 (0x00002b50ec712000)

So, all qt libraries are staticly linked but the libm.so.6 is not suitible. Afther "googling" I figured out that on target machine mentioned library is the old.

How could I solve this problem? If I build my program on some older distribution will that make some diference?
Or is it possible to staticly link and that library?
 
Old 02-28-2009, 01:49 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
I have no idea, what it is you are doing with 'qt',
but I'm interested, so please provide a link to where
you found the solution.

To get all the other 'libs' included in the 'statically
linked program', try a tool like 'Ermine'.

Or install "the old OS" on a spare partition or computer,
and compile your program there. Then no 'statically linked
program' is nessecary, if all libs are present on the target OS.
.....
 
Old 03-02-2009, 01:39 AM   #5
mpele
LQ Newbie
 
Registered: Feb 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for Ermine.

The link about this is on the official site:
http://doc.trolltech.com/4.4/deployment-x11.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linking in lib staticly to enable gdb pbharris Programming 0 12-29-2008 08:07 PM
Staticly Assign IP carlosinfl Debian 7 04-08-2006 04:56 AM
Staticly linked jre? lsakhvoruk Linux - Software 0 10-13-2003 03:34 PM
compiling glibc staticly - error matt_w_lambert Linux - Software 0 09-10-2003 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration