Qt-builds icon indicating copy to clipboard operation
Qt-builds copied to clipboard

QT 5 static build with QTCreator

Open FraDiavolo7 opened this issue 12 years ago • 6 comments

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 :

  • I activated all the packages that are disabled by "$( [[ $STATIC_DEPS == no ]] " in the package_order.sh script
  • ICU cannot compile as it is, due to the naming of the produced sicu**.a libraries, so I copied them manually (think I'm gonna throw an issue to them on this point) so they are named libsicu**.a
  • in the buildall script I replaced BUILD_QTCREATOR=no by BUILD_QTCREATOR=yes

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...

FraDiavolo7 avatar Apr 22 '13 08:04 FraDiavolo7

Thanks!

niXman avatar Apr 22 '13 08:04 niXman

MSYS doesn't creates symlinks. It copy files instead

Alexpux avatar Apr 22 '13 14:04 Alexpux

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 avatar Apr 22 '13 17:04 FraDiavolo7

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 :

  • buildall file : --static-qt option :
    • change BUILD_QTCREATOR=no to yes
    • add 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
  • package_order.sh : activate permanently pcre to libxslt
  • scenarii :
    • qt-5.0.1.sh : activate permanently -plugin-sql-ibase to -system-zlib option for configure
  • ICU : at each failure copy :
    • in lib folder all sicu**.a files to libsicu**.a (copy, not rename)
    • in stubdata folder sicudt.a files to libsicudt.a (copy, not rename)
    • in tools\ctestfw folder all sicutest.a files to libsicutest.a (copy, not rename)

FraDiavolo7 avatar Apr 24 '13 16:04 FraDiavolo7

Remove folder Databases in QTDIR and restart build

Alexpux avatar Apr 24 '13 16:04 Alexpux

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?

FraDiavolo7 avatar Apr 24 '13 16:04 FraDiavolo7

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

Alexpux avatar Apr 25 '13 06:04 Alexpux