Clementine
Clementine copied to clipboard
libprotobuf.so version not match the latest version or build fails because c++ version < 14
Clementine has been failed to build on archlinux due to recent protobuf and protobuf-c package updated, which caused libprotobuf.so.32 failed to find to clementine.
Manaully put libprotobuf.so.3.21.12.0
to /usr/lib
and rename it to libprotobuf.so.32
will solve this problem which caused clementine failed to run.
Is there any update on this? This has been failed to build for quite a while.
UPDATE 1:
Symbol link of /usr/lib/libprotobuf.so.23
has been removed during upgrade. Now need to add symbol link to libprotobuf.so.23 to .24 to make clementine work.
For those who don't want to build theirselves libprotobuf, I build this package for personal use using PKGBUILD from archlinux origin package. libprotobuf.zip Use at your own risk. I really love this music player and don't want it to die.
The same here. I'm using clementine 1.4rc2 (Arch Linux) and /usr/lib/libprotobuf.so.32 cant't be found after protobuf is updated to the latest version (ver. 23.4). Copying the older version libprotobuf.so.3.21.12.0 and it's symlink libprptobuf.so.32 to /usr/lib fixed this issue. The older version of libprotobuf is left in the pacman cache (/var/cache/pacman/pkg/protobuf-21.12-2-x86_64.pkg.tar.zst) but downgrading protobuf could be a difficult task due to many dependencies of other packages
Might I suggest renaming this issue to "Build fails because c++ version < 14"? I think it would be a better way to describe the problem.
It looks like the issue impacts abseil 20230125.3
and protobuf 23.4
. I am also running on ArchLinux. My guess is that we are encountering these issues since the packages on Arch are newer than on many other distros.
As @Saboe pointed out, the issue can be temporarily fixed to run existing binaries, but the build still fails.
Here are the first relevant errors when make launched:
In file included from /usr/include/absl/base/config.h:86,
from /usr/include/absl/base/attributes.h:37,
from /usr/include/absl/strings/string_view.h:39,
from /usr/include/google/protobuf/stubs/common.h:44,
from /usr/include/google/protobuf/io/coded_stream.h:130,
from /data/Build/clementine-player-build/ext/libclementine-tagreader/tagreadermessages.pb.h:24,
from /data/Build/clementine-player-build/ext/libclementine-tagreader/tagreadermessages.pb.cc:4:
/usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported."
79 | #error "C++ versions less than C++14 are not supported."
| ^~~~~
In file included from /data/Build/clementine-player-build/ext/libclementine-tagreader/tagreadermessages.pb.h:11:
/usr/include/google/protobuf/port_def.inc:205:15: error: static assertion failed: Protobuf only supports C++14 and newer.
205 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
| ^~~~~~~~~~~~~~~~~~~~~~
I was able to get nearly everything building just by changing all the CMakeLists.txts to compile using C++17:
index ce5834448..5d6aa4eff 100644
--- a/3rdparty/libprojectm/CMakeLists.txt
+++ b/3rdparty/libprojectm/CMakeLists.txt
@@ -24,7 +24,7 @@ set(BUILD_PROJECTM_STATIC ON)
set(DISABLE_NATIVE_PRESETS ON)
set(DISABLE_MILKDROP_PRESETS OFF)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
pkg_check_modules(GLEW glew)
diff --git a/3rdparty/qtsingleapplication/CMakeLists.txt b/3rdparty/qtsingleapplication/CMakeLists.txt
index 7825ab9e1..f7029b87e 100644
--- a/3rdparty/qtsingleapplication/CMakeLists.txt
+++ b/3rdparty/qtsingleapplication/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0.0)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17")
set(SINGLEAPP-SOURCES
qtlocalpeer.cpp
diff --git a/ext/libclementine-common/CMakeLists.txt b/ext/libclementine-common/CMakeLists.txt
index ad35a515c..eccdba20b 100644
--- a/ext/libclementine-common/CMakeLists.txt
+++ b/ext/libclementine-common/CMakeLists.txt
@@ -2,7 +2,7 @@ include_directories(${PROTOBUF_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17")
set(SOURCES
core/closure.cpp
diff --git a/ext/libclementine-remote/CMakeLists.txt b/ext/libclementine-remote/CMakeLists.txt
index 70761b493..115d1f40b 100644
--- a/ext/libclementine-remote/CMakeLists.txt
+++ b/ext/libclementine-remote/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(${PROTOBUF_INCLUDE_DIRS})
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17")
set(MESSAGES
remotecontrolmessages.proto
diff --git a/ext/libclementine-tagreader/CMakeLists.txt b/ext/libclementine-tagreader/CMakeLists.txt
index d7ae9f684..8a0a944c5 100644
--- a/ext/libclementine-tagreader/CMakeLists.txt
+++ b/ext/libclementine-tagreader/CMakeLists.txt
@@ -3,7 +3,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-common)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17")
set(MESSAGES
tagreadermessages.proto
diff --git a/gst/moodbar/CMakeLists.txt b/gst/moodbar/CMakeLists.txt
index 636ef9fe3..34a63b106 100644
--- a/gst/moodbar/CMakeLists.txt
+++ b/gst/moodbar/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.0)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall --std=c++0x")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall --std=c++17")
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
But of course, that's still not enough. There's one last linker issue:
/usr/bin/ld: ../libclementine-tagreader/liblibclementine-tagreader.a(tagreadermessages.pb.cc.o): undefined reference to symbol '_ZN4absl12lts_2023012512log_internal21CheckOpMessageBuilder7ForVar2Ev'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../lib/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Demangling gives the name absl::lts_20230125::log_internal::CheckOpMessageBuilder::ForVar2()
. I really don't know what to do from here... It seems to be defined in my /usr/lib/libabsl_log_internal_check_op.so
.
error adding symbols: DSO missing from command line
before cmake ..:
export LDFLAGS="-Wl,--copy-dt-needed-entries"
Just by applying what @TheGag96 suggested, I was able to make a working build on Arch Linux. I didn't encounter any link time issue.
error adding symbols: DSO missing from command line
before cmake ..:
export LDFLAGS="-Wl,--copy-dt-needed-entries"
This did not work for me, unfortunately...
Hi guys I'm a noob, I don't really understand how to use TheGag96's tip. I attempted to copy-paste the latest github build version into /var/tmp/pamac-build-illyasviel/clementine/src/ then realized pamac would extract the archive first before installing, tried to make an archive of the DL'd one but it failed the authentication of files check of course. I tried to compile clementine from source and it failed at the "cmake .." step with:
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) CMakeLists.txt:48 (find_package) -- Configuring incomplete, errors occurred!
I'm on manjaro linux using the latest update. Can you guys explain in simple ways the step I need to follow to make Clementine work again? I tried migrating to strawberry but following the guide at https://wiki.strawberrymusicplayer.org/wiki/Import_collection_library_and_playlists_from_Clementine I couldn't get it to recover my playlists: It got the names and list recovered (in disorder), but all playlist are empty (the error was: "Parse error: 41 values for 42 columns" during the step: "Import playlist items"). (got the moodbar to work! And besides the playlists being empty, I still have recovered almost all other data so that's a good start.)
TL;DR: How can I use Clementine in the lastest Manjaro update? What I tried failed, and the alternative software I tried was not enough to recover all my data automatically.
Hi Guys, I'm on Gentoo and using latest patches on "testing" ~amd64 portage tree. The mentioned patch from above helps for the c++14 error. But with the current abseil-cpp i too got the error about missing symbols.
After little digging the current version of abseil has versioning strings in the symbols in libabsl library.
$ strings /usr/lib64/libabsl_log_internal_check_op.so.2308.0.0 | grep _ZN4absl12lts_2023012512log_internal21CheckOpMessageBuilder7ForVar2Ev
$ strings /usr/lib64/libabsl_log_internal_check_op.so.2308.0.0 | grep _ZN4absl12lts | grep internal21CheckOpMessageBuilder7ForVar2Ev
_ZN4absl12lts_2023080212log_internal21CheckOpMessageBuilder7ForVar2Ev
So it looks like an incompatibility with latest versioned library. Downgrading to libabsl 20230125 may help.
Edit: So after further digging, downgrading abseil-cpp does not work, neither with the LDFLAGS Trick mentioned above. So... sorry. might have to also downgrade protobuf... or have to use >c++14 on abseil?... dont know, im no developer so im clueless now.
$ strings /usr/lib64/libabsl_log_internal_check_op.so.2301.0.0 | grep _ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc
_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc
New Edit:
You have to downgrade both abseil-cpp < 2308 and protobuf < 23 in order to rebuild clementine successful without patches for now, until all problems may have fixed.
I managed to make it compile on gentoo with this patch, on top of the c++17 patch above. But because clementine doesn't use abseil itself, only through protobuf, it looks like there's something wrong with protobuf, or with abseil - something there doesn't declare the dependencies properly
diff --git a/ext/libclementine-tagreader/CMakeLists.txt b/ext/libclementine-tagreader/CMakeLists.txt
index 8a0a944..c6105bf 100644
--- a/ext/libclementine-tagreader/CMakeLists.txt
+++ b/ext/libclementine-tagreader/CMakeLists.txt
@@ -37,7 +37,7 @@ add_library(libclementine-tagreader STATIC
)
target_link_libraries(libclementine-tagreader
- ${PROTOBUF_LIBRARY}
libclementine-common
+ ${PROTOBUF_LIBRARY} absl_log_internal_check_op absl_log_internal_message
)
Complete patch for Arch PKGBUILD—
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
- From f72e24e97d9424e3222a411c1f13518558e22d7f Mon Sep 17 00:00:00 2001
From: Fredrick Brennan <[email protected]>
Date: Mon, 30 Oct 2023 16:14:25 -0400
Subject: [PATCH] =?UTF-8?q?Fix=20build=20w/new=20protobuf,=20cf=20issue=20?=
=?UTF-8?q?=E2=84=967272=20(GitHub)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-Authored-By: TheGag96
Co-Authored-By: DarthGandalf
- ---
.SRCINFO | 8 +++--
001-force-c++17.patch | 74 +++++++++++++++++++++++++++++++++++++++++
002-fix-tagreader.patch | 13 ++++++++
PKGBUILD | 35 +++++++++++++++----
4 files changed, 122 insertions(+), 8 deletions(-)
create mode 100644 001-force-c++17.patch
create mode 100644 002-fix-tagreader.patch
diff --git a/.SRCINFO b/.SRCINFO
index a9c4147..67fcb6c 100644
- --- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = clementine-git
pkgdesc = A modern music player and library organizer
- - pkgver = 1.4.0rc1.r886.g6ff576863.0.g6ff576863
+ pkgver = 1.4.0rc1.r901.g7b678f26e.4.gf3ddd7eee
pkgrel = 1
url = http://www.clementine-player.org/
arch = x86_64
@@ -24,6 +24,10 @@ pkgbase = clementine-git
provides = clementine
conflicts = clementine
source = git+https://github.com/clementine-player/Clementine.git
- - sha256sums = SKIP
+ source = ./001-force-c++17.patch
+ source = ./002-fix-tagreader.patch
+ b2sums = SKIP
+ b2sums = 08fc45df7906892a3eea363f1496afb039c4f43097adcfba801fda02eb2ec209af704443acb584563bcd54d271f722d1c220ef8859d5e467cf18b9d96a160092
+ b2sums = f68a279c2fe940b0b406ffb236ea0186fce438b50acc114412d8f818a65afc8187003f3d043044612af2540dfacab7cc3eab9bee4edc00c2591195b49969c46f
pkgname = clementine-git
diff --git a/001-force-c++17.patch b/001-force-c++17.patch
new file mode 100644
index 0000000..648c625
- --- /dev/null
+++ b/001-force-c++17.patch
@@ -0,0 +1,74 @@
+index ce5834448..5d6aa4eff 100644
+--- a/3rdparty/libprojectm/CMakeLists.txt
++++ b/3rdparty/libprojectm/CMakeLists.txt
+@@ -24,7 +24,7 @@ set(BUILD_PROJECTM_STATIC ON)
+ set(DISABLE_NATIVE_PRESETS ON)
+ set(DISABLE_MILKDROP_PRESETS OFF)
+
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+
+ pkg_check_modules(GLEW glew)
+
+diff --git a/3rdparty/qtsingleapplication/CMakeLists.txt b/3rdparty/qtsingleapplication/CMakeLists.txt
+index 7825ab9e1..f7029b87e 100644
+--- a/3rdparty/qtsingleapplication/CMakeLists.txt
++++ b/3rdparty/qtsingleapplication/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 3.0.0)
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17")
+
+ set(SINGLEAPP-SOURCES
+ qtlocalpeer.cpp
+diff --git a/ext/libclementine-common/CMakeLists.txt b/ext/libclementine-common/CMakeLists.txt
+index ad35a515c..eccdba20b 100644
+--- a/ext/libclementine-common/CMakeLists.txt
++++ b/ext/libclementine-common/CMakeLists.txt
+@@ -2,7 +2,7 @@ include_directories(${PROTOBUF_INCLUDE_DIRS})
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17")
+
+ set(SOURCES
+ core/closure.cpp
+diff --git a/ext/libclementine-remote/CMakeLists.txt b/ext/libclementine-remote/CMakeLists.txt
+index 70761b493..115d1f40b 100644
+--- a/ext/libclementine-remote/CMakeLists.txt
++++ b/ext/libclementine-remote/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ include_directories(${PROTOBUF_INCLUDE_DIRS})
+
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17")
+
+ set(MESSAGES
+ remotecontrolmessages.proto
+diff --git a/ext/libclementine-tagreader/CMakeLists.txt b/ext/libclementine-tagreader/CMakeLists.txt
+index d7ae9f684..8a0a944c5 100644
+--- a/ext/libclementine-tagreader/CMakeLists.txt
++++ b/ext/libclementine-tagreader/CMakeLists.txt
+@@ -3,7 +3,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-common)
+
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++17")
+
+ set(MESSAGES
+ tagreadermessages.proto
+diff --git a/gst/moodbar/CMakeLists.txt b/gst/moodbar/CMakeLists.txt
+index 636ef9fe3..34a63b106 100644
+--- a/gst/moodbar/CMakeLists.txt
++++ b/gst/moodbar/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 3.0.0)
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall --std=c++0x")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall --std=c++17")
+
+ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+
diff --git a/002-fix-tagreader.patch b/002-fix-tagreader.patch
new file mode 100644
index 0000000..b8b62aa
- --- /dev/null
+++ b/002-fix-tagreader.patch
@@ -0,0 +1,13 @@
+diff --git a/ext/libclementine-tagreader/CMakeLists.txt b/ext/libclementine-tagreader/CMakeLists.txt
+index 8a0a944..c6105bf 100644
+--- a/ext/libclementine-tagreader/CMakeLists.txt
++++ b/ext/libclementine-tagreader/CMakeLists.txt
+@@ -37,7 +37,7 @@ add_library(libclementine-tagreader STATIC
+ )
+
+ target_link_libraries(libclementine-tagreader
+- ${PROTOBUF_LIBRARY}
+ libclementine-common
++ ${PROTOBUF_LIBRARY} absl_log_internal_check_op absl_log_internal_message
+ )
+
diff --git a/PKGBUILD b/PKGBUILD
index b251932..f7f27d4 100644
- --- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,11 +5,14 @@
# Contributor: Stéphane Gaudreault <[email protected]>
# Contributor: BlackEagle <[email protected]>
# Contributor: Dany Martineau <[email protected]>
+# Contributor: Fredrick R. Brennan <[email protected]>
+# Contributor: DarthGandalf
+# Contributor: TheGag96
# Based on community/clementine PKGBUILD
pkgname=clementine-git
- -pkgver=1.4.0rc1.r886.g6ff576863.0.g6ff576863
+pkgver=1.4.0rc1.r901.g7b678f26e.4.gf3ddd7eee
pkgrel=1
pkgdesc='A modern music player and library organizer'
url='http://www.clementine-player.org/'
@@ -27,18 +30,38 @@ optdepends=('fftw: moodbar support'
conflicts=(clementine)
provides=(clementine)
_name=Clementine
- -source=("git+https://github.com/clementine-player/$_name.git")
- -sha256sums=('SKIP')
+source=("git+https://github.com/clementine-player/$_name.git"
+ "./001-force-c++17.patch"
+ "./002-fix-tagreader.patch")
+b2sums=('SKIP'
+ '08fc45df7906892a3eea363f1496afb039c4f43097adcfba801fda02eb2ec209af704443acb584563bcd54d271f722d1c220ef8859d5e467cf18b9d96a160092'
+ 'f68a279c2fe940b0b406ffb236ea0186fce438b50acc114412d8f818a65afc8187003f3d043044612af2540dfacab7cc3eab9bee4edc00c2591195b49969c46f')
pkgver() {
cd $_name
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
- -build() {
+prepare() {
+ export LDFLAGS="-Wl,--copy-dt-needed-entries"
+ export CXXFLAGS="${CXXFLAGS} -std=c++17 -Wno-all -fpermissive"
+ export CFLAGS="${CFLAGS} -Wno-all"
+
+ cd $_name
+ patch -Np1 -i ../001-force-c++17.patch
+ patch -Np1 -i ../002-fix-tagreader.patch
+ cd ..
+
cmake -B build -S $_name \
- - -DCMAKE_INSTALL_PREFIX=/usr
- - cmake --build build
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS="${CFLAGS}" \
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
+}
+
+build() {
+ cd build
+ cmake --build .
}
package() {
- --
2.42.0
-----BEGIN PGP SIGNATURE-----
iHUEARYIAB0WIQS1rLeeEfG/f0nzK7hYUwVpYvFOWAUCZUAPqgAKCRBYUwVpYvFO
WEaEAQCblEFdle5ot5K7+VRfrbYyCORx7WNzqMtbxcMdBzdi6gEA9uAyjC6c8q4Y
FPvnQe8lKjDhtGD3P0qJA1mL22B5DQs=
=QY1y
-----END PGP SIGNATURE-----
Any news on this issue?
Hi, I solve the error "libabsl_log_internal_check_op.so.2308.0.0: error adding symbols: DSO missing from command line" to adding -labsl_log_internal_check_op -labsl_log_internal_message on LDFLAGS : LDFLAGS+=-lprotobuf -labsl_log_internal_check_op -labsl_log_internal_message