Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 828938

Summary: sci-visualization/scidavis-2.4.0_p20211117 SIP_ABI_MINOR_VERSION was not declared
Product: Gentoo Linux Reporter: Helmut Jarausch <jarausch>
Component: Current packagesAssignee: Andrew Ammerlaan <andrewammerlaan>
Status: RESOLVED FIXED    
Severity: normal CC: andrewammerlaan, jstein, sci
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/SciDAVis/scidavis/pull/25
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log xz-compressed
emerge --info

Description Helmut Jarausch 2021-12-11 16:05:43 UTC
Created attachment 758564 [details]
build log  xz-compressed

I have sip-4.19.25-r1 installed here
Compilation fails:

/usr/bin/x86_64-pc-linux-gnu-g++ -DDOC_PATH=\"/usr/share/doc/scidavis\" -DDOWNLOAD_LINKS -DLEGACY_CODE_0_2_x -DPLUGIN_PATH=\"/usr/lib/scidavis/plugins\" -DPYTHON_CONFIG_PATH=\"/usr/etc\" -DPYTHON_UTIL_PATH=\"/usr/share/scidavis\" -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DSCRIPTING_CONSOLE -DSCRIPTING_DIALOG -DSCRIPTING_MUPARSER -DSCRIPTING_PYTHON -DSEARCH_FOR_UPDATES -DTS_PATH=\"/usr/share/scidavis/translations\" -I/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis/libscidavis_autogen/include -I/usr/include/qwt5-qt5 -I/usr/include/qwtplot3d -I/usr/include/python3.9 -I/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis -I/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c/libscidavis -I/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c/libscidavis/src -I/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c/libscidavis/src/future -I/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis/python -I/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis/python/scidavis -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtNetwork  -march=native -O3 -pipe -fexceptions -Wall -Wextra -pedantic -fPIC -std=c++17 -MD -MT libscidavis/CMakeFiles/libscidavis.dir/python/scidavis/sipscidaviscmodule.cpp.o -MF libscidavis/CMakeFiles/libscidavis.dir/python/scidavis/sipscidaviscmodule.cpp.o.d -o libscidavis/CMakeFiles/libscidavis.dir/python/scidavis/sipscidaviscmodule.cpp.o -c /var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis/python/scidavis/sipscidaviscmodule.cpp
/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis/python/scidavis/sipscidaviscmodule.cpp:1091:5: error: 'SIP_ABI_MINOR_VERSION' was not declared in this scope; did you mean 'PY_MINOR_VERSION'?
 1091 |     SIP_ABI_MINOR_VERSION,
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     PY_MINOR_VERSION
/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis/python/scidavis/sipscidaviscmodule.cpp: In function 'PyObject* PyInit_scidavis()':
/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis/python/scidavis/sipscidaviscmodule.cpp:1184:49: error: 'SIP_ABI_MAJOR_VERSION' was not declared in this scope; did you mean 'PY_MAJOR_VERSION'?
 1184 |     if (sipExportModule(&sipModuleAPI_scidavis, SIP_ABI_MAJOR_VERSION, SIP_ABI_MINOR_VERSION, 0) < 0)
      |                                                 ^~~~~~~~~~~~~~~~~~~~~
      |                                                 PY_MAJOR_VERSION
/var/tmp/portage/sci-visualization/scidavis-2.4.0_p20211117/work/scidavis-acc11c507631dc89db90c8777bab53b814620b4c_build/libscidavis/python/scidavis/sipscidaviscmodule.cpp:1184:72: error: 'SIP_ABI_MINOR_VERSION' was not declared in this scope; did you mean 'PY_MINOR_VERSION'?
 1184 |     if (sipExportModule(&sipModuleAPI_scidavis, SIP_ABI_MAJOR_VERSION, SIP_ABI_MINOR_VERSION, 0) < 0)
      |                                                                        ^~~~~~~~~~~~~~~~~~~~~
      |                                                                        PY_MINOR_VERSION
Comment 1 Helmut Jarausch 2021-12-11 16:06:20 UTC
Created attachment 758565 [details]
emerge --info
Comment 2 Andrew Ammerlaan gentoo-dev 2021-12-11 20:05:30 UTC
(In reply to Helmut Jarausch from comment #0)
> Created attachment 758564 [details]
> build log  xz-compressed
> 
> I have sip-4.19.25-r1 installed here

Scidavis-2.4.0_p20211117 depends on >=dev-python/sip-6:5, it will not work with sip-4 (scidavis-2.4.0 on the other hand does work with sip-4, but not with sip-5 or sip-6). In fact the sip dependency was the whole reason to add the patch ebuild, because otherwise it is impossible to install both scidavis and calibre.

Sip-6 should have been pulled in by USE="python", did you perhaps use "--nodeps" or something similar?
Comment 3 Helmut Jarausch 2021-12-13 12:11:05 UTC
Thanks, it builds fine with sip-6.5.0.

I had installed both sip-4 and sip-6 and I couldn't use eselect.
I had to uninstall sip-4 (only one old package depended on it)

Helmut.
Comment 4 Andrew Ammerlaan gentoo-dev 2021-12-13 12:14:38 UTC
> I had installed both sip-4 and sip-6 and I couldn't use eselect.
> I had to uninstall sip-4 (only one old package depended on it)

Than there still is a problem here. Looks like the scidavis build system uses sip-4 before it uses sip-6, that should be the other way around (or rather, the configure phase should just reject sip-4 completely since it only works with sip-6)
Comment 5 Andreas Sturmlechner gentoo-dev 2022-04-15 20:17:19 UTC
Can you come up with such a patch?
Comment 6 Andrew Ammerlaan gentoo-dev 2022-04-16 09:39:19 UTC
(In reply to Andreas Sturmlechner from comment #5)
> Can you come up with such a patch?

Probably, but I'll have to dig into this.

In any case this should not be blocking Bug 820464, Scidavis builds fine with sip-6 but does not build with sip<5 so this bug is the exact opposite of the Bug 820464 tracker.
Comment 7 Andrew Ammerlaan gentoo-dev 2022-04-16 16:20:38 UTC
So turned out the root of the problem was that sip-4 installs a sip.h into the system include directory, which overwrites the sip.h generated into the build directory by sip-6 at build time (apparently that is how sip does things in version 6).

Once I found out what exactly the problem was, the solution was simple.
Comment 8 Larry the Git Cow gentoo-dev 2022-04-16 16:31:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3da8fa0555ccb69b5f3114da975c166fd032faf2

commit 3da8fa0555ccb69b5f3114da975c166fd032faf2
Author:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
AuthorDate: 2022-04-16 16:28:22 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2022-04-16 16:30:58 +0000

    sci-visualization/scidavis: multiple bug fixes
    
    - Enable muparser unconditionally
    Closes: https://bugs.gentoo.org/834074
    
    - Only set PYTHON_SCRIPTDIR if we enable python scripting
    Closes: https://bugs.gentoo.org/832753
    
    - Fix build if sip-4 installed as well as sip-6
    Closes: https://bugs.gentoo.org/828938
    
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 ...t3d.patch => scidavis-2.7-find-qwtplot3d.patch} |  0
 .../scidavis-2.7-fix-build-if-sip4-installed.patch | 13 +++++++++++++
 ....patch => scidavis-2.7-install-locations.patch} |  0
 sci-visualization/scidavis/metadata.xml            |  1 -
 ...{scidavis-2.7.ebuild => scidavis-2.7-r1.ebuild} | 22 +++++++++++++++-------
 5 files changed, 28 insertions(+), 8 deletions(-)