Problem compiling root 4.01.04 with gcc 3.4.2

HI,

I am trying to compile root v4.01.04 using gcc 3.4.2 running on a Fedora Core 3 system.
I seem to be getting a problem with the inline assembly part of asimage.c. The exact error is:

gcc -O3 -DNO_DEBUG_OUTPUT -fPIC -Iinclude -Iinclude -Iinclude -I/usr/X11R6/include -c asimage.c -o asimage.o
asimage.c: In function mmx_init': asimage.c:120: error: PIC registerebx’ clobbered in asm' make[1]: *** [asimage.o] Error 1 make[1]: Leaving directory/home/wplano/root/asimage/src/libAfterImage’
make: *** [asimage/src/libAfterImage/libAfterImage.a] Error 2

I’ve tried removing the offending clobber from root/asimage/src/libAfterImage/asimage.c but after I re-make my change appears to be undone.

Where can I remove this clobber permanently (or is this not a safe thing to do?)

Thanks,

Will.

PS. Can anyone tell me what a clobber is exactly? :slight_smile:

Hi Will,

to temporarily disable this asm code, you have to untar the libAfterImage.tar.gz, make this fix. retar and rebuild ROOT.

I am in the process of installing FC3 and will investigate this problem once I get it running.

Cheers, Fons.

Below is a reply from Sasha Vasko to my inquiry

When I try to compile libAfterImage provided with ROOT
(root.cern.ch) on Fedora Core 3 with gcc 3.4.2
I get the following error
gcc -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -
I/usr/X11R6/include
-c asimage.c -o asimage.o
asimage.c: In function mmx_init': asimage.c:120: error: PIC register ebx’ clobbered in `asm’
make: *** [asimage.o] Error 1

I appreciate your comments/suggestions/solutions.

./configure --disable-mmx-optimization

should help you.

Otherwise I have no idea why you get the error - probably some new gcc
hiccup. I guess you also try and comment out lines with ebx in mmx_init()

Sasha

Commenting line 136 in asimage.c
// : “ebx”, “ecx”, “edx”
helped without adverse effects so far.

Michal

Where can I get that libAfterImage.tar.gz file?

Thank you,

Ivana

This file is included in the standard distribution and CVS.
When you install ROOT with the default options, this tar file is automatically untared and the corresponding Makefile executed.

Rene

Thank you, Rene, I see now the file, but it is still not clear to me how to fix the problem, reported by Will (that I need to solve, too).

Fons wrote:
"to temporarily disable this asm code, you have to untar the libAfterImage.tar.gz, make this fix. retar and rebuild ROOT."
What fix should I make here after untaring the file?

I tried also suggestion by “ml”:
./configure --disable-mmx-optimization
but this option was refused by configure.

I have Root v4.01.04a.

Thank you,

Ivana

This problem was fixed in CVS by Fons

Rene