I'm trying to build libav 12.3 from https://libav.org/download/ using cygwin on Windows 10. There is some documentation on the libav.org website: https://libav.org/documentation/platform.html#Compilation-under-Cygwin
but it is out of date.
I want to know what cygwin packages I need to install. For example, the website specifies texi2html, which I can't find anywhere. Additional libraries such as yasm are not listed.
Some kind of math library is also missing. Currently, my compilation is failing with:
libavfilter/af_compand.c: In function ‘config_output’:
libavfilter/af_compand.c:343:43: error: ‘M_LN10’ undeclared (first use in this >function); did you mean ‘_M_LN2’?
double radius = s->curve_dB * M_LN10 / 20.0;
^~~~~~
_M_LN2
texi2html is a cygwin package.
$ cygcheck -p usr/bin/texi2html
Found 2 matches for usr/bin/texi2html
texi2html-1.82-10 - texi2html: A highly customizable texinfo to HTML and other formats translator (installed binaries and support files)
texi2html-1.82-11 - texi2html: A highly customizable texinfo to HTML and other formats translator (installed binaries and support files)
To install it, you need to follow
https://cygwin.com/cygwin-ug-net/setup-net.html#setup-packages
M_LN10 is defined in "/usr/include/math.h"
$ cygcheck -p usr/include/math.h
Found 6 matches for usr/include/math.h
cygwin-devel-2.10.0-1 - cygwin-devel: Core development files
cygwin-devel-2.11.0-0.2 - cygwin-devel: Core development files
cygwin-devel-2.9.0-3 - cygwin-devel: Core development files
..
so you need to install the cygwin-devel package that includes the standard cygwin headers.
Related
I'm trying to generate the lib files for freeglut library. I've installed cygwin and according to README file that comes with the library,
Building and Installing the Libraries with Cygwin
=================================================
To build "freeglut" under Cygwin, you have two choices:
- You can build a normal Cygwin library, which depends on Cygwin's X11
libraries. To do this, you can just use the normal autotools incantation:
./configure && make install
- Alternatively, you can build a DLL which does not depend on X11 and links
against the opengl32 DLL. To do this, configure need a few more flags:
./configure CPPFLAGS=-mno-cygwin LDFLAGS=-mno-cygwin --without-x && make install
If you don't have MSVC, Open Watcom or Cygwin
=============================================
But If I run ./configure, I got this error
$ ./configure CPPFLAGS=-mno-cygwin LDFLAGS=-mno-cygwin --without-x && make install
-bash: ./configure: No such file or directory
Is there something I need to install in order to solve this issue? The contents of the folder doesn't have configure. These are the files in the folder
If you need freeglut, you need to install the cygwin package libglut-devel
Looking inside setup.ini you will find its description:
libglut-devel
sdesc: "OpenGL Utility Toolkit library"
ldesc: "freeglut
is a completely OpenSourced alternative to the OpenGL Utility Toolkit
(GLUT) library. GLUT was originally written by Mark Kilgard to support
the sample programs in the second edition OpenGL 'RedBook'. Since
then, GLUT has been used in a wide variety of practical applications
because it is simple, widely available and highly portable. GLUT (and
hence freeglut) allows the user to create and manage windows
containing OpenGL contexts on a wide range of platforms and also read
the mouse, keyboard and joystick functions."
category: X11
Attempting to generate an Xcode project file from a simple hello world C++ source on Ubuntu 16.04.
$ cmake -G Xcode .. from empty subdirectory Xcode throws an error:
CMake Error: Could not create named generator Xcode
I used $ cmake --help to check the generators, but Xcode was not listed as a generator (Unix Makefiles, Ninja, Watcom WMake, etc. are listed). Currently using cmake version 3.8.0-rc1. Also tried with 3.5 to no avail.
Generators are only available for platforms, where the tool-chain exists. This is not specific to Xcode as Visual Studio is only provided on Windows.
The documentation states:
CMake Generators are platform-specific so each may be available only on certain platforms.
Background:
I've been using the gloss library for some simple diagram work. But when it came time for something more interactive, I found I wanted a more powerful library. After doing some research, I decided that I liked the features of the SDL library and wanted to try to install the Haskell bindings for it. I have to this point been unsuccessful.
Part 1:
How do I install and configure the SDL binaries so that they can be used by the Haskell bindings?
Part 2:
Which one of the numerous and ill documented SDL packages on Hackage it the current preferred binding in the community? How do I get that package to install correctly?
Part 3: (Optional)
If SDL is not a good fit for haskell development what is the preferred alternative?
I am going to answer your question for SDL2 (should also work for SDL1 with some modifications).
Install pkg-config for Windows
(How to install pkg config in windows?)
This tool is very important. It is used by various Cabal packages to search for libraries and contains directions for linking and compiling.
Download the SDL development libraries for Windows/MinGW:
http://libsdl.org/release/SDL2-devel-2.0.3-mingw.tar.gz
If you have installed the 32-bit version of the Haskell platform, extract the folder i686-w64-mingw32
For 64-bit versions extract x86_64-w64-mingw32
You will get following layout:
include
share
bin
lib
"Register" the library with pkg-config.
Either copy lib/pkgconfig/sdl2.pc into the folder of your pkg-config.exe or modify/create the PKG_CONFIG_PATH accordingly. Check that you set up everything correctly:
C:\pkg-config --list-all | grep sdl2
sdl2 sdl2 - Simple DirectMedia Layer is a cross-platform multimedia
library designed to provide low level access to audio, keyboard,
mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
Add the bin folder to your PATH environment variable.
Install the sdl2 package via the Cabal installer and tell Cabal where to find your libraries.
Example:
cabal install sdl2 --extra-include-dirs=C:\lib\sdl2\include --extra-lib-dirs=C:\lib\sdl2\lib\
To test my installation, I have written a small example:
https://github.com/ftl2014/haskell-stuff/blob/master/sdl/
Caveat emptor:
If Cabal complains about a "missing" library, it might be the case that library was actually found but it is incompatible (e.g. using a 32-bit instead of a 64-bit version) or corrupt. The same is true for header files.
For some reason, Cabal complained about not finding SDL.h, and I had to use the headers in the root include folder of the archive (but maybe I was just drinking too much Kool-aid).
I wasn't able to get it to install on my system. Here's what I tried. Strangely, I was able to get configure find the header files but not the actual binary.
Let's try it. I have installed the new 2014 Haskell Platform.
cabal install sdl
Configuring SDL-0.6.5...
setup.exe: The package has a './configure' script. This requires a Unix
compatibility toolchain such as MinGW+MSYS or Cygwin.
Failed to install SDL-0.6.5
GHC in the Haskell Platform comes with MinGW, so we probably need to install MSYS. The MSYS page says to install minggw get, which says to install
An automated GUI installer assistant called mingw-get-setup.exe is the preferred method for first time installation. This will guide you through the setup of the mingw-get installer proper; you will then use this to perform further package installations, and to manage your installation.
Running the installer with the default options gives us the following screen:
We already have mingw from installing the Haskell platform, so we'll click on only the last item in the list, msys-base, and select "Mark for Installation". Then, in the "Installation" menu in the top left, select "Apply Changes". This asks if it is ok to proceed, and we select "Apply"
This installer didn't put msys-base in the path, we can add it to the path, and try installing sdl again
set PATH=C:\MinGW\msys\1.0\bin\;%PATH%
cabal install sdl
Configuring SDL-0.6.5...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for sdl-config... no
checking for sdl11-config... no
configure: error: *** SDL not found! Get SDL from www.libsdl.org.
If you already installed it, check it's in the path. If problem remains,
please send a mail to the address that appears in ./configure --version
indicating your platform, the version of configure script and the problem.
Failed to install SDL-0.6.5
We need to download and install libsdl. I went to the libsdl download page and downloaded the Win32 development libraries, SDL-devel-1.2.15-mingw32.tar.gz. I extracted this archive (7-zip can extract both tar archives and gzip compressed files). For convenience, I moved the SDL-1.2.15 directory to c:. We'll add this to the path, as suggested by the previous error, and try again
set PATH=C:\SDL-1.2.15\bin\;%PATH%
cabal install sdl
* Missing (or bad) header file: SDL/SDL.h
* Missing C library: SDL
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
We can make part of this error go away by adding the suggested --extra-include-dirs flag, but still get the following error
cabal install sdl --extra-include-dirs=c:\SDL-1.2.15\include
* Missing C library: SDL
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
Adding the --extra-lib-dirs flag with c:\SDL-1.2.15\bin or C:\SDL-1.2.15\lib or c:\SDL-1.2.15 failed to fix this problem.
I'm trying to install the software TinyOWS on a Linux computer. The source code is written in C programming language. I don't have much experience with installing C or C++ programs from source code on Linux. I read installation instructions, and it says that I must follow 3 steps after I unzip the source code folder:
./configure
make
make install
When I run ./configure, I get the following error:
checking for xml2-config... /usr/bin/xml2-config
checking for libxml2 version... 2.7.6
configure: error: You need at least libxml 2.8.0
This means that the software being installed requires version 2.8.0 of a library called libxml2 but my computer only has the 2.7.6 version. Unfortunately I found out that I cannot easily install the libxml 2.8.0 on my Linux distribution. The reason why the software TinyOWS that I'm trying to install requires libxml2.8.0 of the library is because libxml2.7.6 has a small bug. But most of the functionality of the software is not affected by the bug.
So, here is my question:
What files do I have to edit or what command line options do I need to use If I want the ./configure command to use the library libxml2.7.6 instead of libxml2.8.0?
Get the source, in the file configure.in replace the line:
AC_MSG_ERROR([You need at least libxml 2.8.0])
By
AC_MSG_NOTICE([You need at least libxml 2.8.0])
Then, do:
autoreconf -f -i -s
./configure
make
The configure step will not stop. But i think if the developpers have restricted this version of libxml2 there must be a good reason.
I'm trying to configure GCC 4.7.2, but it's failing with configure: error: Unable to find a usable PPL
I've looked in GCC prerequisites page and PPL isn't mentioned anywhere.
I'm using CLooG 0.17.0, which uses ISL, and as such no longer requires PPL (as far as I can tell)
Is there some other requirement on PPL in GCC which means I still need PPL, or am I missing some flag from my configure line?
I am passing the following options to configure:
--enable-cloog-backend=isl
--with-cloog=$PREFIX
--with-isl=$PREFIX
--with-gmp=$PREFIX
--with-mpfr=$PREFIX
--with-mpc=$PREFIX
For completeness, my full configure line is as follows:
./configure --prefix=/hostname/tmp/syddev/sdk/gcc472/suse11/x86_64 \
--disable-multilib --enable-cloog-backend=isl \
--with-mpc=/hostname/tmp/syddev/sdk/gcc472/suse11/x86_64 \
--with-mpfr=/hostname/tmp/syddev/sdk/gcc472/suse11/x86_64 \
--with-gmp=/hostname/tmp/syddev/sdk/gcc472/suse11/x86_64 \
--with-isl=/hostname/tmp/syddev/sdk/gcc472/suse11/x86_64 \
--with-cloog=/hostname/tmp/syddev/sdk/gcc472/suse11/x86_64 \
--build=x86_64-suse-linux --with-pkgversion='SIG build 11/27/2012' \
--with-gxx-include-dir=/hostname/tmp/syddev/sdk/gcc472/suse11/x86_64/include/c++/4.7.2 \
--enable-version-specific-runtime-libs
Update:
In order to try make forward progress I decided to add PPL to my installation list, and add --with-ppl=$PREFIX to my configure line.
Configure still fails with configure: error: Unable to find a usable PPL
It seems this is a bug in the configure script: Configure fails if PPL_MINOR_VERSION < 11
With the latest version PPL_MINOR_VERSION=0 (and PPL_MAJOR_VERSION=1)
The GCC Prerequisites page jumped the gun and is showing the prerequisites for GCC 4.8.
GCC 4.7.2 still uses PPL instead of ISL, as evidenced by the lack of --with-isl=PATH in the output of configure:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-build-libsubdir=DIR Directory where to find libraries for build system
--with-mpc=PATH specify prefix directory for installed MPC package.
Equivalent to --with-mpc-include=PATH/include plus
--with-mpc-lib=PATH/lib
--with-mpc-include=PATH specify directory for installed MPC include files
--with-mpc-lib=PATH specify directory for the installed MPC library
--with-mpfr-dir=PATH this option has been REMOVED
--with-mpfr=PATH specify prefix directory for installed MPFR package.
Equivalent to --with-mpfr-include=PATH/include plus
--with-mpfr-lib=PATH/lib
--with-mpfr-include=PATH
specify directory for installed MPFR include files
--with-mpfr-lib=PATH specify directory for the installed MPFR library
--with-gmp-dir=PATH this option has been REMOVED
--with-gmp=PATH specify prefix directory for the installed GMP
package. Equivalent to
--with-gmp-include=PATH/include plus
--with-gmp-lib=PATH/lib
--with-gmp-include=PATH specify directory for installed GMP include files
--with-gmp-lib=PATH specify directory for the installed GMP library
--with-host-libstdcxx=L use linker arguments L to link with libstdc++ when
linking with PPL
--with-stage1-ldflags=FLAGS
linker flags for stage1
--with-stage1-libs=LIBS libraries for stage1
--with-boot-libs=LIBS libraries for stage2 and later
--with-boot-ldflags=FLAGS
linker flags for stage2 and later
--with-ppl=PATH specify prefix directory for the installed PPL
package. Equivalent to
--with-ppl-include=PATH/include plus
--with-ppl-lib=PATH/lib
--with-ppl-include=PATH specify directory for installed PPL include files
--with-ppl-lib=PATH specify directory for the installed PPL library
--with-cloog=PATH Specify prefix directory for the installed CLooG-PPL
package. Equivalent to
--with-cloog-include=PATH/include plus
--with-cloog-lib=PATH/lib
--with-cloog-include=PATH
Specify directory for installed CLooG include files
--with-cloog-lib=PATH Specify the directory for the installed CLooG
library
--with-build-sysroot=SYSROOT
use sysroot as the system root during the build
--with-debug-prefix-map='A=B C=D ...'
map A to B, C to D ... in debug information
--with-build-config='NAME NAME2...'
use config/NAME.mk build configuration
--with-build-time-tools=PATH
use given path to find target tools during the build
It's unfortunate that they don't maintain prerequisites pages for versions prior to 4.8.