Bug report #7352

QgsPalettedRasterRenderer sip bindings trigger a bug in SIP 4.14.x

Added by Bogdan Hlevca over 7 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System:linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16329

Description

Function init_QgsPalettedRasterRenderer is missing an attribute. Patch is attached.

The source taken from trunk today fails to compile. The issue has been there for a while, but after getting new sources today and seeing the problem is still there I decided to report it and fix it.

Offending code:

/software/software/Graphics/Maps/Quantum-GIS/python/core/sipcorepart1.cpp: In function ‘void* init_QgsPalettedRasterRenderer(sipSimpleWrapper*, PyObject*, PyObject*, PyObject**, PyObject**, PyObject**)’:
/software/software/Graphics/Maps/Quantum-GIS/python/core/sipcorepart1.cpp:54352:46: error: ‘a2State’ was not declared in this scope
/software/software/Graphics/Maps/Quantum-GIS/python/core/sipcorepart1.cpp:54357:46: error: ‘a2State’ was not declared in this scope
make[2]: *** [python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart1.cpp.o] Error 1
make[1]: *** [python/CMakeFiles/python_module_qgis_core.dir/all] Error 2
make: *** [all] Error 2

sipcorepart1.patch Magnifier (30 Bytes) Bogdan Hlevca, 2013-03-13 07:20 PM

History

#1 Updated by Jürgen Fischer over 7 years ago

  • Subject changed from Compile fails in python/core/sipcorepart1.cpp to QgsPalettedRasterRenderer sip bindings trigger a bug in SIP 4.14.x
  • OS version changed from opensuse to opensuse, raring

apparently a problem with SIP 4.14.x (same on ubuntu raring). The patch doesn't really help as SIP will overwrite the file you patched on the next run.

#2 Updated by Jürgen Fischer over 7 years ago

  • Pull Request or Patch supplied changed from Yes to No

#3 Updated by Bogdan Hlevca over 7 years ago

Can you be more specific? Next run of what?

Complied it with this patch and unless I update again the code I am fine. The problem seems to be in the Qgis code , how will sip override it. You are probably right, but from my perspective I don't see your point.

#4 Updated by Jürgen Fischer over 7 years ago

Bogdan Hlevca wrote:

Can you be more specific? Next run of what?

The next run of sip. The file you patched is not part of the source and gets generated at compile-time from python/core/core.sip. Apparently SIP 4.14 produces the buggy output, that you have fixed. With earlier versions of SIP it works fine.

And being a generated file, the file you patched is in the build directory and isn't even in the source repository and therefore there's nothing, we could apply your patch to. This problem needs to be fixed in the sip file, but I doubt that is actually a problem in qgis SIP bindings, but a bug in SIP itself.

#5 Updated by Mathieu Pellerin - nIRV over 7 years ago

Jürgen, is this why linux nightly builds have not been updated for the last week or so?

#6 Updated by Jürgen Fischer over 7 years ago

nirvn - wrote:

Jürgen, is this why linux nightly builds have not been updated for the last week or so?

yes, but it only affects the raring builds.

#7 Updated by Mathieu Pellerin - nIRV over 7 years ago

Is there a light at the end of the tunnel for this? Or should we request Ubuntu to downgrade its python-sip package to 4.13.x for raring?

#8 Updated by Jürgen Fischer over 7 years ago

nirvn - wrote:

Is there a light at the end of the tunnel for this? Or should we request Ubuntu to downgrade its python-sip package to 4.13.x for raring?

No idea. I'm pretty sure it's a SIP problem (what else should it be - we don't mention a2State and SIP produces a reference to the variable, but not the variable itself). But didn't bother to track that down and fix it or to report it to ubuntu or SIP. Feel free to step in.

#9 Updated by Mathieu Pellerin - nIRV over 7 years ago

Jef, I've contacted Phil Thompson, the maintainer of python-sip. He just fixed the problem in the SIP repository: http://riverbankcomputing.co.uk/hg/sip/rev/054f1676c300

He's willing to quickly release an official 4.14.5 to fix this issue, but would like to have the above patch tested out to see is QGIS does compile.

Bogdan or Jef, would it be possible to help out and confirm it builds ok with the patched SIP? I'm more than happy to do the work required to advocate for a fixed 4.14.5 to be included in raring when we confirm it's ok.

#10 Updated by Matthias Kuhn over 7 years ago

  • Status changed from Open to Closed

Patch verified. This fixes the code generation problem on Fedora 18 (applied on top of sip-4.14.4-1).

Thank you for your investigation.

#11 Updated by Mathieu Pellerin - nIRV over 7 years ago

A request for ubuntu to update its raring python-sip package to 4.14.5 to fix the compilation issue was submitted: https://bugs.launchpad.net/ubuntu/+source/sip4/+bug/1160739

#12 Updated by Bogdan Hlevca over 7 years ago

Ubuntu is not the only linux distribution. I am using openSuSE and it has the same issue. Requests for SIP updates should be sent to all (at least all major) distributions : Debian, SuSE, Fedora.

Thanks,
Bogdan

#13 Updated by Matthias Kuhn over 7 years ago

Update request for Fedora submitted
https://bugzilla.redhat.com/show_bug.cgi?id=928340

You're welcome to send a request to SuSE as well

#14 Updated by Jürgen Fischer over 7 years ago

Bogdan Hlevca wrote:

Ubuntu is not the only linux distribution. I am using openSuSE and it has the same issue. Requests for SIP updates should be sent to all (at least all major) distributions : Debian, SuSE, Fedora.

Please leave a link to the ticket you filed with OpenSUSE here.

Also available in: Atom PDF