Impossible to compile libAfterImage on debian

Hi Rooters

I am using a Debian distro 1:3.3.5, gcc version is 3.3.5 and I tried to compile root 5.17.

Since I haven’t got libAfterImage library on my platform, the configure utility decided to use the builtin libAfterImage (libAfterImage is used by ASImage and is mandatory to use icons on widgets for instance). Compilation stopped with the following message:

gcc -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -I/usr/X11R6/include -c import.c -o import.o
import.c: In function gif2ASImage': import.c:1673: error: structure has no member namedFunction’

I have the same problèm with root 5.16

Since I cannot install libAfterImage on my own, I built it from source but cannot tell ROOT where to look for the library (there is no flag --with-afterimage in the configure utility).

I checked it was due to libAfterImage since when I disabled it using the 2 following flags --disable-asimage --disable-builtin-afterimage
Root compiled. But then of course when I tried to use some object with xpm pictures (a TBrowser for instance) it crashed.

Any help on how to compile the builtin libAfterImage library or how to use one in a non-standard location would be appreciated.

Regards

Hi,
try to run configure with “builtin-afterimage” as:
./configure --enable-builtin-afterimage
Do you have libAfterImage installed “system wide” on your machine?

Regards. Valeriy

Hi Valeriy

Sorry to answer you so late, but my profile on RootTalk forum has changed recently.
To answser your question, I have fixed my problem but it took me some workaround:

  1. I do not have “system wide” libAfterImage on my machine and after building my own local version (not system wide since I don’t have root access) , I cannot give information to the “configure” script about its location. There is no --with-libatferimage flags.

  2. Therefore I have to build the one provided by Root in the asimage directory. I therefore ran “configure --enable-builtin-afterimage” before using make but this is where it breaks whith the message:

gcc -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -I/usr/X11R6/include -c import.c -o import.o
import.c: In function gif2ASImage': import.c:1673: error: structure has no member namedFunction’

  1. But if I untar libAfterImage.tar.gz by myslf (instead of letting the Makefile doing it) and tried to build libAfterImage, it works! What I did was exactly this:

cd root
./configure --enable-asimage --enable-builtin-afterimage (and other flags)
cd asimage/src
tar zxvf libAfterImage.tar.gz
cd libAfterImage
./configure --enable-sharedlibs --enable-staticlibs
make
cd …/…/…
make

It looks like in the makefile for building libAfterImage, the "configure’ doesn’t use the same flags as I do, may be somthing related to “gif” pictures. The way I do it works though.

Regards

Hi,
OK. I see the problem. We are using modified , built-in libungif.
Seems here is a clash.
libAfterImage must be compiled --with-builtin-ungif flag.
I’ll check it.

Regards. Valeriy

Hi Matthieu,
could you try the following:

  • edit asimage/Makefile.mk
  • add after “–with-ungif " " --with-builtin-ungif”
  • touch asimage/src/libAfterImage.tar.gz
  • make

Then libAfetrImage will be reconfigured and recompiled.
At configure libAfterImage you must see the string:
“checking using built-in UNGIF library… yes”

Keep in touch.

HTH. Regards. Valeriy

Hi Valeriy

I have tried what you said but it doesn’t work. There is no “checking using built-in UNGIF library… yes” message. I also tried to do “configure --with-builtin-ungif --with-ungif” directly inside the libAfterImage directory but I have the same output.

However, if I do a “–with-builtin-ungif” without the flag --with-ungif, then everything is fine. The “–with-ungif” tries to find a system wide liibungif library and totally disable the search of local one, no matter if a flag --with-builtin-ungif exists or not.

so in the asimage/Module.mk, I just replaced (instead of adding) the line "–with-ungif " with “–with-builtin-ungif” and everything works well.

Regards

thanks a lot. We will correct Makefile.mk (Fons?)

This is the first time this fails. Currently we detect a local ungif (in configure), if that is there we use that. If it is not there then the libAfterImage will use automatically the builtin one. Why is on your platform libunfig incompatible? Which version do you have installed?

Cheers, Fons.

Hi Fons

First time it fails for me also (and I have compiled ROOT on a LOT of different platforms including SunOS, AIX, HP-UX, OSF1, IRIX and many different Linux distro flavors). I changed job, and on the machines they have (from the /proc/version file): Linux version 2.6.14-mm1 gcc version 3.3.5 (Debian 1:3.3.5-13)

I don’t know where to look for the libungif version. May be from the gif_lib.h file?

Then on my system it says:
#define GIF_LIB_VERSION " Version 2.0, "

whereas on the libungif provided by ROOT it reads:
#define GIF_LIB_VERSION " Version 4.0, "

But if I look at the shared library on my system, I see /usr/lib/libungif.so -> libgif.so.3.0

Regards