Alexpux / Qt-builds

Scripts for building Qt-5.x
48 stars 16 forks source link

QT 5 static build with QTCreator #21

Open FraDiavolo7 opened 11 years ago

FraDiavolo7 commented 11 years ago

Compiling with --static-qt works just fine, but the lack of qtcreator is not something my team can be using so I need to compile it one way or another.

What I have done so far :

Compilation is running to test the last part.

In another issue ( https://github.com/Alexpux/Qt-builds/issues/20 ) you told me to use a "toolchains builded with threads=win32 to avoid dependency from libwinpthread-1.dll" So my next try is this. I have prepared my buildall script by adding URL_MINGW64=http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/64-bit/threads-win32/seh/x64-4.8.0-release-win32-seh-rev2.7z at the end of the --static-qt analysis block. I am still not sure if I should let the "-lwinpthread" in then "STATIC_LD" variable, but I think I will find out sooner or later...

Sidenote : it might be possible to overcome the ICU compilation problem by creating, before compilation of ICU, symbolic links libcisu.a pointing to sicu.a but I am not sure MSYS handle that well...

niXman commented 11 years ago

Thanks!

Alexpux commented 11 years ago

MSYS doesn't creates symlinks. It copy files instead

FraDiavolo7 commented 11 years ago

Yep, I found that out at my depends... I am lauching another run from ICU and fixing it bit by bit so I don't encounter problems afterwards.

My last build failed on QTCreator on a undefined reference problem, hope it will solve it...

FraDiavolo7 commented 11 years ago

Update.

My undefined reference ( protocol.o ) was due to a mistake in QT configure call (forgot to remove --no-icu and the likes). So back to QT building.

After modification of configure, I encounter another error.

When QT is configured, there is missing folders, which lead to a missing files during build. Missing folders are databases and all subfolders, in the final QT folder. This missing leads to a missing libpq--fe.h file.

I am looking through the configuration process to find where this problem is coming from, but it is quite confusing.

I compared logs between succeed x64 and failed x64-static configurations steps, there is no significant difference before the claim : x64 : Environment: INCLUDE=

  E:\MSys\home\user\Qt-builds\toolchains\mingw64\x86_64-w64-mingw32\include

  c:\QtSDK\ported64\include

  c:\QtSDK\ported64\include\libxml2

  c:\QtSDK\Qt64-5.0.1\databases\firebird\include

  c:\QtSDK\Qt64-5.0.1\databases\mysql\include\mysql

  c:\QtSDK\Qt64-5.0.1\databases\pgsql\include

  c:\QtSDK\Qt64-5.0.1\databases\oci\include

x64-static : Environment: INCLUDE=

  E:\MSys\home\user\Qt-builds\toolchains\mingw64\x86_64-w64-mingw32\include

  c:\QtSDK\ported64-s\include

  c:\QtSDK\ported64-s\include\libxml2

I need to find where these includes are coming from and then find out why they are missing.

Reminder of done modifications :

Alexpux commented 11 years ago

Remove folder Databases in QTDIR and restart build

FraDiavolo7 commented 11 years ago

that is the interesting part, there is no databases folder in QTDIR... So maybe I have to restart from step 1 flushing everything?

Do you know which step is creating this folder?

Alexpux commented 11 years ago

It create in qt-$version.sh script. But it only needed when building shared Qt. If you build static Qt you need to remove any sql drivers from configure parameters