1

By trying to compile QGIS from sources on Ubuntu, there is the file /opt/QGIS/cmake/FindSIP.py which content is:

import sipconfig

sipcfg = sipconfig.Configuration()
print("sip_version:%06.0x" % sipcfg.sip_version)
print("sip_version_num:%d" % sipcfg.sip_version)
print("sip_version_str:%s" % sipcfg.sip_version_str)
print("sip_bin:%s" % sipcfg.sip_bin)
print("default_sip_dir:%s" % sipcfg.default_sip_dir)
print("sip_inc_dir:%s" % sipcfg.sip_inc_dir)
# SIP 4.19.10+ has new sipcfg.sip_module_dir
if hasattr(sipcfg, "sip_module_dir"):
    print("sip_module_dir:%s" % sipcfg.sip_module_dir)
else:
    print("sip_module_dir:%s" % sipcfg.sip_mod_dir)

In Python3.6, the last if/else statement prints:

sip_module_dir:/usr/lib/python3.6/dist-packages

But the string /usr/lib/python3.6/dist-packages doesn't match an existing directory (it is probably part of why I encountered the error: python/CMakeFiles/python_module_qgis__core.dir/build.make:537: recipe for target 'python/core/sip_corepart0.cpp' failed' failed during build process).

I either have:

/usr/lib/python3/dist-packages

or

/usr/lib/python3.6/site-packages

And it's only in /usr/lib/python3/dist-packages that I have some 'sip' related files (the other directory gives no results):

$ find . -iname "*sip*"
./twisted/protocols/__pycache__/sip.cpython-36.pyc
./twisted/protocols/sip.py
./twisted/test/test_sip.py
./twisted/test/__pycache__/test_sip.cpython-36.pyc
./sipconfig.py
./sip.pyi
./sipconfig_nd6.py
./sipdistutils.py
./__pycache__/sipconfig_nd6.cpython-36.pyc
./__pycache__/sipdistutils.cpython-36.pyc
./__pycache__/sipconfig.cpython-36.pyc
./sip.cpython-36m-x86_64-linux-gnu.so

I guess there is something to fix within 'sip' itself but don't know where exactly, neither how to do that.

More information;
OS: Ubuntu 16.04 64 bits
Python: 3.6.7
Sip: 4.19.7

AymericM
  • 1,645
  • 13
  • 13
swiss_knight
  • 5,787
  • 8
  • 50
  • 92

0 Answers0