Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, August 2007
Compile static version of Qt


Message 1 in thread

Hi,
I wonder wether anybody has a clean way to configure and compile to a  
different directory than the main distributon so he can simply call  
the qmake from there, make a has a static executable.

I did something like some time ago but it was a very bad hack:  
Configure, compile, cancel compile after libs has been built, then  
manual copy.

Someone might respond where the problem is in using ./configure - 
static -prefix = /usr/local/Trollech/Qt-4.3.1-static, make && make  
install.

The problem with that is that I only have 80 GB of harddisk space. It  
will eat all of it.

The problem with make sub-src is that the first thing make install is  
trying to do is:
rm -f -r "/usr/local/Trolltech/Qt-4.3.1/lib/QtCore.framework"

which is removing my main development installation.

Maybe trolltech could offer a combined debug and release and static  
build because I tend to use static builds for deployments.

Best regards

Axel Jäger

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Message 2 in thread

On 08-09-2007 12:56 PM, "Axel Jäger" wrote:

> Someone might respond where the problem is in using ./configure -
> static -prefix = /usr/local/Trollech/Qt-4.3.1-static, make && make
> install.

If you use -prefix, you should NOT do make install. The first make builds in
the install location.

Keith
**Please do not reply to me, reply to the list.**


--
 [ signature omitted ] 

Message 3 in thread

> If you use -prefix, you should NOT do make install. The first make  
> builds in
> the install location.
Does it? Doesnt /usr/local/Trolltech/Qt-4.3.1 is the default prefix  
and can be overwriten using -prefix and make allways builds in the  
directory of the sourcetree but leaves a set of useless libraries  
because the prefix path is hardcoded in there so it is only usable  
after make install copied them to the prefix location?

     -prefix <dir> ...... This will install everything relative to <dir>
                          (default /usr/local/Trolltech/Qt-4.3.1)


I see there is a new option in configure:

   * -prefix-install .... Force a sandboxed "local" installation of
                          Qt. This will install into
                          /usr/local/Trolltech/Qt-4.3.1, if this  
option is
                          disabled then some platforms will attempt a
                          "system" install by placing default values to
                          be placed in a system location other than
                          PREFIX.

I think this is new to the 4.3 series because I have never seen it  
before. I have also no clue where is the difference between -prefix  
and prefix-install

Regards, Axel Jäger

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Message 4 in thread

On 08-09-2007 1:31 PM, "Axel Jäger" wrote:

>> If you use -prefix, you should NOT do make install. The first make
>> builds in
>> the install location.
> Does it? Doesnt /usr/local/Trolltech/Qt-4.3.1 is the default prefix
> and can be overwriten using -prefix and make allways builds in the
> directory of the sourcetree but leaves a set of useless libraries
> because the prefix path is hardcoded in there so it is only usable
> after make install copied them to the prefix location?
> 
>      -prefix <dir> ...... This will install everything relative to <dir>
>                           (default /usr/local/Trolltech/Qt-4.3.1)
> 
> 
> I see there is a new option in configure:
> 
>    * -prefix-install .... Force a sandboxed "local" installation of
>                           Qt. This will install into
>                           /usr/local/Trolltech/Qt-4.3.1, if this
> option is
>                           disabled then some platforms will attempt a
>                           "system" install by placing default values to
>                           be placed in a system location other than
>                           PREFIX.
> 
> I think this is new to the 4.3 series because I have never seen it
> before. I have also no clue where is the difference between -prefix
> and prefix-install
> 
> Regards, Axel Jäger

I was assuming that the -prefix directory and $QTDIR are the same. That is
that way I build it (on MacOSX) to prevent the duplication of many gigabytes
of files.

For me, I unpack the tar.gz in /usr/local/Trolltech and rename it to the
release version (Qt-4.3.1 for example). Then I use:

     configure -prefix /usr/local/Trolltech/Qt-4.3.1 ...

After the configure step, the output states that only 'make' is needed and
not to use 'make install'. Then I simply 'make' to build directly in the
directory I have configured and prevent unnecessary duplication.

Keith
**Please do not reply to me, reply to the list.**


--
 [ signature omitted ] 

Message 5 in thread

Hi all,

> I was assuming that the -prefix directory and $QTDIR are the same.  
> That is
> that way I build it (on MacOSX) to prevent the duplication of many  
> gigabytes
> of files.

Many gigabytes? I think the biggest part are the .o-files. These are  
not get copied. A release build with all tools and docs is 135 MB here.


> Do you really need a static debug build? I'm doing a static release
> build for every release and I haven't been into any size problems.
No, I don't need a static debug build. I need:
- Static release
- dynamic debug
- dynamic release.

How much space a does a full static release build need? I think the  
biggest part should be the examples because everyone gets the static  
library packed into it.

> For me, I unpack the tar.gz in /usr/local/Trolltech and rename it  
> to the
> release version (Qt-4.3.1 for example). Then I use:
>
>      configure -prefix /usr/local/Trolltech/Qt-4.3.1 ...
>
> After the configure step, the output states that only 'make' is  
> needed and
> not to use 'make install'. Then I simply 'make' to build directly  
> in the
> directory I have configured and prevent unnecessary duplication.

I think this is bad. I prefer to compile somewhere where I don't need  
administrator privileges. Then afterwards I do a su administrator &&  
sudo make install.

Anyway, your solution will also built designer, tools and example  
which are unneeded if they are already in another installation on the  
system.

I think this was the Qt2 and Qt3 way of doing things.

Regards,
Axel Jäger

Attachment:

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Message 6 in thread

On 08-09-2007 2:22 PM, "Axel Jäger" wrote:

>> I was assuming that the -prefix directory and $QTDIR are the same.
>> That is
>> that way I build it (on MacOSX) to prevent the duplication of many
>> gigabytes
>> of files.
> 
> Many gigabytes? I think the biggest part are the .o-files. These are
> not get copied. A release build with all tools and docs is 135 MB here.

It used to be about 6 to 7 with 4.2.x. With 4.3.x it is down to about 3.3GB.

Note, I always (and only) build -debug -static. I only use the Mac for
testing.

Keith
**Please do not reply to me, reply to the list.**


--
 [ signature omitted ] 

Message 7 in thread

On 8/9/07, Keith Esau <keith.esau@xxxxxxx> wrote:
> On 08-09-2007 12:56 PM, "Axel Jäger" wrote:
>
> > Someone might respond where the problem is in using ./configure -
> > static -prefix = /usr/local/Trollech/Qt-4.3.1-static, make && make
> > install.
>
> If you use -prefix, you should NOT do make install. The first make builds in
> the install location.

Where do you get that idea? When running Qt's configure script with a
-prefix argument, the configure script still says "Once everything is
built, you must run 'make install'."
-- 
 [ signature omitted ] 

Message 8 in thread

On 08-09-2007 1:53 PM, "Andrew Medico" wrote:

> On 8/9/07, Keith Esau <keith.esau@xxxxxxx> wrote:
>> On 08-09-2007 12:56 PM, "Axel Jäger" wrote:
>> 
>>> Someone might respond where the problem is in using ./configure -
>>> static -prefix = /usr/local/Trollech/Qt-4.3.1-static, make && make
>>> install.
>> 
>> If you use -prefix, you should NOT do make install. The first make builds in
>> the install location.
> 
> Where do you get that idea? When running Qt's configure script with a
> -prefix argument, the configure script still says "Once everything is
> built, you must run 'make install'."

Actually, when using '-prefix install_location' (with 4.3 or later),
configure specifically says NOT to do make install.

Keith
**Please do not reply to me, reply to the list.**


--
 [ signature omitted ] 

Message 9 in thread

On 09.08.07 14:13:15, Keith Esau wrote:
> On 08-09-2007 1:53 PM, "Andrew Medico" wrote:
> 
> > On 8/9/07, Keith Esau <keith.esau@xxxxxxx> wrote:
> >> On 08-09-2007 12:56 PM, "Axel Jäger" wrote:
> >> 
> >>> Someone might respond where the problem is in using ./configure -
> >>> static -prefix = /usr/local/Trollech/Qt-4.3.1-static, make && make
> >>> install.
> >> 
> >> If you use -prefix, you should NOT do make install. The first make builds in
> >> the install location.
> > 
> > Where do you get that idea? When running Qt's configure script with a
> > -prefix argument, the configure script still says "Once everything is
> > built, you must run 'make install'."
> 
> Actually, when using '-prefix install_location' (with 4.3 or later),
> configure specifically says NOT to do make install.

Hmm,  you must have a different Qt4.3 than I then, my configure doesn't
say anything like that.

Andreas, using Qt4.3.0/Linux

-- 
 [ signature omitted ] 

Message 10 in thread

On 8/9/07, Axel Jäger <axel.jaeger@xxxxxxxxxxx> wrote:
> Maybe trolltech could offer a combined debug and release and static
> build because I tend to use static builds for deployments.

Do you really need a static debug build? I'm doing a static release
build for every release and I haven't been into any size problems.

-- 
 [ signature omitted ] 

Message 11 in thread

On 09.08.07 21:56:38, Axel Jäger wrote:
> which is removing my main development installation.
> 
> Maybe trolltech could offer a combined debug and release and static build 
> because I tend to use static builds for deployments.

You should maybe disable the examples from building? You can pass 

-nomake examples,demos

to configure to do so.

Andreas

-- 
 [ signature omitted ] 

Message 12 in thread

> -nomake examples,demos

Thank you, I didn't knew that.

Seems that -prefix-install is new in Qt 4.3.1

Axel Jäger

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Message 13 in thread

It would be nice if options like these were listed in configure ­help.


On 08-09-2007 3:07 PM, "Axel Jäger" wrote:

>> -nomake examples,demos
>>  
> 
> Thank you, I didn't knew that.
> 
> Seems that -prefix-install is new in Qt 4.3.1
> 
> Axel Jäger
> 


Keith
**Please do not reply to me, reply to the list.**