Page 1 of 1

Compiling latest version getting "virtual memory exhausted"

Posted: 2013-04-14T11:54:13-07:00
by mdlueck
Previously I have successfully built ImageMagick version 6.8.4-9 on our shared web server.

The server is running Debian 6.0.7

I found the solution to be able to run ImageMagick 6.3.9-2 as the server runs PHP as a CGI, therefor placing a php.ini in the directory, I am able to receive 128M of available memory.

I suspect something similar now needs to be done to build this latest version, not just execute this new version.

Is someone able to suggest the correct way to build ImageMagick version 6.8.4-9 on our shared web hosting account.

Following is the point at which the make blows up:

Code: Select all

  CC       coders/magick_libMagickCore_6_Q16_la-x.lo
  CC       coders/magick_libMagickCore_6_Q16_la-xwd.lo
  CC       filters/magick_libMagickCore_6_Q16_la-analyze.lo
  CCLD     magick/libMagickCore-6.Q16.la
copying selected object files to avoid basename conflicts...
  CC       wand/wand_libMagickWand_6_Q16_la-animate.lo
  CC       wand/wand_libMagickWand_6_Q16_la-compare.lo
  CC       wand/wand_libMagickWand_6_Q16_la-composite.lo
  CC       wand/wand_libMagickWand_6_Q16_la-conjure.lo
  CC       wand/wand_libMagickWand_6_Q16_la-convert.lo
virtual memory exhausted: Cannot allocate memory
make[2]: *** [wand/wand_libMagickWand_6_Q16_la-convert.lo] Error 1
make[2]: Leaving directory `/homepages/35/d157794216/htdocs/download/ImageMagick-6.8.4-9'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/homepages/35/d157794216/htdocs/download/ImageMagick-6.8.4-9'
make: *** [all] Error 2

Re: Compiling latest version getting "virtual memory exhaust

Posted: 2013-04-14T16:59:16-07:00
by magick
You'll need additional memory or compile on a different host that has more memory.

Re: Compiling latest version getting "virtual memory exhaust

Posted: 2013-04-15T18:41:24-07:00
by mdlueck
How much memory does it take currently to compile ImageMagick? Our server login shows:

Code: Select all

> free -m
             total       used       free     shared    buffers     cached
Mem:         12072      10262       1809          0        175       8935
-/+ buffers/cache:       1151      10921
Swap:          258        137        120
The provider had instructions of how to build ImageMagick in the type of hosting environment package we have with them listed in their FAQ. Perhaps it has just not been tested in some time.

I will open a support ticket with them, and reference this forum thread.

Thank you!

Re: Compiling latest version getting "virtual memory exhaust

Posted: 2013-04-15T18:44:22-07:00
by magick
How much memory? That's a question for the compiler, not ImageMagick. The compiler / linker is exhausting available memory.

Re: Compiling latest version getting "virtual memory exhaust

Posted: 2013-04-16T16:58:24-07:00
by mdlueck
ImageMagick used to be able to be compiled on our server. It does not compile any longer.

Other things still do compile successfully.

Therefore ImageMagick requires more memory to be compiled currently. How much memory should I request the hosting provider raise the limit to in order to be able to compile ImageMagick successfully.

The memory requirements to build / compile ImageMagick are not up to the Gnu group which develops the GCC compiler... come on, stop passing the buck. You have identified the problem, I showed you the current settings, what should I request the hosting provider raise the limit to in order to build / compile ImageMagick successfully?

Re: Compiling latest version getting "virtual memory exhaust

Posted: 2013-04-16T17:58:26-07:00
by magick
Only the compiler folks could answer that question. The compiler / linker is requesting memory and they would know how much memory it demands to build a source distribution. Once ImageMagick is built, we could estimate how much memory it utilizes for a particular command since we wrote it, we are familiar with its resource requirements. We are not familiar with the resource requirements of the various compiler and linker distributions.

Re: Compiling latest version getting "virtual memory exhaust

Posted: 2013-04-16T18:05:14-07:00
by mdlueck
(sigh...) Off to post to Gnu, anticipating being pointed back to ImageMagick, that "they should know much memory it takes to compile / build their own software". :? I do not like these runaround situations.

Re: Compiling latest version getting "virtual memory exhaust

Posted: 2013-04-16T18:31:38-07:00
by mdlueck
Posted the question, copy of post at the following URL: http://gcc.gnu.org/ml/gcc-help/2013-04/msg00106.html

Re: Compiling latest version getting "virtual memory exhaust

Posted: 2013-04-17T04:06:28-07:00
by mdlueck
Seems it is a bug in the gcc 4.4x compiler series, and 4.5.x corrected it.

So, how far along in higher versions of ImageMagick does ImageMagick believe I should be able to successfully compile with gcc version 4.4.5 (Debian 4.4.5-8)?


Andrew Haley wrote:> On 04/17/2013 02:41 AM, Michael Lueck wrote:
>>
>> Well, I successfully built ImageMagick 6.3.9-2. I assume ImageMagick has grown over the years, and that is why it will no longer compile.
>>
>> Are you saying that it is code size which is causing the error and our older compiler, and not a memory limit?
>
> It's a bug in GCC 4.4. It's fixed in 4.5.

Thank you for clarification. I will start by seeing which version of ImageMagick was distributed with Debian 6.0.7 and attempt to build that older version. It appears: 8:6.6.0.4-3+squeeze3 which I believe would sync up with ImageMagic source version 6.6.0-4. So perhaps up until the end of the 6.6.x source code version branch will compile, just not 6.8.x, for example.

I recall banging into a compiler issue once before and arriving at then the highest version of ImageMagick which would compile on the then Debian Woody (3.0) many years ago now. I had forgotten that Deja Vu point to this saga... seems I have already covered this ground once before.

Thank you all very much!

Sincerely,

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/