I don't really have any experience cross compiling so there is probably a simple solution to my problem. I downloaded libogg 1.3.1 from http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz and libtheora from http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2. First I compile and libogg using these commands (in MSYS, when in the extracted directory):
./configure --prefix=/usr/local/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-static
make clean && make -j4
make install
and it looks like everything works (no errors reported and I see libogg files in /usr/local/x86_64-w64-mingw32).
I also compile and install libvorbis and libSDL with similar commands (downloads found in links on http://www.theora.org/downloads/)
I then try to compile libtheora and it fails at the configure. Here is the command I run:
./configure --prefix=/usr/local/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-static
and the result is an error about not finding the libogg library (below is the end of the configure output):
checking for OGG... no
checking for Ogg... no
*** Could not run Ogg test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means Ogg was incorrectly installed
*** or that you have moved Ogg since it was installed.
configure: error:
libogg is required to build this package!
please see http://www.xiph.org/ for how to
obtain a copy.
Does anyone have any thoughts on what I am doing wrong?
Thanks,
David
Related
I am following this guide to compile FFMPEG with libvpx support. On the libvorbis compilation step, I get this error:
The test program failed to compile or link. See the file config.log for the exact error that occurred. This usually means Ogg was incorrectly installed or that you have moved Ogg since it was installed.
There is no error on the Ogg compilation and installation step, and I cannot find this config.log file. I have libogg available in local/lib and local/bin.
Resolved with the following:
Correct the path to MinGW in the fstab file in /etc
add--prefix="path to MinGW" to the configure flags
I am building ffmpeg on ubuntu. I could able to build yasm-1.2.0, and next i tried building x264. x264 requires minumum of yasm-1.2.0, Hence i tried the below command to build x264.
./configure --prefix=<myprefix> --bindir=<mybindir> --extracflgs=<Include directory of yasm-1.2.0> --extra-ldflags=<libdirectory of yasm-1.2.0>
I got the below error:
No working C compiler found.
Not sure what error i commited. Could someone kindly tell me what do i have to do?
You misuse --extra-cflags and --extra-ldflags options and so C compiler gives you error (you can look at exact error in config.log file). This are additional flags that are passed to GCC (C compiler) and have nothing to do with YASM (assembler). All what you need to do with YASM is to have it in one of the $PATH directories i.e. it should run in shell/console from any current working dir with simple yasm --version.
While installing ffmpeg on Ubuntu 12.04
I am getting following error
libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/root/ffmpeg/libavcodec/libx264.c:492: undefined reference to `x264_encoder_open_125'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
I am following the instructions given at
http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
Do anyone have idea about this error?
This is a typical problem for people who already have x264 installed through the package management system. You can solve this in at least 2 ways:
Uninstall the already existing x264 from your system, through the package management system:
# apt-get remove x264
and compile your new x264 from source
Don't uninstall the x264 package, but compile your new x264 and then compile your ffmpeg, telling it to use that newly compiled x264 library, by specifying that directory where your compiled x264 library is, using the mentioned LD_LIBRARY_PATH environment variable:
LD_LIBRARY_PATH=/path/to/my/compiled/x264/library ./configure --enable-libx264 ...
More info can be found on these links:
problem with --enable-libx264 option in ffmpeg
Compiling FFmpeg
add the header and lib path
gcc x264_test1.c -o x264_encoder -I/usr/local/include -L/usr/local/lib -lpthread -lm -lx264
Generally the error means that the library binary libx264.so picked up by the linker does not match the version in the header file x264.h. See the following lines of code in this header file:
/* Force a link error in the case of linking against an incompatible API version.
* Glue #defines exist to force correct macro expansion; the final output of the macro
* is x264_encoder_open_##X264_BUILD (for purposes of dlopen). */
#define x264_encoder_glue1(x,y) x##y
#define x264_encoder_glue2(x,y) x264_encoder_glue1(x,y)
#define x264_encoder_open x264_encoder_glue2(x264_encoder_open_,X264_BUILD)
The solution usually does not require building libx264 yourself,
just make sure that you installed libx264-dev properly without interference with other versions, which may also be in /usr/local/lib or the like.
I had the same issue with version 155:
undefined reference to 'x264_encoder_open_155'.
In my case this was because I had in /usr/lib/x86_64-linux-gnu and unsuitable copy of libx264.so (which I had produced myself and uncleanly copied there).
So all I had to do was sudo apt-get install --reinstall libx264-dev.
I am attempting to build GCC-4.7.0 on a MacBook Pro running OS X 10.7.4. However, I am continuing to experience the same error:
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
This error occurred after running the following line:
./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/
To get rid of this error I have tried the following actions:
Using homebrew I downloaded gmp-5.0.4, mpc-0.21, and mpfr-3.1.0. At this point I attempting to point to where gmp, mpc, and mpfr are located with the following command:
./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/Cellar/ --with-mpfr=/usr/local/Cellar/ --with-mpc=/usr/local/Cellar/
However, this caused the same error. So, I tried pointing gcc to various locations around the Cellar directory:
./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/Cellar/gmp/ --with-mpfr=/usr/local/Cellar/mpfr --with-mpc=/usr/local/Cellar/mpc/
./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/Cellar/gmp/5.0.4/ --with-mpfr=/usr/local/Cellar/mpfr/3.1.0/ --with-mpc=/usr/local/Cellar/mpc/0.21/
./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/Cellar/gmp/5.0.4/include/ --with-mpfr=/usr/local/Cellar/mpfr/3.1.0/include/ --with-mpc=/usr/local/Cellar/mpc/0.21/share/
In the end these all produced the same error. I then downloaded the versions of gmp, mpc, and mpfr linked from the gcc error message (found here: ftp://gcc.gnu.org/pub/gcc/infrastructure/). After building these from the source and running all the same configurations I am left with the same problem. The configurations I have tried with this installation are:
./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/
./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/ --with-mpfr=/usr/local/ --with-mpc=/usr/local/
./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/ --with-gmp=/usr/local/include/ --with-mpfr=/usr/local/include/ --with-mpc=/usr/local/include/
Then I read somewhere that there could be a problem if I didn't explicitly set the configuration to run in 64-bit mode. So, I tried all of these configurations again with the added setting of 'CC=gcc -m64'. But this didn't change anything. If anyone has any ideas I would be greatly appreciative.
If you don't know how to build and properly direct GCC's configure to the libraries you can put them in the source tree of GCC itself:
/some/dir/source/gcc/[libstdc++|libgomp|gcc|libiberty|....]
/some/dir/source/gcc/gmp/[configure|...]
/some/dir/source/gcc/mpfr/[configure|...]
/some/dir/source/gcc/mpc/[configure|...]
So without the version number appended. Then just run GCC configure without any arguments related to GMP/MPC/MPFR.
I've faced the same issue and it was easily solved by installing the corresponding development packages: gmp-devel, mpfr-devel and libmpc-devel
Yigal
EasyBuild (a tool to make building software easier) can be of help here. It comes with a small easyconfig file that specifies which GCC version to build, and which features to enable (see for example https://github.com/hpcugent/easybuild/blob/master/easybuild/easyconfigs/g/GCC/GCC-4.7.0.eb).
Once you've downloaded EasyBuild and configured it, you can just run
$EBHOME/easybuild.sh myGCC.eb
with EBHOME set to the location where you unpacked EasyBuild, and myGCC.eb a copy of the example GCC easyconfig, which you modified to your needs.
This command will download the GCC source tarball for you and build/install it, after doing the same to any dependencies, for example GMP, MPFR and MPC, saving you a lot of headaches.
For more information on EasyBuild, see https://github.com/hpcugent/easybuild/wiki .
I'm installing gcc 4.5.2 with mpc 0.8.2, mpfr 3.1.0, and gmp 5.0.2. I've copied each of the mpc, mpfr, and gmp directories into the gcc-4.5.2 directory (removing the version tags). GCC successfully configures. When I run make, however, I get:
checking for MPFR... no
configure: error: libmpfr not found or uses a different ABI.
make[1]: *** [configure-mpc] Error 1
make[1]: leaving directory cross/build/gcc
make: *** [all] Error 2
MPFR is located in cross/src/gcc-4.5.2/mpfr. MPFR already was built successfully. Anyone know why mpc is unable to configure?
I think the problem may partially have to do with the libs/headers for MPFR being in cross/src/gcc-4.5.2/mpfr/src and not in cross/src/gcc-4.5.2/mpfr. All I did was extract and copy though- this is the default directory structure.
I was having the same issue.
But it seems this happens because latest version of MPFR (in your case 3.1.0) changed the directory hierarchy.
Instead, before configuring, run the following when you are inside gcc's source directory (may only work for gcc4.5.2 or later):
./contrib/download_prerequisites
It will download the necessary MPFR, GMP and MPC versions (but probably not the latest versions) and unpack those for gcc installation.
After that, you can continue with your configure, make and make install.
Hope this helps.
-Rakib
I found that if I ran export C_INCLUDE_PATH=/cross/gcc-4.5.2/mpfr/src then export LD_LIBRARY_PATH=/cross/build-gcc-4.5.2/mpfr/src/.libs and finally export LIBRARY_PATH=$LD_LIBRARY_PATH everything worked as expected.
The nagging question is why gcc's own configure scripts set the flags wrong. It should know that mpfr's libs are not in mpfr/.libs but in mpfr/src/.libs, however it passes the former to mpc/configure.
Try this while configuring:
./configure --prefix=<DIR YOU WANT TO INSTALL GCC> \
--with-gmp=<DIRECTORY YOU INSTALLED GMP> \
--with-mpc=<MPC DIR> --with-mpfr=<MPFR DIR>
I've had the same problem for a few hours, but I solved it in another other way.
I've deleted all old folders like gcc-4.* and gcc-build, because there was an old configuration inside. After that, I checked out again with version-check.sh if everything was in the right location.
I used Debian and it was missing bison and gnu awk! Why whatever. I installed the two again and started with installing gcc. Now everything is OK.
Perhapse you have a similar problam which can be solved in the same manner. I have to check every time when I start vbox and maybe it is a problem with my vbox-image, so when I start vbox I run a versions-check.
No need you can try like this:
./configure \
--with-gmp=/opt/install/local\
--with-mpfr=/opt/install/local \
--with-mpc=/opt/install/local \
--with-gmp-include=/opt/install/build/gmp-6.0.0 \
--with-mpfr-include=/opt/install/build/mpfr-3.1.2/src \
--with-mpc-include=/opt/install/build/mpc-1.0.2/src --enable-languages=c,c++
instead of --with-mpfr=, I used --with-mpfr-lib=your-mprf-dir/lib(64?) --with-mpfr-include=your-mprf-dir/include.
This works for me.
PS: mprf-3.1.0 gmp-5.0.2 mpc-0.9