Closed kevinsmia1939 closed 3 years ago
I fix it now.
Simply apply the patch.
diff -ruN a/cmake/internal/SearchForStuff.cmake b/cmake/internal/SearchForStuff.cmake
--- a/cmake/internal/SearchForStuff.cmake 2021-08-06 00:15:49.144169413 +0700
+++ b/cmake/internal/SearchForStuff.cmake 2021-08-06 00:18:25.104200656 +0700
@@ -171,7 +171,7 @@
LIST_TO_STRING (GTK_CFLAGS "${GTK_PKG_CFLAGS_OTHER}")
ENDIF (GTK_PKG_FOUND)
- pkg_check_modules (GDKPIXBUF_PKG gdk-pixbuf-2.0)
+ pkg_check_modules (GDKPIXBUF_PKG gdk-pixbuf)
IF (GDKPIXBUF_PKG_FOUND)
SET (WITH_GDKPIXBUF TRUE)
LIST_TO_STRING (GDKPIXBUF_LINKFLAGS "${GDKPIXBUF_PKG_LDFLAGS_OTHER}")
It doesn't look like there's a gdk-pixbuf.pc
on opensuse, so the included patch is probably quietly failing and the things that require gdk-pixbuf-2.0 aren't being built.
It looks like the problem is that playerwritemap isn't actually trying to link against gdkpixbuf, it's linking against gtk instead. Can you see if this patch fixes your error?
diff --git a/utils/playerwritemap/CMakeLists.txt b/utils/playerwritemap/CMakeLists.txt
index 639676c1..0f04c3b1 100644
--- a/utils/playerwritemap/CMakeLists.txt
+++ b/utils/playerwritemap/CMakeLists.txt
@@ -3,15 +3,13 @@ IF (BUILD_UTILS_PLAYERWRITEMAP)
IF (WITH_GDKPIXBUF)
SET (playerwritemapSrcs playerwritemap.c)
- INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs ${GTK_PKG_INCLUDE_DIRS})
- LINK_DIRECTORIES (${GTK_PKG_LIBRARY_DIRS})
+ INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/client_libs
+ ${GDKPIXBUF_PKG_INCLUDE_DIRS})
+ LINK_DIRECTORIES (${GDKPIXBUF_PKG_LIBRARY_DIRS})
PLAYER_ADD_EXECUTABLE (playerwritemap ${playerwritemapSrcs})
TARGET_LINK_LIBRARIES (playerwritemap playerc playerinterface playercommon
- ${PLAYERC_EXTRA_LINK_LIBRARIES} ${GTK_PKG_LIBRARIES})
- SET_SOURCE_FILES_PROPERTIES (${playerwritemapSrcs} PROPERTIES
- COMPILE_FLAGS "${GTK_CFLAGS}")
- SET_TARGET_PROPERTIES (playerwritemap PROPERTIES
- LINK_FLAGS "${GTK_LINKFLAGS}")
+ ${PLAYERC_EXTRA_LINK_LIBRARIES}
+ ${GDKPIXBUF_PKG_LIBRARIES})
ELSE (WITH_GDKPIXBUF)
MESSAGE (STATUS "playerwritemap will not be built - GDK pixbuf not found")
ENDIF (WITH_GDKPIXBUF)
Your patch work, thanks.
I am trying to package Gazebo as Flatpak, and I decide to include Player as dependency.
I use openSUSE Tumbleweed. Flatpak builder 1.0.14 Flatpak 1.11.2
But I failed to install Player. I build and install gdk-pixbuf 2.42.6
During Player compilation, it show that it found gdk-pixbuf.
But later failed.
I have to run this command for it to work.
ln -s /app/include/gdk-pixbuf-2.0/gdk-pixbuf /app/include/gdk-pixbuf
However, doing this cause another issue,
But I have glib.h in /usr/include/glib-2.0 Not sure what to do about it.