Avidemux Forum

Avidemux => Unix-Like (Linux/Bsd/...) => Topic started by: Blues on September 01, 2017, 02:03:46 AM

Title: GOLD linker fix, please?
Post by: Blues on September 01, 2017, 02:03:46 AM
My system linker is GOLD and every time I build Avidemux I forget it and the build fails. Any hope it could be fixed?

Here's the log just in case https://paste.pound-python.org/show/VS4C7uuQjQ4zVz9U3h28/
Title: Re: GOLD linker fix, please?
Post by: mean on September 01, 2017, 03:47:26 AM
you dont have XSharedMemory support
Not x11 ?
Title: Re: GOLD linker fix, please?
Post by: Blues on September 01, 2017, 04:47:00 PM
Hmm. Everything else works, and Avidemux builds with BFD linker no problem. I have this issue only with GOLD.
Title: Re: GOLD linker fix, please?
Post by: Blues on October 24, 2018, 04:33:58 PM
I guess this bug will never be fixed, right?
Title: Re: GOLD linker fix, please?
Post by: eumagga0x2a on October 24, 2018, 08:28:55 PM
Is the linker still missing XShmAttach? The function is defined in /usr/include/X11/extensions/XShm.h (belongs to libXext-devel) on Fedora, which is included in /usr/include/X11/extensions/Xvlib.h (belongs to libXv-devel) which is used when XVideo support is enabled. Is this the case on your system?
Title: Re: GOLD linker fix, please?
Post by: Blues on August 09, 2019, 01:42:46 AM
commonQt4/ADM_render/libADM_render6_QT5.so: error: undefined reference to 'XShmAttach'
Yup, still the same. Sorry for late reply, somehow I didn't expect anybody is interested in this issue. Builds fine with BFD linker.
Title: Re: GOLD linker fix, please?
Post by: eumagga0x2a on August 09, 2019, 05:46:08 AM
Quote from: Blues on August 09, 2019, 01:42:46 AM
commonQt4/ADM_render/libADM_render6_QT5.so: error: undefined reference to 'XShmAttach'
Yup, still the same.

This was not the question. The question was

QuoteThe function is defined in /usr/include/X11/extensions/XShm.h (belongs to libXext-devel) on Fedora, which is included in /usr/include/X11/extensions/Xvlib.h (belongs to libXv-devel) which is used when XVideo support is enabled. Is this the case on your system?

Would you please look into the header and report your findings? Otherwise no progress can ever be made on this topic.
Title: Re: GOLD linker fix, please?
Post by: Blues on August 09, 2019, 02:09:29 PM
Sorry, didn't pay attention. The only reference to XShmAttach in my /usr/include/X11/extensions/XShm.h is this:
Bool XShmAttach(
    Display*            /* dpy */,
    XShmSegmentInfo*    /* shminfo */
);
Title: Re: GOLD linker fix, please?
Post by: eumagga0x2a on August 09, 2019, 03:08:24 PM
Good, thanks, could you please check also whether XShm.h, which contains the function declaration, included in /usr/include/X11/extensions/Xvlib.h?
Title: Re: GOLD linker fix, please?
Post by: Blues on August 09, 2019, 06:03:49 PM
From my /usr/include/X11/extensions/Xvlib.h
#include <X11/extensions/XShm.h>
Title: Re: GOLD linker fix, please?
Post by: eumagga0x2a on August 14, 2019, 02:01:17 PM
Please try the patch attached.

diff --git a/avidemux/common/ADM_render/CMakeLists.txt b/avidemux/common/ADM_render/CMakeLists.txt
index 1bbd004dc..49495f261 100644
--- a/avidemux/common/ADM_render/CMakeLists.txt
+++ b/avidemux/common/ADM_render/CMakeLists.txt
@@ -74,7 +74,7 @@ IF (USE_DXVA2)
ENDIF (USE_DXVA2)

IF (USE_XV)
- TARGET_LINK_LIBRARIES(${ADM_LIB} ${XVIDEO_LIBRARY_DIR})
+ TARGET_LINK_LIBRARIES(${ADM_LIB} ${XVIDEO_LIBRARY_DIR} ${XEXT_LIBRARY_DIR})
ENDIF (USE_XV)
TARGET_LINK_LIBRARIES(${ADM_LIB}  ADM_coreUtils6)

diff --git a/cmake/admCheckMiscLibs.cmake b/cmake/admCheckMiscLibs.cmake
index 689b16568..4dcdc649c 100644
--- a/cmake/admCheckMiscLibs.cmake
+++ b/cmake/admCheckMiscLibs.cmake
@@ -47,11 +47,13 @@ IF (UNIX AND NOT APPLE)
MESSAGE(STATUS "*******************")

FIND_HEADER_AND_LIB(XVIDEO X11/extensions/Xvlib.h Xv XvShmPutImage)
+ FIND_HEADER_AND_LIB(XEXT X11/extensions/XShm.h Xext XShmAttach)
PRINT_LIBRARY_INFO("XVideo" XVIDEO_FOUND "${XVIDEO_INCLUDE_DIR}" "${XVIDEO_LIBRARY_DIR}")
+ PRINT_LIBRARY_INFO("Xext" XEXT_FOUND "${XEXT_INCLUDE_DIR}" "${XEXT_LIBRARY_DIR}")

- IF (XVIDEO_FOUND)
+ IF (XVIDEO_FOUND AND XEXT_FOUND)
SET(USE_XV 1)
- ENDIF (XVIDEO_FOUND)
+ ENDIF (XVIDEO_FOUND AND XEXT_FOUND)

MESSAGE("")
ENDIF (XVIDEO)


This one probably won't make it into 2.7.4, not enough time for testing.

Title: Re: GOLD linker fix, please?
Post by: eumagga0x2a on August 15, 2019, 07:28:07 AM
The fix has made it into release, so just build from source as usual.
Title: Re: GOLD linker fix, please?
Post by: Blues on November 16, 2019, 12:18:43 AM
Yes, thanks. Sorry for late reply.  :)