Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have script that I wish to distribute to a small group that requires ImageMagick, but many in the group don't have ImageMagick installed. I'm not really in a position where by I can install ImageMagick on all the groups machines, and my knowledge of compiling is pretty restricted to ./configure; make; make install.
Is it possible to compile ImageMagick (or indeed any other program) into a single binary without any external dependencies?
I believe to accomplish this I provide ./configure with the following arguments:
This sounds like an exercise in frustration. Why not simply show everyone how to install ImageMagick? (It's available using the package manager in every distro I have ever used)
This sounds like an exercise in frustration. Why not simply show everyone how to install ImageMagick? (It's available using the package manager in every distro I have ever used)
Agree. Installing ImageMagick should be quite straightforward.
Unless you need features from specific version of ImageMagic.
In this case you can convert dynamically linked executable into self-containing one using Ermine (http://magicErmine.com) or statifier
(http://statifier.sf.net)
Statifier is licensed under GPL, but has trouble on systems with memory randomization. On the other hand Ermine is commercial, but able to handle those system.
Valery, out of curiosity: ImageMagick has 9 standalone executable in my installation
is comprised of 8 binaries. How big would they become in that process?
Valery, out of curiosity: ImageMagick has 9 standalone executable in my installation
is comprised of 8 binaries. How big would they become in that process?
Size of all executables put together is nothing compared to the size of shared libraries.
I expect that packed executable will be about 10-20 MB.
And ANY packed executable is memory hog, because it uses it's own libraries. In additional to the host's libc it will map to memory it's own libc.
While packed executables eat from the disk space and RAM them provide convenience. It's trade off.
By the way recently LWN.net has article about bundling libraries with applications: http://lwn.net/Articles/378216/
I personally think, that while "no bundling" police make sense from the distribution maker point of view, for those who want their software works on different distros it's very hard to avoid bundling (if at all possible)
Apologies, I had forgotten ImageMagick produced multiple binaries. I only require 'convert' if that makes the task any easier.
Quote:
Why not simply show everyone how to install ImageMagick?
Some of the machines don't have any developer tools installed on them, and I am unfamiliar with all the various package managers.
From my perspective of just wanting to get the job done with the least amount of hassle to myself and the other users, it would be much easier if I could just distribute the single self contained binary of 'convert', or even a directory containing the binary and required libs. I imagined there would be a parameter I could provide at the configure stage that would do this for me, but from Valery's post:
From my perspective of just wanting to get the job done with the least amount of hassle to myself and the other users
Your goals are contradict: least amount of hassle for yourself is to assume that users' systems have convert installed (or users will take care of it)
Least trouble for the users is indeed to provide them with anything, that not installed on their boxes.
Quote:
, it would be much easier if I could just distribute the single self contained binary of 'convert', or even a directory containing the binary and required libs. I imagined there would be a parameter I could provide at the configure stage that would do this for me, but from Valery's post:
It seems this is not possible and I need to use Ermine or Statifier, or have I misunderstood?
Many thanks again,
Chris
Have a look at output off
Code:
ldd convert
If you can find all those static libraries, to link convert against,
then you can build static convert.
If you believe that user box will have all of those libraries - you can
distribute dynamically linked convert.
Slightly off-topic, but be sure to check the ImageMagick license before re-packaging and distributing any part of it.
On-topic:
I'm still missing why you don't simply tell your users to install ImageMagick---it comes with every distro I have ever tried, and they would not need any development setup, etc.
Slightly off-topic, but be sure to check the ImageMagick license before re-packaging and distributing any part of it.
From ImageMagick's license file"
Code:
The authoratitive ImageMagick license can be found at
http://www.imagemagick.org/script/license.php and ImageMagick notices at
http://www.imagemagick.org/script/notice.php.
Before we get to the text of the license lets just review what the license says in simple terms:
It allows you to:
* freely download and use ImageMagick software, in whole or in part, for personal, company internal, or commercial purposes;
* use ImageMagick software in packages or distributions that you create.
I'm still missing why you don't simply tell your users to install ImageMagick---it comes with every distro I have ever tried, and they would not need any development setup, etc.
Most of the end users wouldn't have a clue about how to go about installing/compiling. The computers were set up for them and it seems there is no support. Also they are remote and too many of them for me to talk though the process over a phone... and I'm not familiar with how too many of the distributions work!
Hence, I just want to be able to distribute a shell script with convert (and any dependancies) that the user clicks on and have the script do all the grunt work. It is literally only to resize jpgs and create thumbnails, so I should be able to compile with a limited set of dependancies, I guess.
pixellany and Valery Reznic, no problems with the licence that I see, so long as it is distributed with the code and proper credit is given?
It seems my knowledge of compiling etc is a bit constraining at the moment. I've had a read of the links Valery Reznic provided and had a play with ldd, but as yet I'm still missing something as I can't get it to work. I'll post back when I a specific question or manage to resolve my problem.
For now, many thanks for your replies and suggestions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.