Open zeroel opened 7 years ago
please provide output from configure script. most likely your system is using libav instead of ffmpeg and thus is not supported.
Hi, This is my configure log:
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for fpc... fpc
checking for fpcmake... fpcmake
checking version of fpc... [3.0.0]
checking whether the Free Pascal Compiler works... yes
checking whether the Free Pascal Compiler can link... yes
checking whether FPC supports -k"-z noexecstack"... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libpng12... yes
checking version of libpng... [1.2.50]
checking for sdl2... yes (-L/usr/local/lib)
checking for SDL2_image... yes (-L/usr/local/lib)
checking for freetype2... yes
checking for sqlite3... yes
checking for lua5.3... no
checking for lua5.2... no
checking for lua5.1... yes
checking version of lua... [5.1.5]
checking for libavcodec... yes (-L/usr/local/lib)
checking version of libavcodec... [56.60.100]
checking for avcodec_decode_audio in -lavcodec... no
checking for avcodec_decode_audio2 in -lavcodec... no
checking for img_convert in -lavcodec... no
checking for libavformat... yes (-L/usr/local/lib)
checking version of libavformat... [56.40.101]
checking for libavutil... yes (-L/usr/local/lib)
checking version of libavutil... [54.31.100]
checking version of ffmpeg... [2.8]
checking for libswscale... yes (-L/usr/local/lib)
checking version of libswscale... [3.1.101]
checking for libprojectM >= 0.98... no
checking for portaudio-2.0... yes (-L/usr/local/lib)
checking version of portaudio... [19]
checking for libpcre... yes
checking version of libpcre... [8.31]
checking for portmixer... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config-linux.inc
configure:
!!!
!!! Configuration of ultrastardx 1.1 done!
Please help!
Seems like you build a custom ffmpeg version by yourself (it's in /usr/local
). Are you sure, that you used the current libraries for this ffmpeg or did you build this version some time ago?
Thank for your quick reply!
Firstly, I've installed ffmpeg via apt-get: sudo apt-get install libav-tools
(I'm on Ubuntu 14.04)
But USDX required ffmpeg 2.8, got it from configuration's console
Then, I tried to install ffmpeg by downloading: https://ffmpeg.org/releases/ffmpeg-2.8.10.tar.gz
configure, make and make install.
Did you specify custom LDFLAGS
or something like this? -lm
seems to be missing or at the wrong position in the flags. Can you please show the complete command line of your ./configure
and make
call for usdx and any relevant environment variables passed to make.
Hi,
I tried to build USDX with no environment variables. Just ./configure
sudo make
and make install
.
The sudo make
log in more detail:
/home/namna/Downloads/USDX/src/media/UAudioPlayback_SoftMixer.pas(1158,50) Warning: Constructing a class "TGenericVoiceStream" with abstract method "ReadData"
Compiling media/UAudioPlayback_SDL.pas
Compiling media/UAudioInput_Portaudio.pas
Compiling media/UAudioDecoder_FFmpeg.pas
/home/namna/Downloads/USDX/src/media/UAudioDecoder_FFmpeg.pas(283,3) Note: Local variable "TestFrame" not used
/home/namna/Downloads/USDX/src/media/UAudioDecoder_FFmpeg.pas(441,3) Note: Local variable "ThreadResult" not used
/home/namna/Downloads/USDX/src/media/UAudioDecoder_FFmpeg.pas(1026,27) Warning: Symbol "avcodec_decode_audio3" is deprecated
Compiling media/UMedia_dummy.pas
Compiling menu/UMenuStaticList.pas
Linking ../game/ultrastardx
/usr/bin/ld: warning: ../game/link.res contains output sections; did you forget -T?
/usr/bin/ld: /usr/local/lib/libavformat.a(matroskaenc.o): undefined reference to symbol 'fmod@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
make[1]: *** [../game/ultrastardx] Error 1
make[1]: Leaving directory `/home/namna/Downloads/USDX/src'
make: *** [all] Error 2
After that, I also tried to export LDFLAGS="-lm"
but still get error:
/home/namna/Downloads/ffmpeg-2.8.10/libavformat/tee.c:112: undefined reference to `av_bitstream_filter_init'
/usr/local/lib/libavformat.a(tee.o): In function `close_slaves':
/home/namna/Downloads/ffmpeg-2.8.10/libavformat/tee.c:301: undefined reference to `av_bitstream_filter_close'
/usr/local/lib/libavformat.a(ac3dec.o): In function `ac3_eac3_probe':
/home/namna/Downloads/ffmpeg-2.8.10/libavformat/ac3dec.c:58: undefined reference to `avpriv_ac3_parse_header2'
/usr/local/lib/libavformat.a(adtsenc.o): In function `adts_decode_extradata':
/home/namna/Downloads/ffmpeg-2.8.10/libavformat/adtsenc.c:56: undefined reference to `avpriv_mpeg4audio_get_config'
/home/namna/Downloads/ffmpeg-2.8.10/libavformat/adtsenc.c:88: undefined reference to `avpriv_copy_pce_data'
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
make[1]: *** [../game/ultrastardx] Error 1
make[1]: Leaving directory `/home/namna/Downloads/USDX/src'
make: *** [all] Error 2
First:
sudo make
You do not need sudo
there (and you should only use it, if you really need it). Only for make install
sudo might be necessary if you want to install the game into a system wide directory.
The problem with the second approach is, that if you set LDFLAGS
you overwrite the detections made by configure and the compiler cannot find the ffmpeg libs anymore. Could you please try:
PFLAGS_EXTRA="-lm" ./configure
make
Hi, I tried to configure and make as your help, but still error. Please help!
namna@namna-H81M-DS2:~/Downloads/USDX$ PFLAGS_EXTRA="-lm" ./configure
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for fpc... fpc
checking for fpcmake... fpcmake
checking version of fpc... [3.0.0]
checking whether the Free Pascal Compiler works... yes
checking whether the Free Pascal Compiler can link... yes
checking whether FPC supports -k"-z noexecstack"... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libpng12... yes
checking version of libpng... [1.2.50]
checking for sdl2... yes (-L/usr/local/lib)
checking for SDL2_image... yes (-L/usr/local/lib)
checking for freetype2... yes
checking for sqlite3... yes
checking for lua5.3... no
checking for lua5.2... no
checking for lua5.1... yes
checking version of lua... [5.1.5]
checking for libavcodec... yes (-L/usr/local/lib)
checking version of libavcodec... [56.60.100]
checking for avcodec_decode_audio in -lavcodec... no
checking for avcodec_decode_audio2 in -lavcodec... no
checking for img_convert in -lavcodec... no
checking for libavformat... yes (-L/usr/local/lib)
checking version of libavformat... [56.40.101]
checking for libavutil... yes (-L/usr/local/lib)
checking version of libavutil... [54.31.100]
checking version of ffmpeg... [2.8]
checking for libswscale... yes (-L/usr/local/lib)
checking version of libswscale... [3.1.101]
checking for libprojectM >= 0.98... no
checking for portaudio-2.0... yes (-L/usr/local/lib)
checking version of portaudio... [19]
checking for libpcre... yes
checking version of libpcre... [8.31]
checking for portmixer... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config-linux.inc
configure:
!!! !!! Configuration of ultrastardx 1.1 done! !!! !!! Type "make" to compile and !!! "make install" to install it afterwards. !!!
2. Make
/home/namna/Downloads/USDX/src' rm -f "../game/ultrastardx" rm -f -r "../build/fpc-x86_64-linux" make[2]: Leaving directory
/home/namna/Downloads/USDX/src'/bin/mkdir -p "../build/fpc-x86_64-linux"
make create-pathinfo
make[2]: Entering directory /home/namna/Downloads/USDX/src' echo "INSTALL_DATADIR = '/usr/local/share/ultrastardx';" > paths.inc make[2]: Leaving directory
/home/namna/Downloads/USDX/src'
fpc -Si -Sg- -Sc- -v0Binwe -Xs- -O2 -lm -k"-z noexecstack" -k" -L/usr/local/lib" -Fi../src/lib/JEDI-SDL/SDL/Pas -Fu. -FU../build/fpc-x86_64-linux -o../game/ultrastardx ultrastardx.dpr
Error: Illegal parameter: -lm
Error: /usr/local/bin/ppcx64 returned an error exitcode
make[1]: [../game/ultrastardx] Error 1
make[1]: Leaving directory `/home/namna/Downloads/USDX/src'
make: [all] Error 2
Ok. seems like the fpc does not accept the linker arguments. I do not know what's wrong with your setup. I will try to replicate it and report back.
Yes, thank you!
I am on Debian Jessie and I'm experiencing the same issue. I have purged fpc2.8 and ffmpeg3, installed fpc3.0.0 from the repositories and ffmpeg version n2.7.7 from source, much like zeroel it seems. I have tried running the configure script both with and without setting the PFLAGS_EXTRA="-lm" variable. I have attached the output for all those commands below.
Same thing Ubuntu 14.04. I've installed ffmpeg-2.8.6, same result.
I'm getting:
./configure: line 3636: syntax error near unexpected token `libpng,'
./configure: line 3636: `PKG_HAVE(libpng, libpng12, no)'
I just tried to compile USDX from source and got the exact same error as everyone else in this post. I compiled ffmpeg 2.8 from source. The system is running Debian Jessie. Did anyone found a solution yet?
Not yet, alas. I have temporarily made a seperate partition running arch linux and got it working easily there. I'm planning on trying to run it from Debian in a VM or chroot, but I haven't figured that quite out yet. It's definitely not ideal, but it at least allows you to play.
The FPC version seems broken. I can only compile with fpc 3.0.2
The problem is that most of you compiled FFmpeg only as static libraries. This currently does not work because:
pkg-config --libs --static libXYZ
to get a list of all libraries we have to link to when we use libXYZ and in which order to link them.external
declarations in the linker script link.res in random order.-k
) before link.res in the arguments to the linker, meaning they will be applied before the linker even knows which symbols are needed by the application.LIBS
variable before it wraps it in -k""
So to fix the error listed in the first post, we can add -lm to LIBS since libm is most likely a shared library. But if you do so , you will be greeted with lots of other undefined symbols and in the end you will notice that you have to tell the linker to link the code to -lavcodec after -lavformat (not before). Then you start cursing Free Pascal and consider rebuilding FFmpeg as shared library.
@Redox15, I don't know what went wrong there, but the current version no longer checks for libpng.
Hi, Please help! I'm trying to build your USDX on my Ubuntu 14.04. But got error:
Please help me to fix them