Con (intentar) instal·lar Gimpshop en Ubuntu

Tinc un familiar que encara que té instal·lat Ubuntu no fa servir el Gimp perquè no li agrada la seua interfície. Més bé perquè no té ganes, perquè quan ha d’aprendre a fer servir un programa GNU/Linux editor de música o un de baixades P2P, llavors sí ho fa.

Està estudiant disseny industrial.

La qüestió és que en el seu lloc fa servir el *****shop (TM), però això l’obliga a treballar en un sistema operatiu privatiu tipus **dows (TM) amb tot el que això suposa de problemes de seguretat i privacitat.

Fa poc em vaig assabentar d’un fork del programa gimp, el Gimpshop. Bàsicament del que es tracta és d’agafar el gimp i canviar-li la interfície perquè siga com la del *****shop (pantalles ací). LLavors vaig pensar que això era el que calia perquè el meu familiar deixara d’usar tant el programa editor d’imatges com el sistema operatiu privatiu. Perfecte.

Però tot no han estat roses. Us explique els problemes que he tingut per compilar el gimpshop en el meu sistema operatiu GNU/Linux, en Ubuntu:

Primer de tot em vaig baixar l’última versió del gimpshop des d’ací.

Vaig descomprimir el paquet amb la comanda:
$ tar -jxf gimp-2.2.8.tar.bz2

Vaig canviar-me de directori:
$ cd gimp-2.2.8

I vaig intentar configurar la instal·lació amb la comanda:
$ sudo ./configure

Començaren els problemes. La comanda anterior va generar el següent log:

checking for dlfcn.h… yes
checking for g++… no
checking for c++… no
checking for gpp… no
checking for aCC… no
checking for CC… no
checking for cxx… no
checking for cc++… no
checking for cl… no
checking for FCC… no
checking for KCC… no
checking for RCC… no
checking for xlC_r… no
checking for xlC… no
checking whether we are using the GNU C++ compiler… no
checking whether g++ accepts -g… no
checking dependency style of g++… none
checking how to run the C++ preprocessor… /lib/cpp
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
See `config.log’ for more details.

Val, em faltava el compilador g++. Llavors:
$ sudo apt-get install g++-4.0
I després d’instal·lar el compilador, altra vegada la comanda:
$ sudo ./configure

En aquest cas l’execució es parava quan arribava al següent log:

checking for IceConnectionNumber in -lICE… yes
checking for pkg-config… (cached) /usr/bin/pkg-config
checking for GTK+ - version >= 2.4.4… no
*** Could not run GTK+ test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error: Test for GTK+ failed. See the file ‘INSTALL’ for help.

Val. Em faltava la llibreria gtk+ per poder executar el gimp. Llavors:
$ sudo apt-get install libgtk2.0-dev

En aquest cas l’execució de la comanda s’aturava en arribar al següent tros de log:

checking libmng.h presence… yes
checking for libmng.h… yes
checking for EXIF_CFLAGS…
checking for EXIF_LIBS…
configure: WARNING: libexif not found!
EXIF support will not be built into the JPEG plug-in.
libexif is available from http://www.sourceforge.net/projects/libexif
checking for aa_printf in -laa… no
configure: WARNING: *** AA plug-in will not be built (AA library not found) ***
checking for XpmReadFileToXpmImage in -lXpm… no
configure: WARNING: *** XPM plug-in will not be built (XPM library not found) ** *
checking for GTKHTML2_CFLAGS…
checking for GTKHTML2_LIBS…
configure: WARNING: *** Help browser plug-in will not be built (GtkHtml2 not fou nd) ***
checking for SVG_CFLAGS…
checking for SVG_LIBS…
configure: WARNING: *** SVG import plug-in will not be built (librsvg not found) ***
checking for gimpprint-config… no
checking for GIMP-PRINT - version >= 4.2.0… no
*** The gimpprint-config script installed by GIMP-PRINT could not be found
*** If GIMP-PRINT was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GIMPPRINT_CONFIG environment variable to the
*** full path to gimpprint-config.
configure: error:
*** Check for libgimpprint failed. You can download it from
*** http://gimp-print.sourceforge.net/ or you can build without it by passing
*** –disable-print to configure (but you won’t be able to print then).

Mirant tots els warnings del log, vaig veure que em faltaven unes quantes llibreries. Llavors:
$ sudo apt-get install libexif-dev libexit-gtk-dev libaa1-dev libxpm-dev libgtkhtml2-dev librsvg2-dev livwmf-dev

Després de la instal·lació altra vegada:
$ sudo ./configure
i aquesta vegada sense cap problema.

Doncs tocava continuar amb la instal·lació:
$ sudo make

En fer en make van aparéixer uns missatges al log que no havia vist mai i acabaven així:

gimp-composite-mmx.c:1279: error: unknown register name ‘%mm1’ in ‘asm’
make[3]: *** [gimp-composite-mmx.o] Error 1
make[3]: Leaving directory `/home/vicent/Desktop/temp/gimp-2.2.8/app/composite’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/vicent/Desktop/temp/gimp-2.2.8/app’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vicent/Desktop/temp/gimp-2.2.8′
make: *** [all] Error 2

Cercant per internet vaig comprovar que era un bug. Bàsicament, el problema és del compilador gcc en les versions 4.x que és el que tinc al meu Ubuntu versió Breezy:
$ gcc -v
gcc versió 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)

La qüestió és, pel que he ogut llegir, que durant la compilació no es detecten bé els registres mmx i/o msse que té el meu processador (pentium IV). No és bona idea tampoc compilar amb opcions -mmx -msse per evitar la detecció d’aquestos registres, perquè llavors el codi compilat pot no ser el que necessita la meua màquina. Més informació al respecte.

Tampoc no han servit de res els pedaços que he trobat ací per a solucionar aquest bug. Els pedaços consisteixen a afegir al fitxer: configure.in del directori arrel del gimp aquesta funció al final de la secció Check for MMX assembly:

if test “x$enable_mmx” = xyes; then

mmx_flag=
for flag in ‘-mmmx’; do
if test -z “$mmx_flag”; then
mmx_save_CFLAGS=”$CFLAGS”
CFLAGS=”$mmx_save_CFLAGS $flag”
AC_MSG_CHECKING([whether [$]CC understands [$]flag])
AC_TRY_COMPILE([], [], [mmx_flag_works=yes], [mmx_flag_works=no])
AC_MSG_RESULT($mmx_flag_works)
CFLAGS=”$mmx_save_CFLAGS”
if test “x$mmx_flag_works” = “xyes”; then
CFLAGS=”$CFLAGS $flag”
fi
fi
done

if test “x$enable_sse” = xyes; then

sse_flag=
for flag in ‘-msse’; do
if test -z “$sse_flag”; then
sse_save_CFLAGS=”$CFLAGS”
CFLAGS=”$sse_save_CFLAGS $flag”
AC_MSG_CHECKING([whether [$]CC understands [$]flag])
AC_TRY_COMPILE([], [], [sse_flag_works=yes], [sse_flag_works=no])
AC_MSG_RESULT($sse_flag_works)
CFLAGS=”$sse_save_CFLAGS”
if test “x$sse_flag_works” = “xyes”; then
CFLAGS=”$CFLAGS $flag”
fi
fi
done

fi

fi

I afegir també un nou DEFINE al fitxer Makefile.am del directori gimp/app/composite/. Exactament aquest:

$(MMX_EXTRA_CFLAGS)

Allà diuen que aquest pedaç sí funciona però a mi no m’han funcionat.

Res, que el meu familiar haurà d’esperar a que els programadors del GCC solucionen aquest problema en una nova versió per a poder gaudir del gimpshop. (En Barrapunto diuen que ja hi ha nova versió amb data 29/09/2005) Tinguem esperança i paciència.

Salut!

«Tornar enrere