[solved] ImageMagick - generic link error lazarus / 39-Graphics ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:01 Whenever I try to use ImageMagick, I get a generic link error... What do I need to do to use ImageMagick and magic_wand? On Linux? I have a complete ImageMagick installation. Anyone using ImageMagick on Linux? Any tips? ---------------------------------------------------------------------- Handoko · 2017-02-10 15:10 Have you tried using the search feature on this forum? I found a thread in this forum that maybe useful to you: http://forum.lazarus.freepascal.org/index.php/topic,4503.msg21344.html #msg21344 ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:14 Quote from: Handoko on February 10, 2017, 04:10:05 pmHave you tried using the search feature on this forum? Many times! But, apparently, you are better at searching. ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:17 No dice! It is obvious to me that in order to use ImageMagick you need to install both runtime and development packages (imagemagick and imagemagick-dev). It would be a lot easier to solve this issue if Lazarus would be more helpful instead of just spitting out a generic link error. ---------------------------------------------------------------------- Jurassic Pork · 2017-02-10 15:22 hello, if you  speak french  have a look here if you dont       : what is your linux ? on ubuntu you must install imagemagick and libmagickwand-dev packages  Friendly J.P ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:25 I don't speak French, unfortunately, but here is what I have installed related to 'magick' : ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:27 My Linux is Debian (testing) .. Is it possible to teach Lazarus to give me more messages? ---------------------------------------------------------------------- Jurassic Pork · 2017-02-10 15:34 try to understand (or translate this) it seems there is a problem of link : Michel_vbg : QuoteSous Debian 8.4 on trouve dans le répertoire /usr/lib/x86_64-linux-gnu/ les librairies libMagickWand-6.Q16.so.0.0 et libMagickCore-6.Q16.so.2.0.0, étant entendu que toutes les librairies nécessaires sont correctement installées. Les liens symboliques présents, qui y font référence, se nomment respectivement libMagickWand-6.Q16.so et libMagickCore-6.Q16.so. Je suppose, pour avoir eu dans le passé de tels problèmes avec la librairie libmysql, que lazarus attends plutôt libMagickWand.so et libMagickCore.so Il faut donc, dans le répertoire ci-dessus nommé, créer deux liens symboliques sur les librairies libMagickWand-6.Q16.so.0.0 et libMagickCore-6.Q16.so.2.0.0 que l'on nomme respectivement libMagickWand.so et libMagickCore.so et là le compilateur n'injurie plus personne. Je viens de tester, c'est positif maintenant! Après vérification d'un Linux Mint 17.3( basé sur Ubuntu 14.04) dans une machine virtuelle ( je n'avais que ça sous la main) on trouve effectivement les liens symboliques "libMagickWand.so et libMagickCore.so" manquants sous Debian 8.4 par exemple. C'est une difficulté récurrente dans Linux où les développeurs des distributions ont des conventions de nommages qui ne correspondent pas forcément à celles des développeurs d'autres applications. Je t'accorde que c'est un peu à l'arrache, mais qui veut la fin, doit vouloir aussi les moyens. ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:36 Now, I went into the terminal and used 'lazbuild' instead to see if it gave me more messages to work with.. And, indeed, it did!  Quote/usr/bin/ld: cannot find -lMagickCore [3.703] Executing "/usr/bin/ld" with command line "-b elf64-x86-64 -m elf_x86_64  --dynamic-linker=/lib64/ld-linux-x86-64.so.2    -L. -o Imaginary link.res" [3.828] /home/jacmoe/projects/pascal/imaginary/Imaginary.lpr(43,1) Error: (9013) Error while linking [3.828] /home/jacmoe/projects/pascal/imaginary/Imaginary.lpr(43,1) Fatal: (10026) There were 1 errors compiling module, stopping [3.836] Fatal: (1018) Compilation aborted Error: /home/jacmoe/fpcupdeluxe/fpc/bin/x86_64-linux/ppcx64 returned an error exitcode Error: (lazarus) Compile Project, Mode: Debug, Target: Imaginary: stopped with exit code 256 ERROR: failed compiling of project /home/jacmoe/projects/pascal/imaginary/Imaginary.lpi Since I already have lib magick core installed, perhaps I just need to make a symbolic link to resolve 'MagickCore' ? ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:37 Quote from: Jurassic Pork on February 10, 2017, 04:34:47 pmtry to understand (or translate this) it seems there is a problem of link : Yes, that's what I found out - thanks! I will try and see if I can manage to make Lazarus happy with a symbolic link. ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:40 So, what Michel is saying, is that libMagickWand-6.Q16.so.0.0 and libMagickCore-6.Q16.so.2.0.0 need to be symbolicly linked as libMagickWand.so and libMagickCore.so. I will do that, and report back. ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:50 Success! What I had to do, in '/usr/lib/x86_64-linux-gnu': Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo ln -s libMagickCore-6.Q16.so libMagickCore.sosudo ln -s libMagickWand-6.Q16.so libMagickWand.so Thanks Jurassic Pork for pointing me in the right direction! You saved my Lazarus project. ---------------------------------------------------------------------- jacmoe · 2017-02-10 15:53 Just want to mention again, that if you ever need to really see what Lazarus and FreePascal is doing, then close the IDE and use the lazbuild tool in the terminal.