How can one add more delegates to ImageMagick? I'm on gentoo (so, emerge), and while I see a plethora of links to different issues, I've not found any general how-to's:
This points to the source of the delegate libraries here
This points to the need to install underlying image libraries (e.g. libpng), and seems to generally be a repository for everyone's ImageMagick "no decode delegate" questions.
This sort of points back to a second person's issue in the first bullet, though it makes use of a ./configure command that I don't see in my ImageMagick directory
And finally, this might be the answer I need, though the syntax is garbled such that I cannot tell what the intended command is.
In particular, none of these explain what exactly one must do with the delegate libraries here, if they do indeed need to be installed manually. Anyway, my delegates are currently listed (via convert -list configure|grep -i delegate) as bzlib, mpeg, and zlib. I've installed media-libs/libpng, media-libs/tiff, and media-libs/libjpeg-turbo. I didn't grab media-libs/jasper, as it's not clear whether it is necessary. Removing and then installing ImageMagick anew after this (sudo emerge -cav media-gfx/imagemagick then sudo emerge -v media-gfx/imagemagick) didn't change any of my delegates.
Short Answer
A number of these can be handled by setting the USE flags on the imagemagick package. Some use flags can be found by looking at the package's entry on packages.gentoo.org. For a definitive list, check the ebuild on your machine or use tools such as equery.
Details
Portage, gentoo's package manager, is actually just a list of steps needed to build a package from source. USE flags allow you to customize that process. In this case, it changes which packages are built as dependencies.
Steps
One way to set the USE flags is to create a file in /etc/portage/package.use and write the package name on it's own line followed by all the use flag you would like to set. (eg. =media-gfx/imagemagick-7.0.8.8 png would set the png flag for version 7.0.8.8.
Once the USE flags are set, re-emerge the package to build with the new settings (eg. emerge --ask --verbose =media-gfx/imagemagick-7.0.8.8)
For more details on USE flags, read https://wiki.gentoo.org/wiki/USE_flag
Related
I have two fairly identical (Linux-) systems but one with just a minimum set of packages installed. On one system I have a running (binary/ELF) executable which I want to copy over to the other system (with the minimum setup).
Now I need a way to copy all needed shared libraries as well. Currently I start the application on the source system and then go through the output of
lsof | grep <PID>
or
ldd <FILE>
to get a list of all libraries currently loaded by the application and copy them over manually.
Now my question is: before I start to automate this approach and run into lots of little problems and end up with yet another reinvented wheel - Is there a tool which already automates this for me? The tool I'm dreaming of right now would work like this:
$ pack-bin-for-copy <MY_EXE>
which creates a .tgz with all needed shared libraries needed to run this executable.
or
$ cp-bin <MY_EXE> user#target:/target/path/
which would just copy the binary once..
Note: I do NOT need a way to professionally deploy an application (via RPM/apt/etc.). I'm looking for a 'just for now' solution.
One tool that does something similar to what you suggest is linuxdeploy. While the tool is intended to ease the creation of an AppImage (see here for more information), it will pack your executable with any dependencies into a directory. Then you can just create a 'tgz' file of that directory instead of an AppImage.
ldd usuage is correct if you also enable -Wl,--no-dynamic-lookup at link time.
I have VIM on Mac & CentOS. So, I see people are writing about -xterm_clipboard, -lua, ... Is there an simple way to install it all? or we have to enable options one-by-one and compile/recompile it?
If you want to install a pre-compiled package, look for a package name like vim-full, vim-huge or something similar.
If you want to compile youself you can pass the --with-features=huge to the configure script. Note, however, this does not enable the different language bindings because those are mostly optional and also the various GUIs need to enabled specifically, because you can have only one gui.
Therefore, you need to pass the --enable-<lang>interp argument for each language you want (e.g. --enable-luainterp --enable-pythoninterp) and the --enable-gui=<gui> e.g. (--enable-gui=gnome for the Gnome Gui).
This should cover the most important compile options. There might still some -flags in the :version output, but those should be generally not really important and would need to be enabled specifically. Read the help of the configure call ./configure --help to see all options available.
I write project where I need to identify certain file formats.
For some formats I have found signatures that I use for identifying easily (mp3, ogg), with another formats I have a big problem (like MPEG ADTS) - I just cannot find what kind of signature can be used for it.
I found out that File utility for Linux environment can do it.
I tried to search it in source code, but I've found nothing.
I found that file utility holds its database in magic.mgc file. But it's hold in binary form.
It looks like:
Does someone perhaps know how to find that database in plain text format?
That utility isn't a Linux-specific utility; it's the version of the UN*X file command originally written by Ian Darwin. The binary .mgc file is generated from a bunch of source files.
Your Linux distribution probably has a source code package for it; where you get that package, and how you install it, depends on which distribution you're using.
The source files from which the .mgc file was generated might also be available on your distribution without installing the source package for file; if so, you could use the file command to generate it, using the -C flag. I don't see them anywhere obvious on my Ubuntu 12.04 virtual machine, so that might require some other package to be installed (file itself is installed). (On OS X, they're in the directory /usr/share/file/magic.)
Alternatively, you could download the standard version of that file (which might have been modified by your distribution, so you might not want that version) and modify and build it.
Note that, on some versions of UN*X systems, the bulk of the work done by the file command is done in library routines in the "libmagic" library; see whether your distribution has that or can install it (try, for example, man libmagic) and whether it can do the job for you.
I'm currently installing R software on a shared space across several servers. After installation I found that when I login on different servers, R is not guaranteed to run due to the missing of some library files on different machines.
Here is what I'm trying to do: since the installation of R is machine-dependent, I'd like to put all missing library files like libtermcap.so.2, libg2c.so.1, etc, to a single directory on the shared space, so that when I run ./configure, it will also search for this directory. Since this directory is shared, the installation could become machine-independent, so I won't need to add missing files on each server.
Is there an option to achieve this when I run ./configure? Thanks.
Assuming you have copied the library files to /shared/lib/ and the header files to /shared/include/, you can run
./configure LDFLAGS=-L/shared/lib CPPFLAGS=-I/shared/include ...other options...
Note, however, that you are bound to run into trouble at run time, when you have to convince your installation to use the shared libraries from the right directory, especially in case someone decides to upgrade the default version on the respective host. That whole business is platform and installation dependent. I think if your hosts are not at least mostly identical, you ought to install your software (R) locally in a way suitable to the respective system.
Peter's answer is correct (+1), and please take special note of his suggestion to install locally. Using the local package management system and auto updating on each box is (in the long run) a much easier solution than trying to get compatible binaries/libraries on a shared drive. To simplify using Peter's solution, note that you can place the appropriate arguments in /shared/share/config.site. For example:
$ cat > /shared/share/config.site << EOF
: ${LDFLAGS=-L/shared/lib}
: ${CPPFLAGS=-I/share/include}
EOF
Whenever you run configure with --prefix=/shared, the config.site file will be read and defaults will be set.
I am trying to figure out which files were changed when I run an app install via make install. I can look at the script, but that calls other scripts and may or may not touch other files, etc. How can I do this programmatically?
Implementation: http://asic-linux.com.mx/~izto/checkinstall/
Several ways come to mind. First, use some sort of LD_PRELOAD to track all files opened. Second approach, compare filesystem before and after.
If your kernel supports it, you can use inotify (a handy interface is inotify tools) and watch your home directory, if the package was configured with --prefix=/home/myusername
I've noticed that checkinstall (using installwatch via LD_PRELOAD) does not always catch everything, the last time I used it it did not catch empty directories that were created for spooling, which caused the subsequent generated .deb's to break.
Note, don't use inotify if you are installing to /, in that case you have to use installwatch or just read all of the makefiles / install scripts closely.