Feature request #2845

QGIS won't compile with python

Added by Alexbit - almost 14 years ago. Updated about 13 years ago.

Status:Closed
Priority:Low
Assignee:Tim Sutton
Category:Python plugins
Pull Request or Patch supplied: Resolution:worksforme
Easy fix?:No Copied to github as #:12905

Description

If you try to compiling any version of qgis diffrent from svn trunk on Archlinux (Linux 2.6.34-ARCH #3905 SMP PREEMPT i686 Intel(R) Pentium(R) D CPU 3.20GHz GenuineIntel GNU/Linux whit KDE 4.4.4) you're unable to bind with python so you cannot get the fetch python plugin menu for install plug-in.
I've try on the same machine (see above) with stable and develop but, as I say, only svn compile with no error and python bindings.

Same situation on a laptop with analog software config.

Moreover, also svn need to be manually patch at line 1051 of src/app/composer/qgscomposer.cpp. by changing if ( splitterState != QVariant::QVariant() ) in if ( splitterState != QVariant() )

Thank you for the attention.
Best regards,
Alessio

PS: sorry if I miss details but i'm not a programmer. If you need more info tell me how I can I send that to you (alessiob(AT)gmail.com

History

#1 Updated by Jürgen Fischer almost 14 years ago

Do you get any error messages or terminal output? Which Qt, PyQt4 and SIP version is ArchLinux using? It might be useful to post a build log.

#2 Updated by Alexbit - almost 14 years ago

If it's usefull for you:

This is the output of ccmake for stable (1.0.x):

The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: /usr/bin/gcc
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: /usr/bin/c++
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Found Proj: /usr/lib/libproj.so
Found Sqlite3: /usr/lib/libsqlite3.so
Found GEOS: /usr/lib/libgeos_c.so
Found GDAL: /usr/lib/libgdal.so
Found PostgreSQL: /usr/lib/libpq.so
Found Expat: /usr/lib/libexpat.so
Using GSL from /usr
Could not find GRASS
Found PythonLibs: /usr/lib/libpython2.6.so
Found PythonInterp: /usr/bin/python2.6
Python libraries found
SIP is required in version 4.7 or later!
Python bindings disabled due dependency problems!
Looking for Q_WS_X11
Looking for Q_WS_X11 - found
Looking for Q_WS_WIN
Looking for Q_WS_WIN - not found.
Looking for Q_WS_QWS
Looking for Q_WS_QWS - not found.
Looking for Q_WS_MAC
Looking for Q_WS_MAC - not found.
Found Qt-Version 4.6.3 (using /usr/bin/qmake)
Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so
Looking for _POSIX_TIMERS
Looking for _POSIX_TIMERS - found
Python not being built
Configuring done

This is the output of ccmake for develop (1.4.x)

The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: /usr/bin/gcc
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: /usr/bin/c++
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for openpty
Looking for openpty - not found
Looking for openpty
Looking for openpty - found
Found Proj: /usr/lib/libproj.so
Found Expat: /usr/lib/libexpat.so
Using GSL from /usr
Found GEOS: /usr/lib/libgeos_c.so
Found GDAL: /usr/lib/libgdal.so
Found PostgreSQL: /usr/lib/libpq.so
Could not find GRASS
Found PythonLibs: /usr/lib/libpython2.6.so
Found PythonInterp: /usr/bin/python2.6
Python libraries found
SIP is required in version 4.7 or later!
Python bindings disabled due dependency problems!
Looking for Q_WS_X11
Looking for Q_WS_X11 - found
Looking for Q_WS_WIN
Looking for Q_WS_WIN - not found.
Looking for Q_WS_QWS
Looking for Q_WS_QWS - not found.
Looking for Q_WS_MAC
Looking for Q_WS_MAC - not found.
Found Qt-Version 4.6.3 (using /usr/bin/qmake)
Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so
Looking for _POSIX_TIMERS
Looking for _POSIX_TIMERS - found
Python not being built
Configuring done

This is the output of ccmake for SVN (1.5.x):

The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: /usr/bin/gcc
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: /usr/bin/c++
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Quantum GIS version: 1.5.0 Tethys (10500)
Looking for openpty
Looking for openpty - not found
Looking for openpty
Looking for openpty - found
Found Proj: /usr/lib/libproj.so
Found Expat: /usr/lib/libexpat.so
Using GSL from /usr
Found GEOS: /usr/lib/libgeos_c.so
Found GDAL: /usr/lib/libgdal.so
Found PostgreSQL: /usr/lib/libpq.so
Could not find GRASS
Looking for Q_WS_X11
Looking for Q_WS_X11 - found
Looking for Q_WS_WIN
Looking for Q_WS_WIN - not found.
Looking for Q_WS_QWS
Looking for Q_WS_QWS - not found.
Looking for Q_WS_MAC
Looking for Q_WS_MAC - not found.
Found Qt-Version 4.6.3 (using /usr/bin/qmake)
Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so
Looking for _POSIX_TIMERS
Looking for _POSIX_TIMERS - found
Found PythonInterp: /usr/bin/python2.6
Found Python executable: /usr/bin/python2.6
Found Python version: 2.6.5
Found Python library: /usr/lib/libpython2.6.so
Found SIP version: 4.10.2
Found PyQt4 version: 4.7.3
Configuring done

#3 Updated by Jürgen Fischer almost 14 years ago

Replying to [comment:3 Alexbit]:

If it's usefull for you:

This is the output of ccmake for stable (1.0.x):

...
Python libraries found
SIP is required in version 4.7 or later!
Python bindings disabled due dependency problems!

This is the output of ccmake for develop (1.4.x)

... 
Python libraries found
SIP is required in version 4.7 or later!
Python bindings disabled due dependency problems!

This is the output of ccmake for SVN (1.5.x):

...
Found Python library: /usr/lib/libpython2.6.so
Found SIP version: 4.10.2
Found [[PyQt]]4 version: 4.7.3

Ok, so python support is only builtin for 1.5. Earlier version probably just don't detect that SIP 4.10 is newer than 4.7 (see also #2446).

Anyway, what (runtime) errors do you get regarding the python support with 1.5?

#4 Updated by Alexbit - almost 14 years ago

I'm sorry but, probably, I was not clear in the exposition of the problem.
As I say in the firsy post, there's no problem "compiling any version of qgis diffrent from svn".
So, in other words there's NO problem with 1.5.
In my tests only stable (LTS) and develop version are afflicted by the problem that cause the inability of bind python.

#5 Updated by Jürgen Fischer almost 14 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Replying to [comment:5 Alexbit]:

I'm sorry but, probably, I was not clear in the exposition of the problem.

Ah ok, I didn't get it. So this is a duplicate of #2678.

Try this patch:

--- qgis-1.4.0.orig/cmake/Python.cmake
+++ qgis-1.4.0/cmake/Python.cmake
@@ -148,12 +148,12 @@
     IF (HAVE_SIP_MODULE AND SIP_BINARY_PATH AND SIP_INCLUDE_DIR)
       # check for SIP version
       # minimal version is 4.7 (to support universal builds)
-      SET (SIP_MIN_VERSION 040700)
-      TRY_RUN_PYTHON (RES "import sip\
print '%x' % sip.SIP_VERSION" SIP_VERSION)
+      SET (SIP_MIN_VERSION 263936) # 0x40700
+      TRY_RUN_PYTHON (RES "import sip\
print '%d' % sip.SIP_VERSION" SIP_VERSION)
       IF (SIP_VERSION EQUAL "${SIP_MIN_VERSION}" OR SIP_VERSION GREATER "${SIP_MIN_VERSION}")
         SET (SIP_IS_GOOD TRUE)
       ENDIF (SIP_VERSION EQUAL "${SIP_MIN_VERSION}" OR SIP_VERSION GREATER "${SIP_MIN_VERSION}")
-    
+
       IF (NOT SIP_IS_GOOD)
         MESSAGE (STATUS "SIP is required in version 4.7 or later!")
       ENDIF (NOT SIP_IS_GOOD)

#6 Updated by Alexbit - almost 14 years ago

  • Resolution deleted (duplicate)
  • Status changed from Closed to Feedback

I'm sorry but I still that is an unsolved ticket.
Qgis won't build python support on any machine that have sip 4.10.x installed.
I've try on a bounce of machine I've got the same result.

As I say, it seem's that the only UNaffected versione is 1.5.
I-ve search over the internet and Ive try all the proposed workaround but no one works.
Moreover it seems to be one of the must recurrency "bug".

Please con you modify the code to allow the correct recognition of sip greater then 4.7?

Hope in your help.Please.

#7 Updated by Borys Jurgiel almost 14 years ago

  • Status changed from Feedback to Open

#8 Updated by Jürgen Fischer almost 14 years ago

Replying to [comment:7 Alexbit]:

I-ve search over the internet and Ive try all the proposed workaround but no one works.
Moreover it seems to be one of the must recurrency "bug".

What about the patch above?

#9 Updated by Alexbit - almost 14 years ago

I've try the suggest patch here and on bug 2678 but they don't solve.
Moreover with google I've found some ideas but they got the same result.
:-(

Also I think that this is the most interesting (http://www.orocos.org/forum/rtt/rtt-dev/kdl-not-detecting-sip-410-python-bindings) but i determ another error during compiling (miss a file)

#10 Updated by Jürgen Fischer almost 14 years ago

Replying to [comment:11 Alexbit]:

I've try the suggest patch here and on bug 2678 but they don't solve.
Moreover with google I've found some ideas but they got the same result.
:-(

Are you sure you applied the patch correctly and did a clean rebuild? The SIP detection problem should be fixed with the patch - at least it works just fine on sid here.

#11 Updated by Alexbit - almost 14 years ago

I've done the best I can but I can't be sure on my operate because I'm not so skilled.

Please, cause I'm not a programmer, can you courtesy explain me a detailed procedure to apply the patch?

As I say I'm absolutely interesed on install 1.0.2 because I'm in a production environment and I need the maximum stability.

Hope again inyour preciouse help.
Thank you.

(ps: have you see that I'm on Archlinux x86_64 with KDE full updd

#12 Updated by Paolo Cavallini about 13 years ago

  • Status changed from Open to Closed
  • Resolution set to worksforme

Please check again with a recent version.

Also available in: Atom PDF