Is it possible to build a completely static app using Qt 4 on Linux

After successfully statically compile Qt 4.6.3 under Unbuntu 10.04 Server, I tried to build static version fancybrowser, after some study, I got a static execute, but when ran it, it suspended before load url, I do not know why, after some search I got the following answer,

> Is it possible to build a completely static app using Qt 4 on Linux?

Completely static? No.

Almost completely static? Yes. The GNU Libc library’s NSS subsystem still
requires dynamic loading of some modules in order to fullfil your requests,
especially when it comes to DNS resolution. If you don’t use QTcpSocket or
QHostInfo, you probably will get a fully static binary though.

Make sure you have static libs for all Qt dependencies. They will be linked
into your executable, which will be several megabytes in size.

Better than that is to have Qt as a static library, but nothing else. That
will link Qt into your program, but will dynamically load the libraries it
needs from the system.

I believe that’s the approach that Skype uses on their static binaries.

> My problem is I’m trying to build an application that will run on a
> variety of recent (2.6.x kernel) distros. My first attempt (using shared
> libraries) results in “Floating point exceptions” when run on Debian. So
> now I’m looking at building statically.

My suggestion is to try the linux-lsb-g++ mkspec if you intend to deploy a Qt
application in several different Linux systems.

But I don’t see how floating point exceptions can have anything to do with the
Qt build. Maybe if you post a code sample and/or a backtrace of the crash, we
can help with that instead.

Be sure that you build your application on the “lowest common denominator”
platform of yours, since libc and libstdc++ are not forwards compatible
(i.e., you have to link to the lowest version you intend to deploy on).

This applies even if you replace the headers of those libraries with older
headers. (There’s a link-time dependency, whereas Qt is only compile-time)

> I was able to add a -static flag to my link flags in my .pro file, and
> I’m linking against static Qt libs, but when it gets to linking in
> libSM, it only finds the dynamic version and stops. I’m sure this is
> also the case for most of the X11 libraries.

Like I said above, you need to have the static library for all dependencies if
you want to have a fully static build.

> Can this be made to work? Or am I stuck building dynamically on a
> multitude of distros?

There’s always LSB.

The recently-announced LSB 3.2 contains Qt 4.2 as part of the required
standard. Any Linux distribution conforming to LSB 3.2 will have that. Most
recent Linux distributions already ship Qt 4.2 or even 4.3 (thanks to the KDE
4 release).

The previous LSB 3.1 standard contained Qt 4.1 but only as an optional module.
It has been out for close to 2 years now, though, so you may have a wider
variety of distribution targets.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

JD-GUI Another Fast Java Decompiler

Introduction
The aim of “Java Decompiler” project is to develop tools to decompile and analyze Java 5, and upper, “.class” files.
Some facts:
* The final release of JSR 176, defining the major features of the J2SE 5.0, has been published the september 30, 2004.
* The lastest Java version supported by JAD, the famous Java decompiler written by Mr. Pavel Kouznetsov, is 1.3.
* Most of Java decompilers downloadable today from Internet, such as “DJ Java Decompiler” or “Cavaj Java Decompiler”, are powered by JAD : they can not display Java 5 sources.

Main features
* JD-Core and JD-GUI are written in C++. This allows an extremely fast decompilation and a display.
* JD-Core does not require the Java runtime environment for its functioning, therefore no special setup is required.
* JD-Core works with most current compilers including the following:
o jdk1.1.8
o jdk1.3.1
o jdk1.4.2
o jdk1.5.0
o jdk1.6.0
o jikes-1.22
o harmony-jdk-r533500
o Eclipse Java Compiler v_677_R32x, 3.2.1 release
o jrockit90_150_06
* JD-Core supports the following new features of Java 5:
o Annotations
o Generics
o Type “enum”
* JD-GUI supports Drag and Drop.
* JD-GUI supports JAR files.
* JD-GUI displays color coded Java source code.
* JD-GUI allows you to browse the “class” files hierarchy.
* JD-GUI displays “log” files, and allow you to decompile “class” files appearing in Java stack traces.
* JD-Core and JD-GUI use the excellent cross-platform wxWidgets toolkit.
Downloads
jd-gui-0.2.5.windows.zip
jd-gui-0.2.5.linux.i686.tar.gz
jd-gui-0.2.5.osx.i686.dmg

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

PDFedit-Linux Version Open Source PDF Editor

Introduce
Free editor for PDF documents. Complete editing of PDF documents is possible with PDFedit. You can change raw pdf objects (for advanced users) or use many gui functions. Functionality can be easily extended using a scripting language (ECMAScript).

About the Project
Free (and open source) editor for manipulating PDF documents. GUI version + commandline interface.
Scripting is used to a great extent in editor and almost anything can be scripted, it is possible to create own scripts or plugins.
Target platform are operating systems of Unix type (Linux, BSD, …), we are using C++, XPDF, QT3 and QSA.
Note: QT3.x is required, editor can’t be compiled with QT4.x. In most distributions both qt3 and qt4 can be installed at once.
Editor is released under terms of GNU GPL version 2
Home Page
http://pdfedit.petricek.net/index_e.html
http://sourceforge.net/projects/pdfedit
Download

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride