Install ffmpeg (perl package) on windows xp - perl

I'm trying to install ffmpeg by typing "cpan install FFmpeg" in my command prompt. I've got Image::Magick, Image::PBM, Image::Magick::Iterator installed, which, I understand, are some of the prerequisites that I need, but it appears that that's not enough. Here's some additional information. I get the error message:
Note (probably harmless): No library found for -lavcodec
Note (probably harmless): No library found for -lavformat
Note (probably harmless): No library found for -lz
Note (probably harmless): No library found for -ldl
Note (probably harmless): No library found for -lmp3lame
Note (probably harmless): No library found for -logg
Note (probably harmless): No library found for -lvorbis
Note (probably harmless): No library found for -lvorbisenc
In file included from ffmpeg.h:2,
from FFmpeg.xs:16:
./ffmpeg-6036.c:21:22: avformat.h: No such file or directory
./ffmpeg-6036.c:22:21: swscale.h: No such file or directory
./ffmpeg-6036.c:23:23: framehook.h: No such file or directory
./ffmpeg-6036.c:24:21: dsputil.h: No such file or directory
./ffmpeg-6036.c:25:17: opt.h: No such file or directory
./ffmpeg-6036.c:44:21: version.h: No such file or directory
./ffmpeg-6036.c:45:22: cmdutils.h: No such file or directory
I'm guessing that I need to install those files and tell the installer where to find them. How do I do that, if that's what I need to do?

From the FFmpeg page:
FFmpeg (in this module, referred to here as FFmpeg-Perl) is a Perl interface to the base project FFmpeg (referred to here as FFmpeg-C).
It looks like the Perl FFmpeg module is just a wrapper around the C library. If that's the If you're using MinGW, it might be that you don't have FFMpeg installed in your MinGW environment (the C library.) You'll need to install that first, and then try installing FFmpeg (the Perl library) again.

Related

How to install Image::Magick in perl version 5.18

I need to install Image::Magick module in a machine and the credentials are below:
Windows Version - 7
Perl Version 5.18
Also I have tried so many ways like cpan ppm and also copied the module and directly pasted in the c:\perl\lib\ and c:\perl\site\lib and unfortunately no luck.
In cpan installed
Running install for module 'Image::Magick'
Running make for J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz
Checksum for C:\Perl\cpan\sources\authors\id\J\JC\JCRISTY\PerlMagick-6.89-1.tar.gz ok
./PerlMagick-6.89/
./PerlMagick-6.89/check.sh
./PerlMagick-6.89/Makefile.old
./PerlMagick-6.89/Makefile.nt
./PerlMagick-6.89/check.sh.in
./PerlMagick-6.89/demo/
./PerlMagick-6.89/demo/README
............
./PerlMagick-6.89/t/bzlib/read.t
./PerlMagick-6.89/t/input.fits
./PerlMagick-6.89/Makefile.PL
./PerlMagick-6.89/Makefile.PL.in
./PerlMagick-6.89/MANIFEST.SKIP
./PerlMagick-6.89/Makefile.am
./PerlMagick-6.89/Magick.xs
./PerlMagick-6.89/check
CPAN.pm: Building J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json
JCRISTY/PerlMagick-6.89-1.tar.gz
[31m C:\Perl\bin\dmake.exe -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
################################## WARNING! ####################
It seems that you are trying to install Perl::Magick on a MS Wi
perl + gcc compiler (e.g. strawberry perl), however we cannot f
binaries installed on your system.
Please check the following prerequisites:
You need to have installed ImageMagick Windows binaries from
https://www.imagemagick.org/script/download.php#windows
We only support dynamic (DLL) ImageMagick binaries
note: it is not possible to mix 32/64-bit binaries of perl a
During installation select that you want to install ImageMag
development files (libraries+headers)
You also need to have ImageMagick's directory in your PATH
note: we are checking the presence of convert.exe and/or ide
You might need Visual C++ Redistributable Package installed
see instructions on ImageMagick's Binary Release webpage
We are gonna continue, but chances for successful build are ver
################################################################
Warning (mostly harmless): No library found for -lMagickCore
Warning (mostly harmless): No library found for -lmoldname
Warning (mostly harmless): No library found for -lkernel32
Warning (mostly harmless): No library found for -luser32
Warning (mostly harmless): No library found for -lgdi32
Warning (mostly harmless): No library found for -lwinspool
Warning (mostly harmless): No library found for -lcomdlg32
Warning (mostly harmless): No library found for -ladvapi32
Warning (mostly harmless): No library found for -lshell32
Warning (mostly harmless): No library found for -lole32
Warning (mostly harmless): No library found for -loleaut32
Warning (mostly harmless): No library found for -lnetapi32
Warning (mostly harmless): No library found for -luuid
Warning (mostly harmless): No library found for -lws2_32
Warning (mostly harmless): No library found for -lmpr
Warning (mostly harmless): No library found for -lwinmm
Warning (mostly harmless): No library found for -lversion
Warning (mostly harmless): No library found for -lodbc32
Warning (mostly harmless): No library found for -lodbccp32
Warning (mostly harmless): No library found for -lcomctl32
to undefined at C:/Perl/lib/ExtUtils/Install.pm line 1198.
C:\Perl\bin\dmake.exe: *** [pm_to_blib] Error 2
Failed during this command:
JCRISTY/PerlMagick-6.89-1.tar.gz : make NO
cpan> exit
Lockfile removed.
After Installation the error displays as:
D:>perl -wc test.pl
Can't locate Image/Magick.pm in #INC (you may need to install the >Image::Magick module) (#INC contains: C:/Perl/site/lib C:/Perl/lib .) at test.pl line 2.
BEGIN failed--compilation aborted at test.pl line 2.
It would be appreciated if someone could suggest the way to close this.
The Perl library Image::Magick is a wrapper around a C library called ImageMagick. You can't install the Perl library if the C library is not installed first. That's why your attempted cpan installation gave all of those "No library found" errors.
You can download the Windows version of ImageMagick from the project's web site. Once you have installed that, you can try to install the Perl library again.
Did you read the errors that you got from cpan? I'm really not sure why, after getting a message saying "install seems impossible" you would try running a test program!

gtk+-3.0 not found issue

I'm writing program using Vala language. When I try to build a .deb package on Launchpad, I get this error
CMake can't find valac package gtk+-3.0. It uses valac version 0.30. Though it does find it, when I do this on my computer (use cmake to build).
This is first time I try to build .deb package, so I'm a bit confused with what to do... Can anyone tell me how to fix this?
Thanks in advance.
The error is quite clear, CMake can't find the pkg-config package named 'gtk+-3.0'.
You have to install the Ubuntu package containing the gtk+-3.0.pc file (which is libgtk-3-dev) in order to compile and link against the libgtk+-3.0 library.
In fact pkg-config is available in many Linux distributions and it always looks for the gtk+-3.0.pc file in it's search path. The package containing this file (and the development headers and libraries) may be named differently on differnt Linux distros.
While we are talking about Vala: The valac compiler also has a command line switch named --pkg (e.g. --pkg gee-0.8 --pkg gtk+-3.0) which uses the pkg-config to determine the necessary headers and libs to build against libraries that come with a .pc file.

Can't disable Armadillo Wrapper During Compilation/Linking

I am trying to compile the Armadillo C++ Library under Windows 32 using MinGW32 and OpenBLAS.
I've tried every tutorial and stackoverflow.com question on the topic, but still can't seem to disable the compilation of the wrapper.obj which produces link errors "undefined reference to `sdot_'" and so on. These are BLAS symbols that cannot be found by the wrapper.
I have no other BLAS/LAPACK libraries installed, and in the cmake output it confirms that libopenblas.dll has been found.
How can I disable the compilation and linking of the wrapper.obj? Editing config.hpp has no effect.
You don't have to use the cmake-based installer to use Armadillo. The installer simply creates the wrapper library which links with BLAS and LAPACK. You can instead directly link Armadillo-based programs with BLAS and LAPACK:
g++ prog.cpp -o prog -O2 -I armadillo-4.500.0/include -DARMA_DONT_USE_WRAPPER -DARMA_USE_BLAS -DARMA_USE_LAPACK -lblas -llapack
Change armadillo-4.500.0/include to point where the Armadillo include folder resides.

Install GD Library on RedHat machine for twiki

My ultimate goal is to run a twiki website for my research group.
I have space on RedHat server that is running Apache, etc., but upon which I do not have root access. Since I cannot install perl modules with the current permissions, I've decided to manually install a local version of perl. Got that working no problem. The following modules are required to get twiki to work:
FreezeThaw - http://search.cpan.org/~ilyaz/FreezeThaw
CGI::Session - http://search.cpan.org/~markstos/CGI-Session
Error - http://search.cpan.org/~shlomif/Error
GD - http://search.cpan.org/~lds/GD
HTML::Tree - http://search.cpan.org/~petek/HTML-Tree
Time-modules - http://search.cpan.org/~muir/Time-modules
I have installed FreezeThaw, CGI, Error, and it fails on GD with the following error:
UNRECOVERABLE ERROR Could not find gdlib-config in the search path.
Please install libgd 2.0.28 or higher. If you want to try to
compile anyway, please rerun this script with the option --ignore_missing_gd.
In searching for how to get around this newest obstacle, I found a previous SO question: How to install GD library with Strawberry Perl asked about installing this and the top answer suggested manually compiling gdlib. You'll note, however, that that link is broken. The base site: http://www.libgd.org/ is basically down saying to go to the project's bitbucket page.
So I got the tarball from that page and am trying to install it. The following problems occur when I follow the instructions included. README.TXT says: "If the sources have been fetched from CVS, run bootstrap.sh [options]."
Running bootstrap.sh yields:
configure.ac:64: warning: macro `AM_ICONV' not found in library
configure.ac:10: required directory ./config does not exist cp: cannot
create regular file `config/config.guess': No such file or directory
configure.ac:11: installing `config/config.guess' configure.ac:11:
error while copying cp: cannot create regular file
`config/config.sub': No such file or directory configure.ac:11:
installing `config/config.sub' configure.ac:11: error while
copying cp: cannot create regular file `config/install-sh': No such
file or directory configure.ac:28: installing `config/install-sh'
configure.ac:28: error while copying cp: cannot create regular
file `config/missing': No such file or directory configure.ac:28:
installing `config/missing' configure.ac:28: error while copying
configure.ac:577: required file `config/Makefile.in' not found
configure.ac:577: required file `config/gdlib-config.in' not found
configure.ac:577: required file `test/Makefile.in' not found
Makefile.am:14: Libtool library used but `LIBTOOL' is undefined
Makefile.am:14: The usual way to define `LIBTOOL' is to add
AC_PROG_LIBTOOL' Makefile.am:14: to configure.ac' and run
aclocal' and autoconf' again. Makefile.am:14: If `AC_PROG_LIBTOOL'
is in `configure.ac', make sure Makefile.am:14: its definition is in
aclocal's search path. cp: cannot create regular file
`config/depcomp': No such file or directory Makefile.am: installing
`config/depcomp' Makefile.am: error while copying Failed
And it says I should also install the following 3rd party libraries:
zlib, available from http://www.gzip.org/zlib/
Data compression library
libpng, available from http://www.libpng.org/pub/png/
Portable Network Graphics library; requires zlib
FreeType 2.x, available from http://www.freetype.org/
Free, high-quality, and portable font engine
JPEG library, available from http://www.ijg.org/
Portable JPEG compression/decompression library
XPM, available from http://koala.ilog.fr/lehors/xpm.html
X Pixmap library
Which I am ignoring for now.
Switching to the generic instructions it says follow the advice in the INSTALL file; which says: "cd to the directory containing the package's source code and type ./configure to configure the package for your system." Which flat does not work: I've cd'ed into every directory of the tarball and running that command does nothing.
So, trying to install twiki required me to install perl, which required me to install the perl modules: FreezeThaw, CGI, Error, HTML, Time-modules, and GD -- which itself required me to install gdlib -- which further suggested I install zlib, libpng, FreeType 2.x, JPEG library, and XPM. And of course, I'm stuck at the installing gdlib stage.
My question is: what other process can possibly demean humanity to such a level? I cannot fathom the depths of cruelty that lay ahead of me as I dive ever deeper into this misery onion. Should I just end it all? Can meaning be brought from this madness? Will the sun come up tomorrow, and if so, does it even matter?
But seriously, any suggestions on what to do differently/better would be much appreciated -- I can't remember what a child's laughter sounds like anymore.
Install the package gd-devel, it contains /usr/bin/gdlib-config.
This should work:
sudo apt-get -y install libgd2-xpm-dev build-essential

How can I install Perl's GD graphics library on Windows?

Has anyone managed to install the GD module for Perl (5.10) on Windows (Win7)? Note that unfortunately this is neither ActivePerl nor Strawberry Perl; instead, it is a self-compiled using MinGW.
I have unpacked the GD library in C:\Opt\GDlib. There are bin, lib and include directories.
I have MinGW tools sitting in C:\Opt\MinGW\bin\*.exe, including gcc and mingw32-make.exe (but no plain make).
I'm running the Microsoft script to set up INCLUDE, LIBPATH and LIB.
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
If I don't do this, the following Windows libraries are reported missing when I run perl Makefile.PL:
oldnames.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
netapi32.lib
uuid.lib
ws2_32.lib
mpr.lib
winmm.lib
version.lib
odbc32.lib
odbccp32.lib
msvcrt.lib
After running the Microsoft script, only the following is reported:
Note (probably harmless): No library found for -lfreetype
Note (probably harmless): No library found for -ljpeg
Note (probably harmless): No library found for -lpng
Note (probably harmless): No library found for -lz
That warning persists even when I add C:\Opt\GDlib\bin to PATH so the GD binaries will be found.
I'm then not even sure which make to call: mingw32-make, dmake, or some make that might still be missing? Here's the error output I'm seeing:
C:\.cpan\build\GD-2.46-baFt6a :: mingw32-make
mingw32-make: *** No rule to make target `C:\epages\Perl\libConfig.pm', needed by `Makefile'. Stop.
C:\.cpan\build\GD-2.46-baFt6a :: dmake
dmake.exe: Error: -- `C:\epages\Perl\libConfig.pm' not found, and can't be made
I'd be thankful for anyone who can shed light on what I'm supposed to do here. I suspect I'm missing the basics of how to compile using MinGW on Windows.
UPDATE - Following Neil's suggestion to give TDM-GCC a try
Here's the screen output. Still no success, but I guess it's just me ignoring some trivialities. In the end, the GD module has been built for both Strawberry and ActiveState, so there definitely is a way.
vsvars32
set path=%path%;C:\Opt\GDlib\bin
cpan
Then in the cpan shell:
cpan[1]> look GD
CPAN: Storable loaded ok (v2.18)
Going to read \.cpan\Metadata
Database was generated on Wed, 25 May 2011 13:37:34 GMT
CPAN: YAML loaded ok (v0.72)
Going to read \.cpan\build/
............................................................................DONE
Found 13 old builds, restored the state of 11
Running look for module 'GD'
Trying to open a subshell in the build directory...
Working directory is \.cpan\build\GD-2.46-baFt6a
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
C:\.cpan\build\GD-2.46-baFt6a :: perl Makefile.PL
Notice: Type perl Makefile.PL -h for command-line option summary.
Der Befehl "gdlib-config" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
**UNRECOVERABLE ERROR**
Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd.
C:\.cpan\build\GD-2.46-baFt6a :: perl Makefile.PL --ignore_missing_gd
Der Befehl "gdlib-config" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Where is libgd installed? [/usr/lib] C:\opt\gdlib
Please choose the features that match how libgd was built:
Build JPEG support? [y]
Build PNG support? [y]
Build FreeType support? [y]
Build GIF support? [y]
Build support for animated GIFs? [y]
If you experience compile problems, please check the #INC, #LIBPATH and #LIBS
arrays defined in Makefile.PL and manually adjust, if necessary.
Note (probably harmless): No library found for -lfreetype
Note (probably harmless): No library found for -ljpeg
Note (probably harmless): No library found for -lpng
Note (probably harmless): No library found for -lz
Writing Makefile for GD
C:\.cpan\build\GD-2.46-baFt6a :: which mingw32-make
C:\Opt\MinGW32-TDM-GCC\bin\mingw32-make.EXE
C:\.cpan\build\GD-2.46-baFt6a :: mingw32-make
mingw32-make: *** No rule to make target `C:\epages\Perl\libConfig.pm', needed by `Makefile'. Stop.
You have to build and install the underlying libgd which Perl's GD, as well as the other libraries mentioned using your build environment (using the same compiler and settings used to build your perl).
You should not mix your VC environment with MinGW.
I prefer to stick with the compiler/build tools bundled with Windows SDK 7.1 for everything, starting with building Perl from source.
Sounds like there is a problem with your MinGW installation. where did you get it from? You should try the version at http://tdm-gcc.tdragon.net. also, that .bat file is for the Microsoft compiler, not for MinGW.