Compilation error on Ubuntu 8.10

*nix specific usage questions
sgraves66
Blank Cone
Blank Cone
Posts: 11
Joined: 13 Nov 2007 01:17

Compilation error on Ubuntu 8.10

Postby sgraves66 » 12 Jan 2009 03:41

I'm receiving the following error in Ubuntu when performing a cross-compile for Win32 using 0.9.8a sources:
libtool: link: i586-mingw32msvc-gcc -std=gnu99 -shared .libs/libmod_plugin_la-mod.o -L/usr/win32/lib /usr/win32/lib/libmodplug.a /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libstdc++.a -L/build/buildd/mingw32-4.2.1.dfsg/build_dir/objs/i586-mingw32msvc/libstdc++-v3/src -L/build/buildd/mingw32-4.2.1.dfsg/build_dir/objs/i586-mingw32msvc/libstdc++-v3/src/.libs -L/build/buildd/mingw32-4.2.1.dfsg/build_dir/objs/i586-mingw32msvc/winsup/mingw -L/build/buildd/mingw32-4.2.1.dfsg/build_dir/objs/i586-mingw32msvc/winsup/w32api/lib -L/build/buildd/mingw32-4.2.1.dfsg/build_dir/objs/./gcc -L/usr/i586-mingw32msvc/bin -L/usr/i586-mingw32msvc/lib -L/usr/lib/gcc/../../i586-mingw32msvc/lib -lm -luser32 -ladvapi32 -lshell32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt ../../src/.libs/libvlccore.dll.a -lkernel32 -lws2_32 -lnetapi32 -lwinmm /usr/win32/lib/libiconv.a -lmingw32 -mtune=pentium2 -mms-bitfields -o .libs/libmod_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libmod_plugin.dll.a
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
make[5]: *** [libmod_plugin.la] Error 1
make[5]: Leaving directory `/home/sgraves/Desktop/vlc-0.9.8a/modules/demux'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/sgraves/Desktop/vlc-0.9.8a/modules/demux'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/sgraves/Desktop/vlc-0.9.8a/modules/demux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/sgraves/Desktop/vlc-0.9.8a/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sgraves/Desktop/vlc-0.9.8a'
make: *** [all] Error 2

Any assistance would be appreciated.

sgraves66
Blank Cone
Blank Cone
Posts: 11
Joined: 13 Nov 2007 01:17

Re: Compilation error on Ubuntu 8.10

Postby sgraves66 » 12 Jan 2009 20:12

I've temporarily disabled mod support (--disable-mod) and was able to compile. I'm trying to track down the dependency on gcc_s.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Compilation error on Ubuntu 8.10

Postby Jean-Baptiste Kempf » 12 Jan 2009 20:41

I am interested on the answer too.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

sgraves66
Blank Cone
Blank Cone
Posts: 11
Joined: 13 Nov 2007 01:17

Re: Compilation error on Ubuntu 8.10

Postby sgraves66 » 12 Jan 2009 21:54

Getting a little further. The -lgcc_s is coming from $(AM_LDFLAGS). I removed this entry from the generated Makefile in 'modules/demux' for libmod and was able to compile.

From modules/demux/Makefile:
libmod_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmod_plugin_la_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS)$(LDFLAGS) -o $@

sgraves66
Blank Cone
Blank Cone
Posts: 11
Joined: 13 Nov 2007 01:17

Re: Compilation error on Ubuntu 8.10

Postby sgraves66 » 13 Jan 2009 04:41

It appears to be an issue with the shared libstdc++ included in mingw:
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libstdc++.la

libmod_plugin requires these libraries:

Code: Select all

top_builddir="../.." ../../vlc-config -libs plugin libmod_plugin.la -lmodplug -lstdc++
The command to compile libmod_plugin.la is:

Code: Select all

/bin/bash ../../libtool --tag=CC --mode=link i586-mingw32msvc-gcc -std=gnu99 `top_builddir="../.." ../../vlc-config --cflags plugin libmod_plugin.la` -mms-bitfields -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -rpath '/usr/local/lib/vlc/demux' -avoid-version -module -no-undefined -export-symbol-regex ^vlc_entry -shrext .dll `top_builddir="../.." ../../vlc-config --ldflags plugin libmod_plugin.la` -L/usr/win32//lib -o libmod_plugin.la libmod_plugin_la-mod.lo `top_builddir="../.." ../../vlc-config -libs plugin libmod_plugin.la` ../../src/libvlccore.la -lmingw32
I replaced `top_builddir="../.." ../../vlc-config -libs plugin libmod_plugin.la` with '-lmodplug /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libstdc++.a' for grins. Even though it complains, the -lgcc_s error disappears:

Code: Select all

/bin/bash ../../libtool --tag=CC --mode=link i586-mingw32msvc-gcc -std=gnu99 -mms-bitfields -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -rpath '/usr/local/lib/vlc/demux' -avoid-version -module -no-undefined -shrext .dll -o libmod_plugin.la libmod_plugin_la-mod.lo -g ../../src/libvlccore.la -lmingw32 -lmodplug /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libstdc++.a

Code: Select all

*** Warning: Linking the shared library libmod_plugin.la against the *** static library /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libstdc++.a is not portable! libtool: link: rm -fr .libs/libmod_plugin.dll .libs/libmod_plugin.dll.a .libs/libmod_plugin.la .libs/libmod_plugin.lai libtool: link: i586-mingw32msvc-gcc -std=gnu99 -shared .libs/libmod_plugin_la-mod.o ../../src/.libs/libvlccore.dll.a -L/usr/win32//lib -L/usr/win32/lib -lkernel32 -lws2_32 -lnetapi32 -lwinmm /usr/win32/lib/libiconv.a -lmingw32 /usr/win32/lib/libmodplug.a /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libstdc++.a -mms-bitfields -o .libs/libmod_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libmod_plugin.dll.a Creating library file: .libs/libmod_plugin.dll.a libtool: link: ( cd ".libs" && rm -f "libmod_plugin.la" && ln -s "../libmod_plugin.la" "libmod_plugin.la" )


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 27 guests