I'm trying to compile VLC2.0 on Ubuntu 11.10, and am stumped with this error. I've already successfully compiled all of the dependencies in contrib/, using Intel's latest compiler suite. However, I'm getting an error when compiling posix/filesystem.c
Configured VLC with:-
../configure --host="x86_64-linux-gnu" --build="x86_64-linux-gnu" --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-gnutls --enable-libass --enable-libbluray --enable-libcdio --enable-libdirac --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libx264 --enable-libxvid --enable-openssl --enable-openal
I've edited some of the flags in the makefile; relevant flags are now:
CC = icc -std=gnu99
CFLAGS = -O3 -ipo -I/usr/local/src/vlc-2.0.0/contrib/x86_64-linux-gnu/include -Wall -Wextra -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -funroll-loops -fomit-frame-pointer -finline -finline-limit=1000
CPP = icc -E
CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I/usr/local/src/vlc-2.0.0/contrib/x86_64-linux-gnu/include
CXX = icpc
CXXCPP = icpc -E
CXXFLAGS = -O3 -std=gnu99 -xHost -I/usr/local/src/vlc-2.0.0/contrib/x86_64-linux-gnu/include -Wall -Wextra -Wsign-compare -Wpointer-arith -Wvolatile-register-var -fvisibility=hidden -funroll-loops -fomit-frame-pointer
During the make stage I get this error:
CC posix/filesystem.lo
../../src/posix/filesystem.c(300): warning #589: transfer of control bypasses initialization of:
variable "ln" (declared at line 302)
goto error;
^
/usr/include/bits/fcntl2.h(44): error #18015: invalid use of '__builtin_va_arg_pack_len'
/usr/include/bits/fcntl2.h(57): error #18015: invalid use of '__builtin_va_arg_pack_len'
/usr/include/bits/fcntl2.h(60): error #18015: invalid use of '__builtin_va_arg_pack'
/usr/include/bits/fcntl2.h(120): error #18015: invalid use of '__builtin_va_arg_pack_len'
/usr/include/bits/fcntl2.h(133): error #18015: invalid use of '__builtin_va_arg_pack_len'
/usr/include/bits/fcntl2.h(136): error #18015: invalid use of '__builtin_va_arg_pack'
compilation aborted for ../../src/posix/filesystem.c (code 1)
Having looked around online, I've seen a couple mail-lists mentioning optimisation flags causing this error with gcc, specifically flags involved with inlining, which is why I added -ipo -finline -finline-limit=1000
to CFLAGS. This doesn't seem to solve the problem though.
Can anyone help me solve this problem?? I've tried to figure out the exact compile command used, in order to compile filesystem.lo manually, but I can't find a way to get make
to print the exact command used, even with make -d
. I did manage to compile filesystem.c, but it made an ELF 64bit executable, rather than a libtool object file...
Any help much appreciated!
ps. If anyone else is here because they want to try compiling VLC2 with icc, I had problems with musepack and libvpx, but a couple Makefile fixes sorted that. I'd be happy to share my changes upon request.