compile/make ffmpeg without man pags - heroku

I am installing ffmpeg on heroku (ubuntu) with enable-ssl via a build-pack. I am able to build it all the way up to these errors:
install: cannot create regular file `/usr/local/share/man/man1/ffmpeg.1': Read-only file system
...
install: cannot create regular file `/usr/local/share/man/man1/ffmpeg-filters.1': Read-only file system
make: *** [install-man] Error 1
I do not have write access to any directory outside of /app. I have tried compiling with --mandir=/app/vendor/ but that seems to be ignored.
Is there any way to build ffmpeg without the man pages or just have them installed else where?

Actually if your build has gotten to the install step, you should already have the binary for ffmpeg. Build process makes it in the local directory before attempting to move the binary and manuals to the system locations.

Related

make install can't find aclocal

I'm trying to compile a code to run in parallel on a supercomputer. I know that others have compiled this code to run on the same computer, but for some reason I am having trouble even when using the same methodology as them. For now I'm just trying to compile the code to run in serial as that should be easier to troubleshoot.
configure seems to work correctly.
However make install returns the following:
> make install
CDPATH="${ZSH_VERSION+.}:" && cd .. && /bin/sh /home1/username123/code123/config/missing aclocal-1.13 -I ./config -I /home1/username123/code123/build-tools/aclocal -I /usr/local/share/aclocal
aclocal-1.13: error: couldn't open directory '/usr/local/share/aclocal': No such file or directory
Makefile:534: recipe for target '../aclocal.m4' failed
make: *** [../aclocal.m4] Error 1
aclocal is indeed not located at /usr/local/share/aclocal, it is located at /usr/bin/aclocal - but as /usr/bin is in my path, I don't understand why the location is an issue.
As has been made clear in comments on the question, the problem was that the project sources were copied onto the target system in a way that failed to preserve their original timestamps. The Autotools, through make, use file timestamps to determine which files are out of date, and in particular, Autools-generated Makefiles contain rules for rebuilding the build system itself that can be triggered this way.
It is not ordinarily necessary or desirable to rebuild an Autotools project's build system, except in conjunction with actually performing maintenance on it. It is often the case, in fact, that the necessary support for that is not available locally. To avoid the build system thinking that it needs to rebuild itself, it is important to preserve the file timestamps from the distribution archive. For some packages, it also works to pass the --disable-maintainer-mode argument to the configure script, but by no means do all Autotools configure scripts support that.
The archive extraction tools for the typical archive formats in which Autotools-based packages are distributed do, by default, preserve timestamps when unpacking, so the ordinary procedure of
unpack the archive on the target system (e.g. tar xzf foo-1.2.3.tar.gz)
change to the unpacked source directory (e.g. cd foo-1.2.3)
configure; make; make install
normally does the right thing. Substituting something else for (1), however, such as copying the unpacked source tree from somewhere else, may cause the package to think it needs to rebuild the build system. If that works correctly then it's no big deal, but it is not uncommon that it doesn't. That's what happened here, and following the standard procedure described above solved the problem.

Not able to install padwalker on osx 10.6.8

I want to install padwalker on my mac so that i can use it in eclipse(helios)
$ make -version is 3.81
Installing PadWalker from cpan & directly via the make command gives me the following error
PadWalker.xs: In function ‘fetch_from_stash’:
PadWalker.xs:179: warning: format not a string literal and no format arguments
lipo: can't open input file: /var/folders/xB/xBJ-fz33GWibK4FbV4AAwk+++TI/-Tmp-//ccl9TEXl.out (No such file or directory)
make: *** [PadWalker.o] Error 2
ROBIN/PadWalker-1.98.tar.gz
/usr/bin/make -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
ROBIN/PadWalker-1.98.tar.gz : make NO
I am sorry but i really looked over the web for answers but have not found any.
Someone suggested to use cpanm, but that too is of no use
I got a dirty trick.
With cpan, i am still not able to install it.
However i downloaded PadWalker-1.98.tar.gz
Opened Makefile.PL and removed the line MIN_PERL_VERSION => "5.008001",
I did $ perl Makefile.PL
With reference to https://rt.cpan.org/Public/Bug/Display.html?id=69506
I opened the generated Makefile & removed all instances of '-arch ppc' in Makefile.
finally
$make
&
$make install
Now i am able to view the local variables in eclipse

wkhtmltopdf compilation on Ubuntu

I am trying to compile wkhtmltopdf from the latest source. I am on Ubuntu 12.10 x64 server edition.
I used the instructions from here and here.
For the wkhtmltopdf-qt compilation, as mentioned by the author, the new Git repo is at gitorious.org/~antialize/qt/antializes-qt.git on the 4.8.2 branch. So, that is what I used as well.
Everything went fine. The compilation of both (qt and wkhtmltopdf) completed successfully. But I was able to use wkhtmltopdf only as root (using sudo). When I ran it as any other user, I got the following error.
error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory.
I had done all the compilations as root, with the files inside the root user's home directory (/root). I guessed that the wkhtmltopdf program needs to read the wkqt directory, where the compiled qt resides (and the libQtWebKit.so.4 file). This directory was inside the root user's home directory as well, thus preventing other users from running wkhtmltopdf.
So, I decided to start from scratch again. This time, I put all the source files (wkhtmltopdf-qt and wkhtmltopdf) in /usr/wkhtmltopdf. But during the compilation of qt, I get an error with the compiler trying to access qmake at the previous (old) location where qt source was present (/root/wkhtmltopdf-qt).
Error below:
ln -s libQtDeclarative.so.4.8.2 libQtDeclarative.so
ln -s libQtDeclarative.so.4.8.2 libQtDeclarative.so.4
ln -s libQtDeclarative.so.4.8.2 libQtDeclarative.so.4.8
rm -f ../../lib/libQtDeclarative.so.4.8.2
rm -f ../../lib/libQtDeclarative.so
rm -f ../../lib/libQtDeclarative.so.4
rm -f ../../lib/libQtDeclarative.so.4.8
mv -f libQtDeclarative.so.4.8.2 libQtDeclarative.so libQtDeclarative.so.4 libQtDeclarative.so.4.8 ../../lib/
make[1]: Leaving directory `/usr/wkhtmltopdf/wkhtmltopdf-qt/src/declarative'
cd src/3rdparty/webkit/Source/ && make -f Makefile.WebKit
make[1]: Entering directory `/usr/wkhtmltopdf/wkhtmltopdf-qt/src/3rdparty/webkit/Source'
/root/wkhtmltopdf-qt/bin/qmake -spec ../../../../mkspecs/linux-g++-64 -o Makefile.WebKit WebKit.pro
make[1]: /root/wkhtmltopdf-qt/bin/qmake: Command not found
make[1]: *** [Makefile.WebKit] Error 127
make[1]: Leaving directory `/usr/wkhtmltopdf/wkhtmltopdf-qt/src/3rdparty/webkit/Source'
make: *** [sub-webkit-make_default-ordered] Error 2
I don't understand how this is possible when I am starting with absolutely fresh source code.
Is there some way in which I can completely remove (uninstall) the previously installed wkhtmltopdf-qt and wkhtmltopdf?
I would appreciate some help. Thanks.
Okay, I figured it out.
Apparently, the source code was not as fresh as I thought.
I was cleaning the untracked and modified files in the Git working copy of the QT source directory. Running git status showed no modified files. But what I missed was that there were a lot of git-ignored folders and files, which still had the info about the previous compilation. These files and folders were not showing up in git status.
So, I temporarily moved the .gitignore file outside the repo and ran git clean -fd. That cleaned out all unnecessary files. Then I moved the .gitignore file back. For safety, I also ran git checkout -- . to get the latest versions of all the files from HEAD.
Compilation worked after that.

Building and using Google Protocol Buffers

I am currently working on a project, and I am trying to implement Protocol Buffers to work as a serialization format to store data on the local computer, and then be read back at a later time. Some of the features of protocol buffers seem perfect for this project so I was eager to test it out but I have run into some issues.
So far though, I have not even been able to get far enough to test out Protocol Buffers. I downloaded the most recent zip file (version 2.4.1) to my windows machine. I read through the install.txt located in the root of the folder, but it was for Unix based systems. I then saw that it came with a vsprojects folder and read through the instructions listed there. Basically, all I was told to do was open up a solution, and then build the entire solution in either Debug or Release. I instantly received several errors about "config.h" not being found.
I checked over the Unix instructions again and step one was...
cd' to the directory containing the package's source code and type
'./configure' to configure the package for your system. If you're
usingcsh' on an old version of System V, you might need to type
sh ./configure' instead to preventcsh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
So I booted into ubuntu, which I rarely use, and tried follow these instructions. The step listed above went fine and I was even able to get to the next step and 'make' the project, but then when the time came to use 'make install' I received the following errors:
ross#ubuntu:~/Desktop/protobuf-2.4.1$ make install
Making install in .
make[1]: Entering directory `/home/ross/Desktop/protobuf-2.4.1'
make[2]: Entering directory `/home/ross/Desktop/protobuf-2.4.1'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
/bin/mkdir: cannot create directory `/usr/local/lib/pkgconfig': Permission denied
make[2]: *** [install-pkgconfigDATA] Error 1
make[2]: Leaving directory `/home/ross/Desktop/protobuf-2.4.1'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/ross/Desktop/protobuf-2.4.1'
make: * [install-recursive] Error 1
I primarily use windows for development, and the entire project I am working with now is being made in windows, so I am a little concerned. Has anybody had any luck building Protocol Buffers in either windows or linux?
Thank you
You can't do make install as your own user, when you're trying to install it system-wide.
Either use sudo make install if you have sudo rights, or become root any other possible way and then run it.
If you don't have admin rights, you can run ./configure --prefix=$HOME/protobuffers, compile and run make install again, it will install them in your home dir in subdir called protobuffers. Note that you might want to adjust your LD_LIBRARY_PATH in profile after that to be able to find libraries. If you only need protoc, that should do the trick.
--- edit ---
Speaking of which, protoc is also available for windows, and you can use them there as well.
You can download it here.

What does /usr/sbin/install really do?

I'm trying to install discount on my VPS which is based on Solaris and compiling works great after setting some environment variables but the install fails.
So I thought I'd do the install manually, but what does install really do? Is it simply a mv followed by a chmod? Is it magic? That error seems to show that it attempts to do a lot of searching for files all over?
Can I just copy the binary, library and header files as usual?
Googling "install" doesn't give me much relevant information so I appreciate any clarification I can get!
According to man install:
install [OPTION]... [-T] SOURCE DEST`
install [OPTION]... SOURCE... DIRECTORY
install [OPTION]... -t DIRECTORY SOURCE...
install [OPTION]... -d DIRECTORY...
In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to
the existing DIRECTORY, while setting permission modes and owner/group.
In the 4th form, create all components of the given DIRECTORY(ies).
As for the difference to using cp, according to install vs. cp; and mmap, install unlinks the existing file, creating a new one linked to the same spot.
This has the advantage that, if the file you're trying to overwrite is a currently running program, it can continue running, as the file being written is in fact in a new location, and the existing program code is still in the old one.
A cp simply tries to overwrite the existing file, which will fail if the file is locked due to being in use.
Further information
install Command

Resources