Menu

#38 static mediainfo binary compiled from source has shared object linked

General
closed
None
3
2017-09-30
2017-09-30
Saurabh
No

I am trying to build static mediainfo binary using below steps :

  1. wget https://mediaarea.net/download/binary/mediainfo/0.7.94/MediaInfo_CLI_0.7.94_GNU_FromSource.tar.bz2
  2. tar xvf MediaInfo_CLI_0.7.94_GNU_FromSource.tar.bz2
  3. cd MediaInfo ; ./CLI_Compile.sh

It got successful build, and able to find mediainfo binary as well.
However, ldd still shows shared objects linked for libz.so.1, libpthread.so.0, libstdc++.so.6, libm.so.6, libgcc_s.so.1, libc.so.6

Do we have any option of minimal package which does not require above shared objects OR source code which have above libraries included and build ?

Thanks

Discussion

  • Jerome Martinez

    Jerome Martinez - 2017-09-30

    All these libs are system libs, and most of them depend of your compiler (e.g. libstdc++.so.6 is the standard C++ library, libgcc_s.so.1 is there because you use GCC...)
    So you need to play with your compiler options ("-static-libstdc++ -static-libgcc"...) for all projects (e.g. you need to provide a static version of libz).
    each sub-project has a ./configure (and also the corresponding configure.ac), you may have to adapt the ./configure options and/or edit a bit th configure.ac file in order to reach you goal (warning: static link of e.g. libstdc++.so.6 is usually not recommanded, you need to have a very good reason for trying that; on our side we never tried that).

     
  • Jerome Martinez

    Jerome Martinez - 2017-09-30

    Ticket moved from /p/mediainfo/bugs/1066/

     
  • Jerome Martinez

    Jerome Martinez - 2017-09-30

    (Note: this is not a bug as this is an uncommon compilation config and it is not supported, so I move it to support)

     
  • Saurabh

    Saurabh - 2017-09-30

    Thx Jerome,
    My purpose was to transfer this static binary to other location and use it over there. However because of these shared objects it fails to execute.
    I will try to follow your recommendations and see if i can fix it.

     
    • Jerome Martinez

      Jerome Martinez - 2017-09-30

      My purpose was to transfer this static binary to other location and use it over there. However because of these shared objects it fails to execute.

      I don't think that it is specific to MediaInfo, just the classic way it is on Linux and all C++ software have this "issue".
      this is the reason I think there is no "fix", just something not classic is tried and should be configured with options to be used the same way on all software.
      Don't hesitate to open the ticket again if there is a problem specific to our delivery.

       
  • Jerome Martinez

    Jerome Martinez - 2017-09-30
    • status: open --> closed
    • assigned_to: Jerome Martinez
    • Group: Usability --> General
     

Log in to post a comment.

MongoDB Logo MongoDB