Shiboken broken.

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Shiboken broken.

Post by davecoventry »

Just reinstalled my Ubuntu installation to KDE neon as I was havng a few issues.

I've installed git and pulled the repositories, but I'm getting an error:

Code: Select all

-- Shiboken2Config: Using default python: .cpython-38-x86_64-linux-gnu
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Targets.cmake:81 (message):
  The imported target "Shiboken2::shiboken2" references the file

     "/workspace/usr/bin/shiboken2"

  but this file does not exist.  Possible reasons include:
Last edited by davecoventry on Wed Nov 30, 2022 3:50 pm, edited 2 times in total.
~ Dave
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Re: Shiboken broken.

Post by davecoventry »

Okay.

I installed libshiboken2-py3-5.14 which removed libshiboken2-dev and a few other dependencies and tried agains.

This time cmake worked and FreeCAD compiled.
~ Dave
rsa4046
Posts: 1
Joined: Tue Jan 25, 2022 7:00 pm

Re: [Solved] Shiboken broken.

Post by rsa4046 »

davecoventry wrote: Tue Oct 19, 2021 1:02 pm Just reinstalled my Ubuntu installation to KDE neon as I was havng a few issues.

I've installed git and pulled the repositories, but I'm getting an error:

Code: Select all

-- Shiboken2Config: Using default python: .cpython-38-x86_64-linux-gnu
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Targets.cmake:81 (message):
  The imported target "Shiboken2::shiboken2" references the file

     "/workspace/usr/bin/shiboken2"

  but this file does not exist.  Possible reasons include:
Hi,
It seems this bug is still present -- am also on KDE Neon 20.04 release (focal). Regressing to libshiboken2-py3-5.14 indeed removes libshiboken2-dev, but also removes shiboken2 (see below), pyside2, and pivy:

Code: Select all

libsoqt520
shiboken2
libpyside2-dev
libpyside2-py3-5.15
libshiboken2-py3-5.15
pyside2-tools
python3-pivy
python3-pyside2.qtcore
python3-pyside2.qtgui
python3-pyside2.qtnetwork
python3-pyside2.qtopengl
python3-pyside2.qtsvg
python3-pyside2.qtwidgets
The original error (/workspace/usr/bin/shiboken2 not found) seems to be a bug in the shiboken2's CMake finder, as it fails even in a generic barebones CMake test. E.g.,:

Code: Select all

$ mkdir test/build -p
$ cd test/build
$ cat > ../CMakeLists.txt
project(ProjectName)
find_package(Shiboken2)
^D
$ cmake  -Wno-dev ../
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Shiboken2Config: Using default python: .cpython-38-x86_64-linux-gnu
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Targets.cmake:81 (message):
  The imported target "Shiboken2::shiboken2" references the file

     "/workspace/usr/bin/shiboken2"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Targets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cpython-38-x86_64-linux-gnu.cmake:40 (include)
  /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Config.cmake:5 (include)
  CMakeLists.txt:2 (find_package)


-- Configuring incomplete, errors occurred!
The message itself originates from the file, Shiboken2Targets-relwithdebinfo.cmake (on my box, /usr/lib/x86_64-linux-gnu/cmake/Shiboken2-5.15.2/Shiboken2Targets-relwithdebinfo.cmake), in which IMPORTED_LOCATION_RELWITHDEBINFO is set to "/workspace/usr/bin/shiboken2" (line 21):

Code: Select all

# Import target "Shiboken2::shiboken2" for configuration "RelWithDebInfo"
set_property(TARGET Shiboken2::shiboken2 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
set_target_properties(Shiboken2::shiboken2 PROPERTIES
  IMPORTED_LOCATION_RELWITHDEBINFO "/workspace/usr/bin/shiboken2"
  )

list(APPEND _IMPORT_CHECK_TARGETS Shiboken2::shiboken2 )
list(APPEND _IMPORT_CHECK_FILES_FOR_Shiboken2::shiboken2 "/workspace/usr/bin/shiboken2" )
It seems odd to me the "workspace" is hardcoded here, but I am no expert. Can anyone shed any light here?
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Re: Shiboken broken.

Post by davecoventry »

This issue has raised its ugly head again.

This time the remedy above does not work, libshiboken2-5.14 is no longer available and libshiboken2-5.15 fails to resolve the error.
~ Dave
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Re: Shiboken broken.

Post by davecoventry »

I solved the issue by creating a directory in root.

Code: Select all

sudo mkdir /workspace
Then symlinking to shiboken2

Code: Select all

cd /workspace
sudo ln -s /usr usr
Obviously, this kludge is not ideal, but it solves the problem.
~ Dave
Post Reply