Installing the webp plugin for gimp on Ubuntu linux - linux

I'm a linux novice and I'm trying to install the webp plugin for gimp on an Ubuntu desktop. I have downloaded the tarball from the download site of gimp and extracted it. I followed the instructions in the readme, but it doesn't work.
It says I first need to install the webp library from google. It can be found here:
http://code.google.com/speed/webp/download.html
But I have no idea how to install it. It's probably something trivial, but being a novice I have no idea what to do next.
I also went to the Ubuntu Software Center and found the same package there and clicked the install button. That seemed to have worked so I think it is installed now.
The readme tells me to issue the following commands:
export LIBS=-lwebp
gimptool-2.0 --install file-webp.c
And this gives me the following result:
gcc -pthread -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -I/usr/include/gimp-2.0 -o /home/pascal/.gimp-2.8/plug-ins/file-webp file-webp.c -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0 -lgimp-2.0 -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0 -lgimpbase-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lwebp
/usr/bin/ld: cannot find -lwebp
collect2: error: ld returned 1 exit status
I also tried using -libwebp instead of -lwebp, but that gives me the same error message.
update
I installed libwebp-dev as well and tried the same command. It solved the error, but now gives me another error:
gcc -pthread -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -I/usr/include/gimp-2.0 -o /home/pascal/.gimp-2.8/plug-ins/file-webp file-webp.c -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0 -lgimp-2.0 -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0 -lgimpbase-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lwebp
/tmp/cchf3eQS.o: In function `run':
file-webp.c:(.text+0x1b2): undefined reference to `read_webp'
file-webp.c:(.text+0x281): undefined reference to `export_dialog'
file-webp.c:(.text+0x2b5): undefined reference to `write_webp'
collect2: error: ld returned 1 exit status

The WebP plugin is included in Gimp 2.10 as a built-in plugin.
On older scenarios:
sudo add-apt-repository ppa:george-edison55/webp
sudo apt update
sudo apt install gimp-webp
Also, in Ubuntu (since 16.04):
sudo apt install webp
Will provide you with these commands:
dwebp: decompress a WebP file to an image file
cwebp: compress an image file to a WebP file
webpmux: create animated WebP files from non-animated WebP images, extract frames from animated WebP images, and manage XMP/EXIF metadata and ICC profile.
gif2webp: Convert a GIF image to WebP
vwebp: decompress a WebP file and display it in a window

I'm guessing you installed the webp package. Instead, install the libwebp-dev package.
The webp package provides CLI binary tools. The libwebp-dev package provides the development library needed to compile programs that use libwebp.
The compiler flag -lwebp causes the compiler the look for a library called libwebp.a libwebp-dev provides this file.

Related

Getting error /usr/lib/../lib64/libSM.so: undefined reference to `uuid_unparse_lower#UUID_1.0' when trying to complie newest version of vim

I try to install the newest version of vim on Red Hat 6.6.
I use the script below to run configure:
# change to folder where vim sources are
cd ~/vim
# here I compiled newest version of libuuid.
LIBDIR="/home/muellc1b/uuid/lib"
export LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH # prepend to path
export LDFLAGS="-L$LIBDIR"
#export LIBS="-llibuuid.so"
./configure \
--prefix=/home/muellc1b/vim_installation
#LIBS="-l$LIBDIR" \
#LDFLAGS="-L$LIBDIR"
When trying to run the makefile, I get the following errors:
gcc -L/home/muellc1b/uuid/lib -L/usr/local/lib -Wl,--as-needed [...] -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lSM -lICE -lXt -lX11 -lSM -lICE -lm -ltinfo -lelf -lnsl -lselinux -lacl -lattr -lgpm
/usr/lib/../lib64/libSM.so: undefined reference to `uuid_unparse_lower#UUID_1.0'
/usr/lib/../lib64/libSM.so: undefined reference to `uuid_generate#UUID_1.0'
collect2: error: ld returned 1 exit status
Can someone point me to a solution on how to correctly link my custom library?
As I saw, you got a satisfactory answer here where the solution was to run the configure script normally, open src/auto/config.mk, and change the line X_PRE_LIBS = -lSM -lICE -lXpm to X_PRE_LIBS = -luuid -lSM -lICE -lXpm. Then do make.
I had exactly the same error message, but when compiling PCL (point cloud library). The error had a different cause and different solution. I'll add it here, as this page came up when looking for solution - perhaps it will help someone.
My problem was that when doing cmake .. before make it gave warnings like this:
CMake Warning at cmake/pcl_targets.cmake:194 (add_library):
Cannot generate a safe runtime search path for target pcl_io because
files in some directories may conflict with libraries in implicit directories:
All the directories that were referenced were under anaconda3/lib. I ignored it and make gave me the same error libSM.so: undefined reference to `uuid_unparse_lower#UUID_1.0' and some more :). The solution was to remove anaconda lib folder from the path, and build again. In detail:
delete build directory and create it again
echo $PATH and look for anaconda lib directory
Copy the PATH output from previous step and remove reference to anaconda folder
execute PATH=[MODIFIED_PATH] where [MODIFIED_PATH] is the result from previous step
Execute echo $PATH again to see that anaconda directory has been removed
build the project again in the same terminal window
Now the process uses system libraries, not the anaconda ones and compilation succeeds.
An example of modified PATH: if the original was /home/you/anaconda3/bin:/usr/local/bin:/usr/sbin:/usr/bin then the modified one is /usr/local/bin:/usr/sbin:/usr/bin
NB! You probably do not want to change the PATH permanently (your anaconda installation might stop working) that is why it is done from the terminal not from .bashrc file.

Dependencies of programs using gtk/gtk.h

I have mini pc with vortex86DX processor. And today I install Ubuntu 9.04 on it. Now I want to use my program, which use gtk/gtk.h, to display some data. And I have question -
What dependencies have programs, which use GTK 3.0? It's very important for me, because I have not internet access on this small pc.
You generally build such GTK programs using pkg-config. And I am getting (on Debian/Sid/AMD64) the compile flags
% pkg-config --cflags gtk+-x11-3.0
-pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 \
-I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 \
-I/usr/include/gio-unix-2.0/ -I/usr/include/cairo \
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 \
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include \
-I/usr/include/harfbuzz -I/usr/include/freetype2 \
-I/usr/include/pixman-1 -I/usr/include/libpng12 \
-I/usr/include/libdrm
and the link flags
% pkg-config --libs gtk+-x11-3.0
-lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 \
-lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo \
-lgobject-2.0 -lglib-2.0
Notice that these shared libraries link some other ones (eg -lX11 or -ldbus). Try to ldd some GTK binary (e.g. your own one, or gedit)
NB: I have manually added the backslashes and newlines for readability
However, there are much more other runtime dependencies: the X11 server and related things (session and windows managers, fonts and images notably and perhaps even some "desktop" environment à la Gnome or IceWM, etc...).
I suggest installing GTK usig the package system (e.g. using aptitude install on Ubuntu) with a network connection (perhaps using a chroot-ed environment) to understand all the dependencies.

g-ir-scanner fails to generate gir-file

I am trying to generate a .gir-file from a very simple library; it's basically the GObject example from the GLib documentation. When using g-ir-scanner, it fails with the follwing error:
$ g-ir-scanner -I./ --library=foo --library-path=./ --pkg=gobject-2.0 --namespace=Foo -o foo-bar.gir foo-bar.c foo-bar.h
g-ir-scanner: compile: gcc -Wall -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64- linux-gnu/glib-2.0/include -I./ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib- 2.0/include -c -o /home/roman/Documents/own_gobject/tmp-introspectEx3pzw/Foo-None.o /home/roman/Documents/own_gobject/tmp-introspectEx3pzw/Foo-None.c
g-ir-scanner: link: gcc -o /home/roman/Documents/own_gobject/tmp-introspectEx3pzw/Foo-None /home/roman/Documents/own_gobject/tmp-introspectEx3pzw/Foo-None.o -L. -Wl,-rpath=. - lfoo -L./ -Wl,--export-dynamic -pthread -lgio-2.0 -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0
ERROR: can't resolve libraries to shared libraries: foo
I have really no idea what went wrong. Any ideas?
This is a bug in g-ir-scanner (https://bugzilla.gnome.org/show_bug.cgi?id=699442). Basically foo-bar does not contain any GObject classes and it has failed. A class is detected by having a function called foo_blah_get_type().
the --library argument of g-ir-scanner needs the name of the shared object - for instance, libfoo.so, or libfoo.la if you're using libtool in your build environment.

Can't install PackETH on Fedora 8

I want to install packETH on Fedora 8.
The command sudo yum install packETH doesn't work because no package is available.
I tried to download the source code and compile, but the following error appears:
gcc -g -O2 -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lrt -lglib-2.0 -o packETH src/main.o src/support.o src/interface.o src/callbacks.o src/function.o src/function_send.o src/loadpacket.o src/savepacket.o -lpthread -lm
src/callbacks.o: In function `on_button92_clicked':
/home/hartes/packETH-1.7/src/callbacks.c:4807: undefined reference to `gtk_show_uri'
collect2: ld returned 1 exit status
make[1]: *** [packETH] Error 1
make[1]: Leaving directory `/home/hartes/packETH-1.7'
make: *** [all] Error 2
[root#proj-119 packETH-1.7]#
I don't know how to solve this problem :undefined reference to gtk_show_uri.
taken from here: http://packeth.sourceforge.net/packeth/Installation.html
Compile problems:
1) undefined error to :gtk_show_uri
This is due to some old versions of gtk on some distributions (Centos 5.5 for example).
Open the callbacks.c file in the src directory, and inside the function on_button92_clicked comment out or delete the line that starts with gtk_show_uri...
But that means the donate button won’t work and this is bad luck for you, because you won’t be able to donate me!

how to force linking on linux libgpod and rhythmbox

Ok, I've added some functionality to a linux library.
However even after 'make install' the program I'm trying to confirm functionality is linking to the previous version.
So 'make install' puts my libraries here:
'/usr/local/lib'
and
'/usr/local/include'
I used the following on configure:
./configure --enable-maintainer-mode --enable-uninstalled-build 'CFLAGS=-g -O0' 'CXXFLAGS=-g -O0' 'JFLAGS=-g -O0' 'FFLAGS=-g -O0' CPPFLAGS='-L /usr/local/lib/ -I /usr/local/include/gpod-1.0/'
But when I try to execute the program I get 'Symbol not found' and 'Plugin can not load'
When I ldd the produced plugin so:
~/Development/rhythmbox/plugins/ipod/.libs$ ldd libipod.so
linux-gate.so.1 => (0x00d97000)
librhythmbox-core.so.1 => /home/gary/Development/rhythmbox/shell/.libs/librhythmbox core.so.1 (0x009ad000)
libgpod.so.4 => /usr/lib/libgpod.so.4 (0x00509000)
The emphasis being stressed because it's obviously linking to the wrong library... When I look in the make file I see the following:
IPOD_CFLAGS = -pthread -I/usr/local/include/gpod-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12
IPOD_LIBS = -pthread -L/usr/local/lib -lgpod -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -lpng12 -lgthread-2.0 -lrt -lglib-2.0
So the CPPFLAGS are being passed through to the plugin, and in .deps I see the proper header file being included... IE:
~/Development/rhythmbox/plugins/ipod/.deps$ less rb-ipod-source.Po | grep gpod
/usr/local/include/gpod-1.0/gpod/itdb.h ../../lib/eel-gconf-extensions.h
/usr/local/include/gpod-1.0/gpod/itdb.h:
Ubuntu 10.10
Any ideas?
You need to set LD_RUN_PATH to /usr/local/lib before running configure and make. This will embed /usr/local/lib as a shared library search path into the executable.
libgpod.so is pointing to the old version of the library.

Resources