#1539(avcodec:new): ModPlug compile bug
#1539: ModPlug compile bug ----------------------------------+--------------------------------------- Reporter: chinshou | Type: defect Status: new | Priority: normal Component: avcodec | Version: unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+--------------------------------------- Summary of the bug: when compile the ffmpeg with libmodplug --enable-libmodplug , gcc reported following error operator new [] unresolved error Fix: add stdc++ library to link parameters. Patch attached. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by ubitux): Can you check if pkg-config --libs libmodplug add -lstdc++ for you? And if so, use require_pkg_config instead for the check. It might be better to use it; I don't need stdc++ here for example. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by chinshou): executing pkg-config --libs libmodplug add -L/usr/darwin32/lib -lmodplug for the link parameters but without -lstdc++ it seems -lstdc++ defined in the Libs.private section not in the Libs section of the libmodplug.pc prefix=/usr/darwin32 exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libmodplug Description: The ModPlug mod file playing library. Version: 0.8.8.4 Requires: Libs: -L${libdir} -lmodplug Libs.private: -lstdc++ -lm Cflags: -I${includedir} -I${includedir}/libmodplug -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by ubitux): What is your full ./configure line? pkg-config --static --libs libmodplug should raise the appropriate libs. I don't know if the configure will be able to do that according to your options, but it might be worth giving a try. I'm not familiar with the build system, but requiring this lib when it's not looks wrong to me. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:3> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by chinshou): I attach a new patch which change to use require_pkg_config macro to create the link parameters. But it requires that add --static parameter to the check_pkg_config macro I do not know whether it will cause some side effect by adding --static to check_pkg_config macro although the compile is ok now. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:4> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by ubitux): AFAICT, the external libraries should not be linked statically (the default --enable-static switch enable static linking of libav* libraries), so libmodplug, as well as other external libraries will be linked dynamically. Adding --static to the pkg-config call will add a lot of libraries dependencies where it is not required. Are you trying to make a full static build? Again, what is your full configure line? -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:5> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by chinshou): no, I am creating a shared build but without external dependency , following is the full configure line. LDFLAGS="-arch i386 -L/usr/darwin32/lib" CPPFLAGS="-arch i386 -I/usr/darwin32/include" CFLAGS="-arch i386 -I/usr/darwin32/include" ../configure --enable-memalign-hack --arch=x86 --target-os=darwin --prefix=/usr/darwin32 --enable-gpl --disable-postproc --enable-shared --enable-cross-compile --enable-libx264 --enable-libvpx --disable- decoder=libvpx --enable-libgsm --enable-libmp3lame --disable-encoder=aac --enable-libvo-amrwbenc --enable-libfreetype --enable-version3 --enable- libvo-aacenc --enable-libtheora --enable-libspeex --enable-libvorbis --enable-runtime-cpudetect --enable-libsox --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-openal --enable- librtmp --enable-libbluray --enable-libflite --enable-libcelt --enable- libxvid --enable-libopenjpeg --enable-libmodplug --enable-libschroedinger --enable-libcdio --enable-libilbc -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:6> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by ubitux): Is the libmodplug build dynamically? If libmodplug is only available statically this might be the cause of your issue. I'm not sure how to deal with this (except the workaround of building the shared libmodplug). -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:7> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by chinshou): libmodplug was built as static only. CFLAGS=" -arch i386" CPPFLAGS=" -arch i386" LDFLAGS=" -arch i386" ./configure --prefix=/usr/darwin32 --enable-static --disable-shared Because I want to build the dynamic build but without external dependency except libav libraries selves like the shared build on http://ffmpeg.zeranoe.com/builds/ for windows. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:8> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by ubitux): Well then maybe you could add --extra-libs=-lstdc++. Another solution might be to try to detect when the library is available only statically and enable the pkg-config --static flag for that library only. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:9> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: closed Priority: normal | Component: avcodec Version: unspecified | Resolution: wontfix Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by richardpl): * status: new => closed * resolution: => wontfix Comment: I do not think this is ffmpeg fault. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:10> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#1539: ModPlug compile bug -------------------------------------+----------------------------------- Reporter: chinshou | Owner: Type: defect | Status: closed Priority: normal | Component: avcodec Version: unspecified | Resolution: wontfix Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by rogerdpack): Hmm. Even if I update the modplug.pc file like this: Libs: -L${libdir} -lmodplug -lstdc++ It appears that configure is still just using "-lmodplug" here... (work around for now is to specify --extra-libs=-lstdc++ to FFmpeg's configure line but something seems awry). -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1539#comment:11> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg