LSB helps you deploy a Qt4 app in several different Linux distros

I compiled a static Qt4 application(fancybrowser) under Ubuntu 10.04, it works under Ubuntu 10.04, but when I tried to run it under CentOS 4.6.2, I got the following error,

./fancybrowser: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by ./fancybrowser)

After some research, I knew I have to compile it under CentOS 4.6.2 and lower version, or under Debian 4, so I install Debian 4 under vmware, recompile Qt under Debian4, compile fancybrowser, there are many duplicated job.
continuing search, and I got the suggestion,
Try the linux-lsb-g++ mkspec if you intend to deploy a Qt application in several different Linux systems/distros.

P.S.
What is the LSB?
LSB means Linux Standard Base.

An operating system’s success is inextricably linked with the number and quality of applications that run on top of it. Linux and its variances between distributions, however, present ISVs and individual developers with a unique set of challenges: different distributions of Linux make use of different versions of libraries, important files stored in different locations, and so on. If an ISV wants to reach a global Linux audience, they must support more than one distribution of Linux. These challenges and variances make it difficult–and costly–for ISVs to target the Linux platform.

The Linux Standard Base was created to solve these challenges and lower the overall costs of supporting the Linux platform. By reducing the differences between individual Linux distributions, the LSB greatly reduces the costs involved with porting applications to different distributions, as well as lowers the cost and effort involved in after-market support of those applications.

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

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

Convert SWF to XNA with Free Open Source Software-Swf2XNA

Swf2XNA is an open source program under BSD license, developed in C#, with it , you can make Windows/XBox/Win7 games by leveraging Flash for assets and layout, as well as using Box2D visually. It makes 2D games in XNA quite simple to make!
Download source code here.

P.S.
About XNA
Microsoft® XNA™ is composed of industry-leading software, services, resources, and communities focused on enabling game developers to be successful on Microsoft gaming platforms.

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