cloudbees imagemagick resize does not works - grails

I'm trying to deploy a grails application on cloudbees.
In order to do that, I have a Jenkins job that builds the war and it deploy it.
My application uses ImageMagick in order to resize pictures.
After reading on cloudbees site that their servers have already ImageMagick installed, I did a test:
In my Jenkiks job a have a "execute shell" part where I put :
convert --version
When running the job, everything works fine and I see on the console output:
+ convert --version
Version: ImageMagick 6.7.5-6 2012-08-11 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
My application uses im4java wrapper.
When I try to resize a picture in my application I have the following error:
org.im4java.core.CommandException: java.io.IOException: Cannot run program "convert": error=2, No such file or directory
So, I don't understant why does not works since ImageMagick is installed.
Can you please give me some idea ?
Thanks.
C.C.

I guess the problem here is that ImageMagick is installed as a build tool on the development environment (DEV#cloud) but not on the stack you are using for the runtime environment (RUN#cloud). I cannot see any ImageMagick dependency added into the Tomcat 6-7 stack.
Only way to have imagemagick on runtime is to create a specific new stack which makes it available for you. So need to fork the git repo and use genapp as a development tool for the new stack.

Related

Compile Vala from sources on Linux Mint 18.3

I've always been able to compile sources from git repository https://github.com/GNOME/vala.git on my PC running "Linux Mint 18.3 Cinnamon 64-bit". I have the latest valac (0.42.4-0ubuntu1~16.04~valateam0) installed.
The last successful compile I did was from version 0.40.0.257-40b5-dirty. Today, I downloaded the latest vala.git, but when i run ./configure I get:
./configure: line 12579: syntax error near unexpected token `$flag,TEST_CFLAGS="$TEST_CFLAGS $flag"'
./configure: line 12579: ` AX_CHECK_COMPILE_FLAG($flag,TEST_CFLAGS="$TEST_CFLAGS $flag")'
Do I need to make additional environment changes? Not sure were to go from here.
Compiling Vala from source is a good start in contributing back to the Vala project. Vala currently uses autotools as its build system. For Ubuntu AX_CHECK_COMPILE_FLAG is provided by a separate package: autoconf-archive. See the autotools syntax error with ax_check_compile_flag answer on Stack Overflow for more details. So you should just need to install autoconf-archive.
By the way the main repository for Vala is in GNOME's GitLab instance: https://gitlab.gnome.org/GNOME/vala You may want to clone that one instead. The GitLab instance also allows issues to be raised and merge requests to be submitted.

How to remove OpenMP from GraphicsMagick on Windows server

I am using GraphicsMagick 1.3.26 on server.
Due, to performance impact. I want to remove OpenMP feature from it.
Kindly provide me the steps to remove the same for windows machine.
Thanks.
Never tried on Windows, and unable to test, but apparently you can either:
add -limit threads 1 to each command, or
rebuild with --disable-openmp and reinstall, or
set environment variable OMP_NUM_THREADS to 1 before running
Reference
Use:
gm identify -version
to see how your instance was built.

Buildfile:build.xml does not exist

I have installed Ant as i could use ant -version where it shows Apache Ant(TM) version 1.10.1 compiled on February 2 2017.i use Ubuntu 16.04 ,After I decompress voltdb,modify environment variables ,in terminal,import Ant.then the problem shows.maybe I need to illustrate I have never use it ,no data in voltdb.
I want to get it down.
the instructions for building VoltDB from source are here: https://github.com/VoltDB/voltdb/wiki/Building-VoltDB
If you can be more specific about what steps you have taken, we might be able to help. You can also contact us on our user forums, or public Slack channel.
You can also download VoltDB pre-built and try it free for 30 days.

PDF to Raster image, mistake in render

I have deployed a PHP application to a new server with more recent version of ImageMagick and PHP, however, the new server (ImageMagick) does a poor job at converting PDF to raster (jpg or png).
Here is the PHP code I run on both servers (with identical input file)
$im = new Imagick();
$im->setResolution( 72, 72 );
$im->readImage( 'vector.pdf' );
$im->setImageFileName('output-old.jpg');
$im->writeImage();
The generated files look like this
Generated file on old server (looks correct)
http://i.stack.imgur.com/owai5.jpg
Generated file on new server (problems)
http://i.stack.imgur.com/xg3kv.jpg
Original PDF
https://drive.google.com/file/d/0B9RgJSi9aRIJcUJYd2Z4bzFDTTA/view?usp=sharing
NOTE: same problem occurs when using ImageMagick via command line
convert vector.pdf output.jpg
Old Server Configuration
PHP: 5.3.10
ImageMagick: 6.7.6-0 2012-03-16 Q16
OS: Ubuntu 12.04
New Server Configuration
PHP: 5.6.13
ImageMagick: 6.9.2-3 Q16 x86_64 2015-09-23
OS: CentOs 6.5
You would expect the later version of ImageMagick to work better and would rather use that if possible.
Could the problem be in a configuration file or a dependant library? Will provide more server details if needed.
I fixed the problem by updating ghostscript
The new server only had ghostscript 8.7, I upgraded to 9.16
You can get you ghostscript version usually by running
gs --version

Neo4j 1.9.4 Windows Installer- where did the shell go?

When you install 1.9.4 using the new Windows installer, from where does one launch the Neo4j-Shell (previously found in bin)?
The neo4j-shell isn't currently shipping with the neo4j desktop but you can launch it by running the following command from 'C:\Program Files\Neo4j Community\' (or equivalent location:):
jre\bin\java -classpath bin\neo4j-desktop-1.9.4.jar org.neo4j.shell.StartClient
I'm not sure whether there are plans to include it in the next release, I'll check.
You can uninstall your neo4j windowns instalation version, so you can download an zip file with contains the neo4j binary version for Windows at http://www.neo4j.org/download. Using this version, you can find the bin, conf and lib folder. Besides that, you can find the Neo4jShell.bat. This file is the shell.
I believe the stand alone Neo4j-Shell isn't included in the installer for 1.9.4, but there is the Power tool console in the web interface, and you can also use the shell from the 1.8.3 package. I have no idea if it's supported though, but it seems to work.
For future googlers who end up here, there is a cypher shell at <neo4_dir>\bin\cypher-shell.bat. Neo4j-CE-3.1.0

Resources