Fedora CsMultiMedia bug

Report any problems with CopperSpice
Post Reply
seasoned_geek
Posts: 263
Joined: Thu Jun 11 2020 12:18 pm

Fedora CsMultiMedia bug

Post by seasoned_geek »

All,

Perhaps it is all RPM based distros with this bug? Until I had to add multimedia to play a wav file for RedDiamond I didn't notice.

CopperSpiceLibraryTargets.cmake

On Debian platforms you get this:

Code: Select all

set_target_properties(CopperSpice::CsMultimedia PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/copperspice/QtMultimedia;
/usr/include/gstreamer-1.0;
/usr/include/x86_64-linux-gnu;
/usr/include/glib-2.0;
/usr/lib/x86_64-linux-gnu/glib-2.0/include"
INTERFACE_LINK_LIBRARIES "CopperSpice::CsCore;CopperSpice::CsGui;CopperSpice::CsNetwork;CopperSpice::CsOpenGL"
)
I added some returns to make things more readable.

On RPM based distros (Fedora 36 and Fedora 40) you get this

Code: Select all

set_target_properties(CopperSpice::CsMultimedia PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/copperspice/QtMultimedia;
/usr/include/gstreamer-1.0;
/usr/include/glib-2.0;
/usr/lib64/glib-2.0/include/copperspice;
/usr/include/sysprof-4"
  INTERFACE_LINK_LIBRARIES "CopperSpice::CsCore;CopperSpice::CsGui;CopperSpice::CsNetwork;CopperSpice::CsOpenGL"
)
You will note the addition of copperspice to the end of the glib-2.0/include line. This is just wrong.

Code: Select all

-- Configuring done (2.7s)
CMake Error in src/CMakeLists.txt:
  Imported target "CopperSpice::CsMultimedia" includes non-existent path

    "/usr/lib64/glib-2.0/include/copperspice"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

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

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.
At first I thought my Fedora 36 VM had gotten corrupted, so I created a Fedora 40 VM and ran the same install scripts only to find the same error.

I'm going to do a hack-a-round in the RPM build script using sed, but there is obviously something really wrong.

Never had to use multimedia before so I cannot say if the problem started with 1.8.2 and my Jan 3, 2024 merge or is an old bug.

There are __always__ problems with Fedora. I put it off until last because, in my experience, it is the least tested distro out there. Here's hoping you get OpenSuSE officially supported.
barbara
Posts: 464
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: Fedora CsMultiMedia bug

Post by barbara »

I opened the "CopperSpiceLibraryTargets.cmake" file located in our Fedora 36 binary release (CS 1.9.1), dated Feb 19 2024. The binary distribution is located on our CS download page and also on our CS github page.

We also tested CSMultimedia in KitchenSink using the Music Player and did not experience any issues playing an mp3 file. The two lines highlighted in blue are different from what you reported. Can you tell us what CMake arguments you are passing when you build CS?
set_target_properties(CopperSpice::CsMultimedia PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/QtMultimedia;
/usr/include/gstreamer-1.0;
/usr/include/glib-2.0;
/usr/lib64/glib-2.0/include;
/usr/include/sysprof-4"
INTERFACE_LINK_LIBRARIES "CopperSpice::CsCore;CopperSpice::CsGui;CopperSpice::CsNetwork;CopperSpice::CsOpenGL"
)
Barbara
seasoned_geek
Posts: 263
Joined: Thu Jun 11 2020 12:18 pm

Re: Fedora CsMultiMedia bug

Post by seasoned_geek »

Code: Select all

# Script to build a rpm package for CopperSpice
#
set -e

#  Step 1 : Protect user from themselves
#
if [ ! -d "/etc/rpmdevtools" ]; then
    if [ ! "$(grep -i 'REDHAT' /etc/*release)" ]; then
        echo "This script can only be run on REDHAT based distribution with rpmdevtools installed"
        exit 1
    fi
fi

echo "MUST BE RUN FROM ROOT OF PROJECT DIRECTORY TREE"
echo ""
echo "YOU MUST HAVE RUN rpmdev-setuptree one time from the command line prior to running this."
echo "that creates a permanent $HOME/rpmbuild directory tree. You only ever need to run"
echo "that command once."
echo ""
echo "This script ASSUMES it can create and use copperspice_rpm_build"
echo "directory one level up from where this script is being run. If directory"
echo "exist it will be deleted and recreated. The only reason the build directory is"
echo "created is so cmake can populate variable values in the copperspice.spec file."
echo ""
echo "Script also ASSUMES you are running from the root of the Git project directory"
echo "where all source is in a directory named src at the same level as this file."
echo ""
echo "You must have ninja and a valid build environment. "
echo ""
echo "After creating fresh directory this script will run the cmake"
echo "command to populate the copperspice_rpm_build directory. After that it will use the "
echo "rpmbuild command to actually create the RPM package."
echo ""

#  Step 2 : Establish fresh clean directories
#
echo "*** Establishing fresh directories"
SCRIPT_DIR="$PWD"
BUILD_DIR="$SCRIPT_DIR/../copperspice_rpm_build"
INSTALL_DIR="/usr"

echo "SCRIPT_DIR                $SCRIPT_DIR"
echo "BUILD_DIR                 $BUILD_DIR"
echo "INSTALL_DIR               $INSTALL_DIR"

#  nuke the directories we will use if they already exist
#
if [ -d "$BUILD_DIR" ]; then
  rm -rf "$BUILD_DIR"
fi

mkdir -p "$BUILD_DIR"

#  save working directory just in case
#
pushd `pwd`

#  Step 3 : Prepare build directory
#           We do this just to get copperspice.spec with all of the CMake variables filled in.
#
echo "*** Prepping build directory"
cd "$BUILD_DIR"
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release \
      -DBUILDING_RPM=ON \
      -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
      -DCMAKE_SKIP_BUILD_RPATH=TRUE \
      "$SCRIPT_DIR"

#  Step 4 : build copperpice and generate the RPM
#
rpmbuild -ba copperspice.spec

echo ""
echo "If this completed without errors you will find the RPM in {$HOME}/rpmbuild/RPMS"
echo ""

popd


set -e

exit 0
Post Reply