Results 1 to 10 of 10

Thread: Kodi-Addon - Linker fails

  1. #1

    Default Kodi-Addon - Linker fails

    Good morning,

    I am trying to build the kodi-binary-addon inputstream.ffmpegdirect in my project:
    https://build.opensuse.org/package/s...m.ffmpegdirect

    But building fails with error:
    Code:
    [   65s] /usr/bin/g++-7 -fPIC -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -O2 -g -DNDEBUG -lavcodec;-lavfilter;-lavformat;-lavutil;-lswscale;-lswresample;-lpostproc  -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -shared -Wl,-soname,inputstream.ffmpegdirect.so.19.0 -o inputstream.ffmpegdirect.so.1.4.1 CMakeFiles/inputstream.ffmpegdirect.dir/src/StreamManager.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/DemuxStream.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/FFmpegCatchupStream.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/FFmpegLog.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/FFmpegStream.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/commons/Exception.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/Atomics.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/Event.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/Thread.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/Timer.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/TimeUtils.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/SystemClock.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/url/URL.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/url/UrlOptions.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/url/Variant.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/platform/posix/XTimeUtils.cpp.o  -L/usr//usr/lib64 -lp8-platform -lpthread /usr/lib64/libz.so /usr/lib64/libbz2.so 
    [   65s] /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lavcodec;-lavfilter;-lavformat;-lavutil;-lswscale;-lswresample;-lpostproc
    [   65s] collect2: error: ld returned 1 exit status
    What am I missing here? Does anyone have a clue?

    Thx in advance!

  2. #2
    Join Date
    Jan 2017
    Location
    Nürnberg, Germany
    Posts
    221

    Default Re: Kodi-Addon - Linker fails

    When I look at the g++ and gcc man pages, I don’t see how the GNU compilers would accept arguments like »--as-needed« or what appears to be libraries seperated by semicolons (»-lavcodec;-lavfilter;-lavformat;-lavutil;-lswscale;-lswresample;-lpostproc« just looks out of place to me).

    My usual gcc/g++ invocations are admittedly far simpler than your build, for example:
    • gcc -Wall -ansi -ljpeg -I/usr/include/SDL2 -D_REENTRANT -L/usr/lib64 -lSDL2 viewer.c
    • g++ -lSDL2 *.cc
    • gcc -Wall -Wextra -Wshadow -ansi -pedantic -ggdb -o worker worker.c

    … so I may be missing the finer points of what may be possible with gcc command-line params, but I suspect there might be some prior magic in your build process (a ./configure or pkgconfig run) that went arwry. Do you have any log files lying around of prior successful builds for reference?

    [Edited to add: I just learned that »-Wl,--as-needed« is a linker flag, nevermind…]

  3. #3
    Join Date
    Sep 2012
    Posts
    5,321

    Default Re: Kodi-Addon - Linker fails

    Quote Originally Posted by Herbster0815 View Post
    I am trying to build the kodi-binary-addon inputstream.ffmpegdirect in my project:
    https://build.opensuse.org/package/s...m.ffmpegdirect
    Did you try to actually follow Linux build instructions listed on project home page?

  4. #4

    Default AW: Kodi-Addon - Linker fails

    I am building the same was as the other binary addons in the project. It was building fine until 7 days ago, but I cannot find a commit in the GIT that is causing this error. But as I am no developer I think I am overseeing something. That is why I opened this thread.

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,849
    Blog Entries
    2

    Default Re: Kodi-Addon - Linker fails

    Quote Originally Posted by Herbster0815 View Post
    Good morning,

    I am trying to build the kodi-binary-addon inputstream.ffmpegdirect in my project:
    https://build.opensuse.org/package/s...m.ffmpegdirect

    But building fails with error:
    Code:
    [   65s] /usr/bin/g++-7 -fPIC -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -O2 -g -DNDEBUG -lavcodec;-lavfilter;-lavformat;-lavutil;-lswscale;-lswresample;-lpostproc  -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -shared -Wl,-soname,inputstream.ffmpegdirect.so.19.0 -o inputstream.ffmpegdirect.so.1.4.1 CMakeFiles/inputstream.ffmpegdirect.dir/src/StreamManager.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/DemuxStream.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/FFmpegCatchupStream.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/FFmpegLog.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/FFmpegStream.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/commons/Exception.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/Atomics.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/Event.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/Thread.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/Timer.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/TimeUtils.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/threads/SystemClock.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/url/URL.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/url/UrlOptions.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/url/Variant.cpp.o CMakeFiles/inputstream.ffmpegdirect.dir/src/stream/platform/posix/XTimeUtils.cpp.o  -L/usr//usr/lib64 -lp8-platform -lpthread /usr/lib64/libz.so /usr/lib64/libbz2.so 
    [   65s] /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lavcodec;-lavfilter;-lavformat;-lavutil;-lswscale;-lswresample;-lpostproc
    [   65s] collect2: error: ld returned 1 exit status
    What am I missing here? Does anyone have a clue?

    Thx in advance!
    IMO your problem is the part O highlighted in red ...
    I assume it's not one of those others that are listed immediately after what I highlighted.
    You have to determine if your codec is there or if not why (assuming you don't have a permissions problem).

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,824
    Blog Entries
    15

    Default Re: Kodi-Addon - Linker fails

    Quote Originally Posted by tsu2 View Post
    IMO your problem is the part O highlighted in red ...
    I assume it's not one of those others that are listed immediately after what I highlighted.
    You have to determine if your codec is there or if not why (assuming you don't have a permissions problem).

    TSU
    Hi
    This is on OBS, building and any permissions issues are not a problem (abuild/abuild), it maybe on install if no buildroot is specified, but not build....

    As pointed out, the user has not read the upstream build instructions/requirements which may be part of the issue.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Sep 2012
    Posts
    5,321

    Default Re: AW: Kodi-Addon - Linker fails

    Quote Originally Posted by Herbster0815 View Post
    I cannot find a commit in the GIT that is causing this error.
    Educated guess - this one: https://github.com/xbmc/inputstream....974192a53c7291

  8. #8

    Default AW: Kodi-Addon - Linker fails

    I went back to the previous version 1.2.1 which is building fine until I found the reason.

  9. #9
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,849
    Blog Entries
    2

    Default Re: Kodi-Addon - Linker fails

    Quote Originally Posted by malcolmlewis View Post
    Hi
    This is on OBS, building and any permissions issues are not a problem (abuild/abuild), it maybe on install if no buildroot is specified, but not build....

    As pointed out, the user has not read the upstream build instructions/requirements which may be part of the issue.
    I understand,
    But was just trying to cover all bases for the type of error whenever it occurs.
    Permissions would never be an issue in any dedicated build environment, it only happens for instance building on a private machine that might need to set permissions for different uses.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  10. #10

    Default AW: Kodi-Addon - Linker fails

    I compared CMakeList.txt and FindFFmeg.cmake of the old working version with the current one and created two patches. Now it is building fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •