ImageMagick errors building nuxeo-platform-imaging-core

When attempting to build nuxeo-platform-imaging-core from master on CentOS 7, I experience the following ImageMagick error in several of the tests. Any thoughts what might be causing the error?

# yum install ImageMagick  
Loaded plugins: fastestmirror, langpacks  
Loading mirror speeds from cached hostfile  
* base: [mirror.dattobackup.com](http://mirror.dattobackup.com)  
* epel: [mirror.umd.edu](http://mirror.umd.edu)  
* extras: [mirror.solarvps.com](http://mirror.solarvps.com)  
* updates: [mirror.trouble-free.net](http://mirror.trouble-free.net)  
Package ImageMagick-6.7.8.9-10.el7.x86_64 already installed and latest version  
Nothing to do  


mvn install -rf :nuxeo-platform-imaging-core  
...  

Running org.nuxeo.ecm.platform.picture.core.test.TestImagingConvertPlugin  
Exception in thread "Nuxeo-pipe-7" java.lang.RuntimeException:  java.io.IOException: Broken pipe  
at org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor$1.run(ShellExecutor.java:199)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: java.io.IOException: Broken pipe  
at java.io.FileOutputStream.writeBytes(Native Method)  
at java.io.FileOutputStream.write(FileOutputStream.java:326)  
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)  
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)  
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1793)  
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)  
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)  
at org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor$1.run(ShellExecutor.java:196)  
... 1 more  
main 12:23:07,617 ERROR [IMImageUtils$ImageMagickCaller] ImageMagick  
failed on command: resizer  org.nuxeo.ecm.platform.commandline.executor.api.CommandException:  
Error code 1 return by command: stream -define  registry:temporary-path=#{nuxeo.tmp.dir} -quiet -map rgb -storage-type  
char -extract #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY}  #{inputFilePath}[0] - | convert -depth 8 -size  #{tileWidth}x#{tileHeight} rgb:- #{outputFilePath}  
convert: unexpected end-of-file `-': No such file or directory @  error/rgb.c/ReadRGBImage/230.  
at org.nuxeo.ecm.platform.commandline.executor.api.ExecResult.<init>(ExecResult.java:62)  
at org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor.exec(ShellExecutor.java:83)  
at org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent.execCommand(CommandLineExecutorComponent.java:173)  
at org.nuxeo.ecm.platform.picture.magick.utils.ImageCropper.crop(ImageCropper.java:47)  
at org.nuxeo.ecm.platform.picture.core.im.IMImageUtils$1.callImageMagick(IMImageUtils.java:133)  
at org.nuxeo.ecm.platform.picture.core.im.IMImageUtils$ImageMagickCaller.call(IMImageUtils.java:65)  
at org.nuxeo.ecm.platform.picture.core.im.IMImageUtils.crop(IMImageUtils.java:135)  
at org.nuxeo.ecm.platform.picture.ImagingComponent.crop(ImagingComponent.java:108)  
at org.nuxeo.ecm.platform.picture.convert.CropPictureConverter.convert(CropPictureConverter.java:61)  
at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:199)  
at org.nuxeo.ecm.platform.picture.core.test.TestImagingConvertPlugin.testCrop(TestImagingConvertPlugin.java:154)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:497)  
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)  
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)  
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)  
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$15.evaluate(FeaturesRunner.java:467)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeMethodRunStatement.evaluate(FeaturesRunner.java:346)  
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeSetupStatement.evaluate(FeaturesRunner.java:362)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterMethodRunStatement.evaluate(FeaturesRunner.java:393)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterTeardownStatement.evaluate(FeaturesRunner.java:412)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:525)  
at org.nuxeo.runtime.test.runner.RuntimeDeployment$DeploymentStatement.evaluate(RuntimeDeployment.java:270)  
at org.nuxeo.runtime.test.runner.RuntimeFeature$2$1.evaluate(RuntimeFeature.java:124)  
at org.junit.rules.RunRules.evaluate(RunRules.java:20)  
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)  
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)  
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)  
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)  
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)  
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)  
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)  
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterClassStatement.evaluate(FeaturesRunner.java:285)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:525)  
at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeClassStatement.evaluate(FeaturesRunner.java:268)  
at org.junit.rules.RunRules.evaluate(RunRules.java:20)  
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)  
at org.junit.runners.Suite.runChild(Suite.java:127)  
at org.junit.runners.Suite.runChild(Suite.java:26)  
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)  
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)  
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)  
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)  
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)  
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)  
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)  
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)  
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:113)  
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:85)  
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:54)  
at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)  
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)  
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)  
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)  
StorageConfiguration: Deploying JDBC using DatabaseH2  
StorageConfiguration: Deploying a VCS repository  
main 12:23:08,205 ERROR [OSGiRuntimeService] Nuxeo Platform Started  
======================================================================  
= Component Loading Status: Pending: 1 / Unstarted: 0 / Total: 123  
* service:org.nuxeo.ecm.platform.picture.renditions requires  [service:org.nuxeo.ecm.platform.rendition.contrib]  
======================================================================  
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.056  
sec <<< FAILURE! - in  org.nuxeo.ecm.platform.picture.core.test.TestImagingConvertPlugin
0 votes

1 answers

2478 views

ANSWER



-: No such file or directory is probably a symptom of a too-old version of ImageMagick. In my version (ImageMagick 6.9.2-3) of stream or convert the help message ends with:

Specify 'file' as '-' for standard input or output.
0 votes



rg1
I installed ImageMagic-last (6.9.3.8-1.el7.remi) from Remi's RPM Repository (http://mirrors.mediatemple.net/remi/enterprise/7/) which fixed the problem.

Thanks for the suggestion.

04/14/2016