Author Topic: GOLD linker fix, please?  (Read 2590 times)

Blues

  • Jr. Member
  • **
  • Posts: 87
GOLD linker fix, please?
« 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/

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: GOLD linker fix, please?
« Reply #1 on: September 01, 2017, 03:47:26 AM »
you dont have XSharedMemory support
Not x11 ?

Blues

  • Jr. Member
  • **
  • Posts: 87
Re: GOLD linker fix, please?
« Reply #2 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.

Blues

  • Jr. Member
  • **
  • Posts: 87
Re: GOLD linker fix, please?
« Reply #3 on: October 24, 2018, 04:33:58 PM »
I guess this bug will never be fixed, right?

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3461
Re: GOLD linker fix, please?
« Reply #4 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?

Blues

  • Jr. Member
  • **
  • Posts: 87
Re: GOLD linker fix, please?
« Reply #5 on: August 09, 2019, 01:42:46 AM »
Code: [Select]
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.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3461
Re: GOLD linker fix, please?
« Reply #6 on: August 09, 2019, 05:46:08 AM »
Code: [Select]
commonQt4/ADM_render/libADM_render6_QT5.so: error: undefined reference to 'XShmAttach'Yup, still the same.

This was not the question. The question was

Quote
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?

Would you please look into the header and report your findings? Otherwise no progress can ever be made on this topic.

Blues

  • Jr. Member
  • **
  • Posts: 87
Re: GOLD linker fix, please?
« Reply #7 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:
Code: [Select]
Bool XShmAttach(
    Display*            /* dpy */,
    XShmSegmentInfo*    /* shminfo */
);

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3461
Re: GOLD linker fix, please?
« Reply #8 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?

Blues

  • Jr. Member
  • **
  • Posts: 87
Re: GOLD linker fix, please?
« Reply #9 on: August 09, 2019, 06:03:49 PM »
From my /usr/include/X11/extensions/Xvlib.h
Code: [Select]
#include <X11/extensions/XShm.h>

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3461
Re: GOLD linker fix, please?
« Reply #10 on: August 14, 2019, 02:01:17 PM »
Please try the patch attached.

Code: [Select]
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.


eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3461
Re: GOLD linker fix, please?
« Reply #11 on: August 15, 2019, 07:28:07 AM »
The fix has made it into release, so just build from source as usual.

Blues

  • Jr. Member
  • **
  • Posts: 87
Re: GOLD linker fix, please?
« Reply #12 on: November 16, 2019, 12:18:43 AM »
Yes, thanks. Sorry for late reply.  :)