Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1979611

Summary: linking errors
Product: [Fedora] Fedora Reporter: Philippe Makowski <makowski.fedora>
Component: vtkAssignee: Orion Poplawski <orion>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: axel.thimm, mrceresa, orion, scitech-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Philippe Makowski 2021-07-06 14:15:21 UTC
Description of problem:
We are building an executable and a library with part of vtk.
The library is wrongly linked to libvtkWrappingPythonCore
and is not linked to libpython3.9.so.1.0, so we get a :
"/lib64/libvtkWrappingPythonCore.so.1: undefined symbol: PyExc_ValueError" when we try to load our library.

The executable and the library are using the same code base, but the executable have also a main.cpp.
 
Version-Release number of selected component (if applicable):
vtk-9.0.1-8.fc34.src.rpm

Actual results:
for the executable:
ldd exe_name | grep ython

libvtkPythonContext2D.so.1 => /lib64/libvtkPythonContext2D.so.1
libvtkPythonInterpreter.so.1 => /lib64/libvtkPythonInterpreter.so.1
libvtkFiltersPython.so.1 => /lib64/libvtkFiltersPython.so.1
libvtkCommonPython.so.1 => /lib64/libvtkCommonPython.so.1
libvtkWrappingPythonCore.so.1 => /lib64/libvtkWrappingPythonCore.so.1
libpython3.9.so.1.0 => /lib64/libpython3.9.so.1.0  

for the library:
ldd lib_name.so | grep ython

libvtkPythonContext2D.so.1 => /lib64/libvtkPythonContext2D.so.1
libvtkPythonInterpreter.so.1 => /lib64/libvtkPythonInterpreter.so.1
libvtkFiltersPython.so.1 => /lib64/libvtkFiltersPython.so.1
libvtkCommonPython.so.1 => /lib64/libvtkCommonPython.so.1
libvtkWrappingPythonCore.so.1 => /lib64/libvtkWrappingPythonCore.so.1

Expected results:
ldd lib_name.so | grep ython
(nothing)

or (eventually)
ldd lib_name.so | grep ython

libvtkPythonContext2D.so.1 => /lib64/libvtkPythonContext2D.so.1
libvtkPythonInterpreter.so.1 => /lib64/libvtkPythonInterpreter.so.1
libvtkFiltersPython.so.1 => /lib64/libvtkFiltersPython.so.1
libvtkCommonPython.so.1 => /lib64/libvtkCommonPython.so.1
libvtkWrappingPythonCore.so.1 => /lib64/libvtkWrappingPythonCore.so.1
libpython3.9.so.1.0 => /lib64/libpython3.9.so.1.0  


Additional info:
doing the same build under Ubuntu 21.04 (and also with gcc-11)
we get :

ldd exe_name | grep ython
libvtkPythonContext2D-9.0.so.1 => /lib/x86_64-linux-gnu/libvtkPythonContext2D-9.0.so.1
libvtkPythonInterpreter-9.0.so.1 => /lib/x86_64-linux-gnu/libvtkPythonInterpreter-9.0.so.1
	libvtkFiltersPython-9.0.so.1 => /lib/x86_64-linux-gnu/libvtkFiltersPython-9.0.so.1
	libvtkCommonPython-9.0.so.1 => /lib/x86_64-linux-gnu/libvtkCommonPython-9.0.so.1
	libvtkWrappingPythonCore-9.0.so.1 => /lib/x86_64-linux-gnu/libvtkWrappingPythonCore-9.0.so.1
	libpython3.9.so.1.0 => /lib/x86_64-linux-gnu/libpython3.9.so.1.0

ldd lib_name.so | grep ython
(nothing)

note the main.cpp have:

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <cmath>
#include <chrono>

#include "fragment/Fragment.hpp"
#include "tools/Infos.hpp"
#include "input/Input.hpp"
#include "tools/VtkReader.hpp"
#include "API/API.hpp"
#include "gasmodel/GasModel.hpp"
#include "tools/GeometryHelpers.hpp"
#include "fragment/solid/Solid.hpp"
#include "vtkUnstructuredGrid.h"
#include "vtkSmartPointer.h"

Thanks