0

I want to install this gimp-normalmap plugin on my Ubuntu 18.04 system by downloading and unpacking the gimp-normalmap-1.2.3.tar.bz2 file and running the make command in the unpacked folder. Then I get his error message:

gcc -c -O3 -Wall `pkg-config --cflags gtk+-2.0 gtkglext-1.0 gimp-2.0` normalmap.c
Package gimp-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gimp-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gimp-2.0' found
normalmap.c:26:10: fatal error: gtk/gtk.h: No such file or directory
 #include <gtk/gtk.h>
          ^~~~~~~~~~~
compilation terminated.
Makefile.linux:26: recipe for target 'normalmap.o' failed
make: *** [normalmap.o] Error 1

The install instructions include:

The only required packages that must be installed to build the plugin
(besides Gtk+ and the GIMP) are:

  1) gimp version 2.4 or later
  2) pkg-config version 0.14 or later
  3) gtkglext version 0.7.1 or later
  4) GLEW version 1.3.3 or later

You will need to install the development packages for your distribution for
Gtk+, Glib, gtkglext, GLEW and GIMP.

I did install all of those and checked by searching for each package with dpkg-query -l *package* When entering dpkg-query -l *gtk+* nothing turns up (which is normal I guess) and dpkg-query -l *gtk* shows a long list of which I don't know what to do with.

GIMP is installed via the Software Center, not via apt-get because the latter one installs an outdated version.

EDIT:

I just installed libgimp2.0-dev by executing sudo apt-get install libgimp2.0-dev and now I get this new error message when executing make:

gcc -c -O3 -Wall `pkg-config --cflags gtk+-2.0 gtkglext-1.0 gimp-2.0` normalmap.c
gcc -c -O3 -Wall `pkg-config --cflags gtk+-2.0 gtkglext-1.0 gimp-2.0` preview3d.c
gcc -c -O3 -Wall `pkg-config --cflags gtk+-2.0 gtkglext-1.0 gimp-2.0` scale.c
gcc  normalmap.o preview3d.o scale.o `pkg-config --libs gtk+-2.0 gtkglext-1.0 gimp-2.0 gimpui-2.0` -L/usr/X11R6/lib -lGLEW -o normalmap
/usr/bin/ld: normalmap.o: undefined reference to symbol 'sqrtf@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile.linux:17: recipe for target 'normalmap' failed
make: *** [normalmap] Error 1
  • How exactly did you install the packages listed? it looks like pkg-config can't find at least the libgtk2.0-dev and libgimp2.0-dev packages – steeldriver Aug 5 '19 at 12:50
  • Wait, how did you know that libgimp2.0-dev must be installed? I just checked and it wasn't. So I installed it, tried make again and now I get a different error message. I will update my post. – EVARATE Aug 5 '19 at 12:55
  • The new error appears to indicate an omission in the Makefile.linux - open it in a text editor and add -lm to the end of the LIBS (after -L/usr/X11R6/lib -lGLEW) – steeldriver Aug 5 '19 at 13:12
  • Awesome, that solved it. Thank you very much! – EVARATE Aug 5 '19 at 13:14
  • 1
    Instead of editing the title to "solved", you should add an answer. – SurvivalMachine Aug 5 '19 at 13:46
1

Solution:

  • Install libgimp2.0-dev
  • Add -lm to the end of the LIBS after -L/usr/X11R6/lib -lGLEW

Thanks to @steeldriver for providing the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.