Fwd: [QGIS Desktop - Bug #8085] (New) A 64 bits build on Windows crash on exit

Previous Topic Next Topic
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Fwd: [QGIS Desktop - Bug #8085] (New) A 64 bits build on Windows crash on exit

Hash: SHA1

Hi Joaquim,
great news someone has compiled qgis on 64bit Win. Would you mind sharing your sript
and howto, for its possible consolidation? Would you be interested in collaborating
preparing a package?
Thanking you in advance.
All the best.

- -------- Messaggio originale --------
Oggetto: [QGIS Desktop - Bug #8085] (New) A 64 bits build on Windows crash on exit
Data: Sun, 16 Jun 2013 12:34:41 -0700
Mittente: [hidden email]
A: undisclosed-recipients:;

Issue #8085 has been reported by Joaquim Luis.
- -------------------------------------------------------------------------------------

  Bug #8085: A 64 bits build on Windows crash on exit <http://hub.qgis.org/issues/8085>

  * Author: Joaquim Luis
  * Status: New
  * Priority: Normal
  * Assigned to:
  * Category:
  * Target version:
  * Platform: Windows 7 64
  * Platform version:
  * Status info:
  * Resolution:
  * Patch supplied: No
  * Affected version: master
  * Causes crash or corruption: No


I built a 64 bits version using pure native dependencies, that is everything id build
with VS2010 64 bits.
Although it seams to work fine the exe crash on exit but writes a minidump file (~8 Mb).
I can upload the dump if anyone is interested.


- -------------------------------------------------------------------------------------

You have received this notification because you have either subscribed to it, or are
involved in it.
To change your notification preferences, please click here:

Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

Qgis-developer mailing list
[hidden email]
Reply | Threaded
Open this post in threaded view

Re: Fwd: [QGIS Desktop - Bug #8085] (New) A 64 bits build on Windows crash on exit

Joaquim Luis
Hi Paulo,

Sure I'm interested to help in what I can but let me explain first how I did my build and the troubles that I crossed.

1. The most troublesome task is to build all the dependencies. It happens that I have most of them because they are common to GDAL. I can share them but because the DLL hell bit me so many times, I now build all my dll with a non-standard name.  Basically I prefix them either _w32 or _64

2. Instead of using the cmake gui, I have a ConfigUser.cmake that is included in the main CMakeLists.txt. I include the contents of that script at the end of this message because on the nabble interface I don't find an "attach" button.

3. In my case and exactly to be able to build 32 and 64 bits versions of other programs, I use a portable version of python but that should not be a major issue ... as long as users don't try to build 64 bits versions and have a 32 bits python in their path.

4. With all the dependencies and the ConfigUser.cmake things do NOT yet run out of the box. There are currently two problems that I addressed first in #7523 and repeated on #8084
The first one deals with fact that SQLITE3_INCLUDE_DIR is ignored (not sure anymore about the SPATIALITE_INCLUDE_DIR) causing errors of heders not found. The second one is more annoying as sip is not detected (I insist it's not my fault, it's what python replies to in the 'questions' asked in FindSIP.py) and I had to manually fix the makefiles by inserting the correct paths.

5. As also mentioned in #7523 there will be the error
   NMAKE : fatal error U1077: '..\..\output\bin\crssync.EXE' : return code '0xc0000139'
this is tricky and is caused by the fact that PyQt ships with old versions of  QtCore4 and QtGui4.dll that are caught first in the path than those in the Qt(64) directory. The only way out I found was to temporarily move those DLLs out of the way (just renamed them).

OK, at this point I was able to build but than came the issue raised in #8085 It turns out that what was causing the crash was the fact that since I use a portable version of python and don't have in the path by default (that's the whole idea of using portable versions) there was no python visible when I executed the qgis.exe. However, if I do not apply the patch indicated  by Jurgen (the if ( myPythonUtils) ) and call the qgis.exe from the shell window used to make the build (and that therefore knows where python is) than qgis dies immediately after the splash screen shows up. So there is another problem here that can be circumvented by the conditional patch but that still exists.

So, let me know what I can do more to help


and now the script (note that I use a naming convention for directories and dlls that allows me to easily build 32 or 64 bits with the same script)

# $Id:  $
# Use this file to override variables in 'ConfigDefault.cmake' on a per-user basis.
# 'ConfigUser.cmake' is not version controlled.

# Set build type can be: empty, Debug, Release, relwithdebinfo or minsizerel (default is Release)
set(CMAKE_BUILD_TYPE relwithdebinfo)


        # The compiler. Either 10 or 11 for VS2010 or VS2012
        set (VC VC10)


        set (BITAGE 64)
        # Detect if we are building a 32 or 64 bits version
                #set(BITAGE 64)
        endif ()

        # Installation path
        set(CMAKE_INSTALL_PREFIX "C:/programs/QGisGIT/WIN${BITAGE}")

        # set location of EXPAT
        set(EXPAT_INCLUDE_DIR "C:/programs/compa_libs/expat-2.0.1/compileds/${VC}_${BITAGE}/include")
        set(EXPAT_LIBRARY "C:/programs/compa_libs/expat-2.0.1/compileds/${VC}_${BITAGE}/lib/libexpat.lib")

        # set location of GDAL
        set(GDAL_INCLUDE_DIR "C:/programs/GDALtrunk/gdal/compileds/${VC}_${BITAGE}/include")
        set(GDAL_LIBRARY "C:/programs/GDALtrunk/gdal/compileds/${VC}_${BITAGE}/lib/gdal_i.lib")

        # set location of GEOS
        set(GEOS_INCLUDE_DIR "C:/programs/compa_libs/geos_SVN/compileds/${VC}_${BITAGE}/include")
        set(GEOS_LIBRARY     "C:/programs/compa_libs/geos_SVN/compileds/${VC}_${BITAGE}/lib/geos_c.lib")

        # set location of SPATIALINDEX
        set(SPATIALINDEX_INCLUDE_DIR "C:/programs/compa_libs/libspatialindex-1.8.0/compileds/${VC}_${BITAGE}/include")
        set(SPATIALINDEX_LIBRARY     "C:/programs/compa_libs/libspatialindex-1.8.0/compileds/${VC}_${BITAGE}/lib/spatialindex.lib")

        # set location of GEOS
        set(GSL_INCLUDE_DIR "C:/programs/compa_libs/gsl-1.15/compileds/${VC}_${BITAGE}/include")
        set(GSL_LIB         "C:/programs/compa_libs/gsl-1.15/compileds/${VC}_${BITAGE}/lib/gsl.lib")
        set(GSLCBLAS_LIB    "C:/programs/compa_libs/gsl-1.15/compileds/${VC}_${BITAGE}/lib/cblas.lib")

        # set location of ICONV
        set(ICONV_INCLUDE_DIR "C:/programs/compa_libs/libiconv-1.14/compileds/${VC}_${BITAGE}/include")
        set(ICONV_LIBRARY     "C:/programs/compa_libs/libiconv-1.14/compileds/${VC}_${BITAGE}/lib/libiconv.lib")

        # set location of PROJ
        set(PROJ_INCLUDE_DIR "C:/programs/compa_libs/proj4/compileds/${VC}_${BITAGE}/include")
        set(PROJ_LIBRARY     "C:/programs/compa_libs/proj4/compileds/${VC}_${BITAGE}/lib/proj_i.lib")

        # set location of QWT
        set(QWT_INCLUDE_DIR "C:/programs/compa_libs/qwt/compileds/${VC}_${BITAGE}/include")
        set(QWT_LIBRARY     "C:/programs/compa_libs/qwt/compileds/${VC}_${BITAGE}/lib/qwt.lib")

        # set location of SPATIALITE
        set(SPATIALITE_INCLUDE_DIR "C:/programs/compa_libs/libspatialite-4.0.0/compileds/${VC}_${BITAGE}/include")
        set(SPATIALITE_LIBRARY     "C:/programs/compa_libs/libspatialite-4.0.0/compileds/${VC}_${BITAGE}/lib/spatialite_i.lib")

        # set location of SQLITE3
        set(SQLITE3_INCLUDE_DIR "C:/programs/compa_libs/sqlite3.7.16/compileds/${VC}_${BITAGE}/include")
        set(SQLITE3_LIBRARY     "C:/programs/compa_libs/sqlite3.7.16/compileds/${VC}_${BITAGE}/lib/sqlite3.lib")

        # Extra debugging for developers: