Page 1 of 1

VLC-0.9.0_test3 X-Compile problems [SOLVED]

Posted: 30 Jul 2008 14:39
by basos
Hello,
im having problems compilling vlc 0.9 test3 for windows. I couldn't make a windows binary neither from cygwin nor from native x-compile (im trying 2 weeks to produce some binaries..).
I suspect missing/wrong contib libraries or missing/wrong mingw libraries

Right now i will try native CROSS compile (as people on wikis suggest it is greater) (and faster!)

- system ubuntu
- Contribs http://people.videolan.org/~jb/Contribs ... ly.tar.bz2
Also from http://sourceforge.net/project/showfile ... _id=204414 i installed (as someone on irc suggested that i should downgrade my mingw. So i chose the same version as the contribs for the compiler)
- mingw-binutils_2.17.50-6_i386
- mingw-gcc-core_4.2.1-7_i386
- mingw-gcc-g++_4.2.1-7_i386
- mingw-runtime_3.14-4_i386
- mingw-w32api_3.11-4_i386

Also my config

Code: Select all

CONTRIB_TREE=/usr/win32 export PKG_CONFIG_PATH=$CONTRIB_TREE/lib/pkgconfig \ CPPFLAGS="-I$CONTRIB_TREE/include -I$CONTRIB_TREE/include/ebml" \ CXXCPP=i386-mingw32-cpp \ LDFLAGS=-L$CONTRIB_TREE/lib \ CC=i386-mingw32-gcc CXX=i386-mingw32-g++ ./configure --host=i386-mingw32 --build=i386-linux \ --disable-gtk \ --enable-sdl --with-sdl-config-path=${CONTRIB_TREE}/bin --disable-gtk \ --disable-nls --enable-qt4 --disable-skins2 \ --disable-ffmpeg \ --with-ffmpeg-zlib --enable-theora \ --with-wx-config-path=${CONTRIB_TREE}/bin \ --with-freetype-config-path=${CONTRIB_TREE}/bin \ --with-fribidi-config-path=${CONTRIB_TREE}/bin \ --disable-live555 --with-live555-tree=${CONTRIB_TREE}/live.com \ --disable-caca --with-caca-config-path=${CONTRIB_TREE}/bin \ --with-xml2-config-path=${CONTRIB_TREE}/bin \ --with-dvdnav-config-path=${CONTRIB_TREE}/bin \ --disable-cddax --disable-vcdx --disable-goom \ --disable-twolame --disable-dvdread --disable-activex \ --disable-gnomevfs --disable-mad --disable-faad --disable-flac --disable-a52 \ --disable-dca --disable-avcodec --disable-avformat --disable-postproc --disable-libmpeg2 \ --disable-optimizations --disable-static \ --enable-debug \
And finaly the current build halt output :

Code: Select all

i386-mingw32-gcc -std=gnu99 -shared .libs/libgnutls_plugin_la-gnutls.o -L/usr/win32/lib /usr/win32/lib/libgnutls.a /usr/win32/lib/libgcrypt.a -lz -lws2_32 ../../src/.libs/libvlccore.dll.a -lmingw32 -mms-bitfields -o .libs/libgnutls_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgnutls_plugin.dll.a Creating library file: .libs/libgnutls_plugin.dll.a /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x6b): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0xbf): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x215): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x762): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x7d6): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x8c2): more undefined references to `_gpg_err_code_from_errno' follow /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x345): undefined reference to `_gpg_strsource' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x355): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x1e7e): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x20c4): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x2112): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x2228): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x2358): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x2640): more undefined references to `_gpg_err_code_from_errno' follow /usr/win32/lib/libgcrypt.a(libgcrypt_la-misc.o):misc.c:(.text+0x48f): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(cipher.o):cipher.c:(.text+0x2026): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0x76e): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0xed1): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0x10a1): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0x13fd): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0x37e8): more undefined references to `_gpg_err_code_from_errno' follow /usr/win32/lib/libgcrypt.a(md.o):md.c:(.text+0x16bf): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(md.o):md.c:(.text+0x1809): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1686): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1961): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1991): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1a2f): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1a97): more undefined references to `_gpg_err_code_from_errno' follow /usr/win32/lib/libgcrypt.a(ecc.o):ecc.c:(.text+0xe81): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(ecc.o):ecc.c:(.text+0xe97): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(ecc.o):ecc.c:(.text+0x113c): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(ecc.o):ecc.c:(.text+0x1873): undefined reference to `_gpg_err_code_from_syserror' /usr/win32/lib/libgcrypt.a(rsa.o):rsa.c:(.text+0xac2): undefined reference to `_gpg_err_code_from_errno' collect2: ld returned 1 exit status
Mingw gcc version output

Code: Select all

# i386-mingw32-gcc -v Using built-in specs. Target: i386-mingw32 Configured with: ../gcc-4.2.1-2-src/configure --target=i386-mingw32 --prefix=/usr/local --with-local-prefix=/usr/local/i386-mingw32 --enable-libgomp --enable-threads --with-arch=i686 --with-tune=generic --disable-werror --disable-nls --enable-languages=c,c++,fortran,objc,obj-c++,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libstdcxx-debug --enable-cxx-flags=-fno-function-sections -fno-data-sections --enable-version-specific-runtime-libs --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronizatio Thread model: win32 gcc version 4.2.1-sjlj (mingw32-2)


Please you people who make the nightlies make some suggestions . Tell us the exact versions of all the needed components.
Its a total insanity.................

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 30 Jul 2008 16:41
by VLC_help
http://wiki.videolan.org/Win32CompileCygwinNew
you followed that or another guide?

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 30 Jul 2008 16:57
by Jean-Baptiste Kempf
Well, you are doing it right, you are just missing a -lgpg-error.

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 30 Jul 2008 21:08
by basos
VLC_Help : Yes i followed these instractions when trying to natively compile with cygwin. Right now i'm fighting for an Xcompile...

j-b: Unfortunately it hanged again...

Code: Select all

i386-mingw32-gcc -std=gnu99 -shared .libs/libgnutls_plugin_la-gnutls.o -L/usr/win32/lib /usr/win32/lib/libgpg-error.a /usr/win32/lib/libgnutls.a /usr/win32/lib/libgcrypt.a -lz -lws2_32 ../../src/.libs/libvlccore.dll.a -lmingw32 -mms-bitfields -o .libs/libgnutls_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgnutls_plugin.dll.a Creating library file: .libs/libgnutls_plugin.dll.a /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x6b): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0xbf): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x215): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x762): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x7d6): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x8c2): more undefined references to `_gpg_err_code_from_errno' follow /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x345): undefined reference to `_gpg_strsource' /usr/win32/lib/libgcrypt.a(libgcrypt_la-global.o):global.c:(.text+0x355): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x1e7e): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x20c4): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x2112): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x2228): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x2358): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(libgcrypt_la-sexp.o):sexp.c:(.text+0x2640): more undefined references to `_gpg_err_code_from_errno' follow /usr/win32/lib/libgcrypt.a(libgcrypt_la-misc.o):misc.c:(.text+0x48f): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(cipher.o):cipher.c:(.text+0x2026): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0x76e): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0xed1): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0x10a1): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0x13fd): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(pubkey.o):pubkey.c:(.text+0x37e8): more undefined references to `_gpg_err_code_from_errno' follow /usr/win32/lib/libgcrypt.a(md.o):md.c:(.text+0x16bf): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(md.o):md.c:(.text+0x1809): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1686): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1961): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1991): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1a2f): undefined reference to `_gpg_err_code_from_errno' /usr/win32/lib/libgcrypt.a(primegen.o):primegen.c:(.text+0x1a97): more undefined references to `_gpg_err_code_from_errno' follow /usr/win32/lib/libgcrypt.a(ecc.o):ecc.c:(.text+0xe81): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(ecc.o):ecc.c:(.text+0xe97): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(ecc.o):ecc.c:(.text+0x113c): undefined reference to `_gpg_strerror' /usr/win32/lib/libgcrypt.a(ecc.o):ecc.c:(.text+0x1873): undefined reference to `_gpg_err_code_from_syserror' /usr/win32/lib/libgcrypt.a(rsa.o):rsa.c:(.text+0xac2): undefined reference to `_gpg_err_code_from_errno'
The config for this was

Code: Select all

CONTRIB_TREE=/usr/win32 export PKG_CONFIG_PATH=$CONTRIB_TREE/lib/pkgconfig \ CPPFLAGS="-I$CONTRIB_TREE/include -I$CONTRIB_TREE/include/ebml" \ LDFLAGS="-L$CONTRIB_TREE/lib -lgpg-error" \ # CFLAGS="-lgpg-error" \ CXXCPP=i386-mingw32-cpp \ CC=i386-mingw32-gcc CXX=i386-mingw32-g++ ./configure --host=i386-mingw32 --build=i386-linux \ --disable-gtk \ --enable-sdl --with-sdl-config-path=${CONTRIB_TREE}/bin --disable-gtk \ --disable-nls --enable-qt4 --disable-skins2 \ --disable-ffmpeg \ --with-ffmpeg-zlib --enable-theora \ --with-wx-config-path=${CONTRIB_TREE}/bin \ --with-freetype-config-path=${CONTRIB_TREE}/bin \ --with-fribidi-config-path=${CONTRIB_TREE}/bin \ --disable-live555 --with-live555-tree=${CONTRIB_TREE}/live.com \ --disable-caca --with-caca-config-path=${CONTRIB_TREE}/bin \ --with-xml2-config-path=${CONTRIB_TREE}/bin \ --with-dvdnav-config-path=${CONTRIB_TREE}/bin \ --disable-cddax --disable-vcdx --disable-goom \ --disable-twolame --disable-dvdread --disable-activex \ --disable-gnomevfs --disable-mad --disable-faad --disable-flac --disable-a52 \ --disable-dca --disable-avcodec --disable-avformat --disable-postproc --disable-libmpeg2 \ --disable-optimizations --disable-static \ --enable-debug \
I'm close aren't i?


P.S.: By the way i managed to do native compile on linux (linux binaries) for the vlc0.9.0test3 (git rep) with the following config.

Code: Select all

./configure \ --disable-gtk \ --enable-sdl \ --disable-nls --enable-qt4 --disable-skins2 \ --disable-ffmpeg \ --enable-theora \ --disable-live555 \ --disable-caca --disable-dvb --disable-dvbpsi \ --disable-cddax --disable-vcdx --disable-goom \ --disable-twolame --disable-dvdread --disable-activex \ --disable-gnomevfs --disable-mad --disable-faad --disable-flac --disable-a52 \ --disable-dca --disable-avcodec --disable-avformat --disable-postproc --disable-libmpeg2 \ --disable-optimizations --disable-static \ --enable-debug \
Extra things i needed were added as debian packages except from SDL that i downloaded and build with no difficulties..

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 31 Jul 2008 15:28
by VLC_help
I think
i386-mingw32-gcc -std=gnu99 -shared .libs/libgnutls_plugin_la-gnutls.o -L/usr/win32/lib /usr/win32/lib/libgpg-error.a /usr/win32/lib/libgnutls.a /usr/win32/lib/libgcrypt.a -lz -lws2_32 ../../src/.libs/libvlccore.dll.a -lmingw32 -mms-bitfields -o .libs/libgnutls_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgnutls_plugin.dll.a
should have the -lgpg-error

like
i386-mingw32-gcc -std=gnu99 -shared .libs/libgnutls_plugin_la-gnutls.o -L/usr/win32/lib /usr/win32/lib/libgpg-error.a /usr/win32/lib/libgnutls.a /usr/win32/lib/libgcrypt.a -lz -lws2_32 -lgpg-error ../../src/.libs/libvlccore.dll.a -lmingw32 -mms-bitfields -o .libs/libgnutls_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgnutls_plugin.dll.a

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 03 Aug 2008 09:53
by basos
And what flag should i append to the LDFLAGS??

Right now i have LDFLAGS=-lgpg-error and is produces :

Code: Select all

i386-mingw32-gcc -std=gnu99 -shared .libs/libgnutls_plugin_la-gnutls.o -L/usr/win32/lib /usr/win32/lib/libgpg-error.a /usr/win32/lib/libgnutls.a /usr/win32/lib/libgcrypt.a -lz -lws2_32 ../../src/.libs/libvlccore.dll.a -lmingw32 -mms-bitfields -o .libs/libgnutls_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgnutls_plugin.dll.a Creating library file: .libs/libgnutls_plugin.dll.a
Notice that the -lgpg-error was translated to /usr/win32/lib/libgpg-error.a . E.g. it provides the absolute path to the library object code ..

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 03 Aug 2008 18:11
by VLC_help
IIRC order of libs needs to be correct with GCC, because Libgcrypt depends on libgpg-error. I think libgpg-error.a should after libgcrypt.a but I am not 100% sure about this.

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 04 Aug 2008 19:27
by basos
Yes this is the case. I confirmed it by manually executing the compilation command for libgnutls. But now i am not sure where should i put -lgpg-error .
Looked at Modules.am there is no library entries.
Looked at Makefile.am tried to add -lgpg-error to
libgnutls_plugin_la_LIBADD = $(AM_LIBADD)
or
libgnutls_plugin_la_DEPENDENCIES =
but no results ..
Any suggestions ? I am not really familiar with the makefile.am/.in subsystem...

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 05 Aug 2008 16:49
by VLC_help
can you spot the ws2_32 in file?

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 06 Aug 2008 15:44
by basos
No there is no such file under vlc main source tree
Does it have to do with mingw version ? Or libs ?

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 06 Aug 2008 23:49
by VLC_help
I meant inside make thingy you are trying to edit so you can add lib before it. But you might also have to remove /usr/win32/lib/libgpg-error.a but I don't know where that comes.

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 08 Aug 2008 10:59
by basos
i've discovered some things :
the -lws2_32 and friends come from vlc-config [vlc-config --libs plugin gnutls ]

So we have to mod @ vlc-config : line 144
from
libs="${libs} -L/usr/win32/lib -lgnutls -lgcrypt -lz -lws2_32"
to
libs="${libs} -L/usr/win32/lib -lgnutls -lgcrypt -lz -lws2_32 -lgpg-error"

Also patched every place where -lgcrypt was included


EDIT :: :: FINALY SPOTED
We need to add --with-libgcrypt-prefix=${CONTRIB_TREE} \ to the configuration options or the build system is confused with the local libgcrypt-config .
Consider adding this to http://wiki.videolan.org/Win32Compile


And at last we have binaries !! :D
A question: under src i see vlc.exe but no libvlc.dll.
Where libvlc.dll ought to be ??

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 08 Aug 2008 17:17
by VLC_help
You used make package-win32-base or something similar to build VLC folder?

Re: VLC-0.9.0_test3 X-Compile problems

Posted: 09 Aug 2008 00:21
by basos
Ooops i missed that.. Ok everything is in the new folder (after running make package-win32-base)..
VLC_HELP thanx for the help.