[vlc] vlc-0.8.5 build problem
Chris Clayton
chris_clayton at f1internet.com
Sun May 7 12:59:12 CEST 2006
Hi,
Firstly, thanks for everyone's work on vlc.
I'm building vlc-0.8.5 but get the following compile error:
if i386-pc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DSYS_LINUX -I../include `top_builddir=".." ../vlc-config --cflags vlc` -Wsign-compare -Wall -Os -march=i386 -fno-strength-reduce -pipe -MT misc/libvlc_a-charset.o -MD -MP -MF "misc/.deps/libvlc_a-charset.Tpo" -c -o misc/libvlc_a-charset.o `test -f 'misc/charset.c' || echo './'`misc/charset.c; \
then mv -f "misc/.deps/libvlc_a-charset.Tpo" "misc/.deps/libvlc_a-charset.Po"; else rm -f "misc/.deps/libvlc_a-charset.Tpo"; exit 1; fi
misc/charset.c:391:14: warning: multi-character character constant
[ ...many of these so, snip...]
misc/charset.c:544:26: warning: multi-character character constant
misc/charset.c: In function `GetFallbackEncoding':
misc/charset.c:573: warning: implicit declaration of function `setlocale'
misc/charset.c:573: error: `LC_ALL' undeclared (first use in this function)
misc/charset.c:573: error: (Each undeclared identifier is reported only once
misc/charset.c:573: error: for each function it appears in.)
misc/charset.c:573: warning: assignment makes pointer from integer without a cast
make[4]: *** [misc/libvlc_a-charset.o] Error 1
The problem seems to be that I have /usr/include/langinfo.h (from glibc-2.3.6),
so HAVE_LANGINFO_CODESET is defined. That means that in src/misc/charset.c,
langinfo.h is included rather than locale.h. Including langinfo.h does not seem to
lead to LC_ALL being defined.
This horrible hack makes the build complete (and vlc seems to play mp3, dvd and
cd audio fine):
--- vlc-0.8.5/src/misc/charset.c.orig 2006-05-07 08:44:23.000000000 +0000
+++ vlc-0.8.5/src/misc/charset.c 2006-05-07 08:58:42.000000000 +0000
@@ -570,8 +570,10 @@
/* Some systems (like Darwin, SunOS 4 or DJGPP) have only the C locale.
* Therefore we don't use setlocale here; it would return "C". */
# if HAVE_SETLOCALE && !__APPLE__
+# if defined LC_ALL
psz_lang = setlocale( LC_ALL, NULL );
# endif
+# endif
if( psz_lang == NULL || psz_lang[0] == '\0' )
{
psz_lang = getenv( "LC_ALL" );
Hope this heads up helps figure out a real fix :)
Regards,
Chris
--
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html
More information about the vlc
mailing list