Compile error on AMD running Fedora 4

Hi,

I try to compile Radiance (3R6P1)on a AMD Athlon 3400+, with Fedora 4
installed. Something goes wrong and I don't know what causes this:

/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when
searching for -lX11
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.a when
searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

What could be possible wrong here?

And, does anybody has a suggestion to improve the compile options in
rmake on a 64 bit AMD3400+ processor?

Does it make sense to make the binairies (when I get them compiled :wink:
available for this platform? I could put them on a server.

Thanks,
Iebele

Current rmake command is:
#!/bin/sh
exec make "SPECIAL=" \
        "OPT=-m64 -O3 -mfpmath=sse -DSPEED=200" \
        "MACH=-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib
-I/usr/include/X11 -DNOSTEREO" \
        ARCH=IBMPC "COMPAT=bmalloc.o erf.o getpagesize.o" \
        INSTDIR=/usr/local/bin \
        LIBDIR=/usr/local/lib/ray \
        ESUFFIX= \
        CC=gcc "$@" -f Rmakefile

Hi Lebele,

Sounds like you have a compatibility issue between different versions of X11. Try changing the "-I/usr/include/X11" in your rmake to "-I/usr/X11R6/include" and see if that works. (You'll have to run "makeall clean" beforehand.)

-Greg

···

From: iebele <[email protected]>
Date: June 27, 2005 1:07:11 AM BDT

Hi,

I try to compile Radiance (3R6P1)on a AMD Athlon 3400+, with Fedora 4
installed. Something goes wrong and I don't know what causes this:

/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when
searching for -lX11
/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.a when
searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

What could be possible wrong here?

And, does anybody has a suggestion to improve the compile options in
rmake on a 64 bit AMD3400+ processor?

Does it make sense to make the binairies (when I get them compiled :wink:
available for this platform? I could put them on a server.

Thanks,
Iebele

Current rmake command is:
#!/bin/sh
exec make "SPECIAL=" \
        "OPT=-m64 -O3 -mfpmath=sse -DSPEED=200" \
        "MACH=-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib
-I/usr/include/X11 -DNOSTEREO" \
        ARCH=IBMPC "COMPAT=bmalloc.o erf.o getpagesize.o" \
        INSTDIR=/usr/local/bin \
        LIBDIR=/usr/local/lib/ray \
        ESUFFIX= \
        CC=gcc "$@" -f Rmakefile

iebele wrote:

Hi,

I try to compile Radiance (3R6P1)on a AMD Athlon 3400+, with Fedora 4
installed. Something goes wrong and I don't know what causes this:

/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when
searching for -lX11

In case your OS is also a 64bit one, try replacing the X11 library path with the 64-equivalent, i.e. write
-L/usr/X11R6/lib64 instead of -L/usr/X11R6/lib in your 'rmake' script
(at least it worked here on an Athlon3300 with Suse 9.2 64 bit...)

-cb

Hi Greg,

Thanks for your reply, I tried your suggestion, but that did not change
anything. I got the same errors during the process of makeall.
However, your reply inspired me to look more closely in /usr/X11R6
(/usr/include/X11 is just a symbolic link to /usr/X11R6 ), where I found
two different 'lib' directories:
/usr/X11R6/lib
/usr/X11R6/lib64 (the one to use for 64bit machines)

I changed my rmake file as below and everything compiled witout errors

#!/bin/sh
exec make "SPECIAL=" \
        "OPT=-m64 -O3 -mfpmath=sse -DSPEED=200" \
        "MACH=-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib64
-I/usr/X11R6/include -DNOSTEREO" \
        ARCH=IBMPC "COMPAT=bmalloc.o erf.o getpagesize.o" \
        INSTDIR=/usr/local/bin \
        LIBDIR=/usr/local/lib/ray \
        ESUFFIX= \
        CC=gcc "$@" -f Rmakefile

The resulting binairies are now available at:
http://www.toren.com/radiance/R31P6_Fedora4_AMD64.tar.gz
(without trad, I don't have wish installed).

Thanks,

Iebele

···

On Mon, 2005-06-27 at 09:55 +0100, Gregory J. Ward wrote:

Hi Lebele,

Sounds like you have a compatibility issue between different versions
of X11. Try changing the "-I/usr/include/X11" in your rmake to "-I/
usr/X11R6/include" and see if that works. (You'll have to run
"makeall clean" beforehand.)

-Greg

> From: iebele <[email protected]>
> Date: June 27, 2005 1:07:11 AM BDT
>
> Hi,
>
> I try to compile Radiance (3R6P1)on a AMD Athlon 3400+, with Fedora 4
> installed. Something goes wrong and I don't know what causes this:
>
> /usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when
> searching for -lX11
> /usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.a when
> searching for -lX11
> /usr/bin/ld: cannot find -lX11
> collect2: ld returned 1 exit status
>
> What could be possible wrong here?
>
> And, does anybody has a suggestion to improve the compile options in
> rmake on a 64 bit AMD3400+ processor?
>
> Does it make sense to make the binairies (when I get them compiled :wink:
> available for this platform? I could put them on a server.
>
>
> Thanks,
> Iebele
>
>
> Current rmake command is:
> #!/bin/sh
> exec make "SPECIAL=" \
> "OPT=-m64 -O3 -mfpmath=sse -DSPEED=200" \
> "MACH=-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib
> -I/usr/include/X11 -DNOSTEREO" \
> ARCH=IBMPC "COMPAT=bmalloc.o erf.o getpagesize.o" \
> INSTDIR=/usr/local/bin \
> LIBDIR=/usr/local/lib/ray \
> ESUFFIX= \
> CC=gcc "$@" -f Rmakefile

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Carsten ,

I just just found it out myself, see me reply on Greg's message.
Thanks, anyways, for you reply.
Did you change any other options in rmake, for optimizing 64bit ?

Iebele

···

On Mon, 2005-06-27 at 11:45 -0700, Carsten Bauer wrote:

iebele wrote:

>Hi,
>
>I try to compile Radiance (3R6P1)on a AMD Athlon 3400+, with Fedora 4
>installed. Something goes wrong and I don't know what causes this:
>
>/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when
>searching for -lX11
>
>

In case your OS is also a 64bit one, try replacing the X11 library path
with the 64-equivalent, i.e. write
-L/usr/X11R6/lib64 instead of -L/usr/X11R6/lib in your 'rmake' script
(at least it worked here on an Athlon3300 with Suse 9.2 64 bit...)

-cb

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

iebele wrote:

Hi Carsten ,

I just just found it out myself, see me reply on Greg's message.
Thanks, anyways, for you reply.

sorry for the repetition.. but when.looking at the timestamp it's funny that I haven't received that message yet when I wrote my answer...(I occasionally noticed unpredictable delays of message deliveries before, e.g. receiving a reply before the question itself..:slight_smile: )

-cb

PS: so far I haven't yet looked for or tried any 64bit specific compiler optimization. I'm a 64 bit newbie as well...

iebele wrote:

Current rmake command is:
#!/bin/sh
exec make "SPECIAL=" \
        "OPT=-m64 -O3 -mfpmath=sse -DSPEED=200" \
        "MACH=-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib
-I/usr/include/X11 -DNOSTEREO" \
        ARCH=IBMPC "COMPAT=bmalloc.o erf.o getpagesize.o" \
        INSTDIR=/usr/local/bin \
        LIBDIR=/usr/local/lib/ray \
        ESUFFIX= \
        CC=gcc "$@" -f Rmakefile

What version of gcc is installed on your system?
Check using gcc -v

Looking at the man page for gcc-3.4 on my Debian (Athlon XP) system, I'd suggest the following settings:

-march=k8 to enable the AMD64 instructions, implies the same
    argument to -mtune.

-msse2 to enable SSE2 instructions. Without this, the -mfpmath=sse
    option is useless.

-mfpmath=sse,387 this will give you a boost if the SSE unit is separate
    from the old x87 unit but I don't know enough about the K8
    architecture to know if it does. It will try to use both
    execution units, but the man page says it still
    experimental.

-ffast-math the man page says this is dangerous but I've never noticed any problems myself. Try it if you want.

Apart from that, wait for upcoming GCC-4.x releases to flesh out its optimisation features, in particular auto vectorization. The SSE2 instruction set can handle double precision FP math, better than the single precision in SSE or Altivec. You should theoretically be able to get some pretty awesome performance out of that processor. Reality is another matter though... :frowning:

My other suggestion would be to check out some Gentoo web sites. Those guys are nuts about compiler optimisations :stuck_out_tongue:

bye

Hi Ian,

I used your recommended gcc options an got an rendering speed improvement of 1.035. That is 3.5 % (!).
I used gcc 4.0(etc, I dont know exactly) but did not find any option like "auto vectorization". We'll have to wait for that coming up in the future i think.
Thanks a lot for figuring out these settings so far !

Iebele

Ian Tester wrote:

···

iebele wrote:

Current rmake command is:
#!/bin/sh
exec make "SPECIAL=" \
        "OPT=-m64 -O3 -mfpmath=sse -DSPEED=200" \
        "MACH=-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib
-I/usr/include/X11 -DNOSTEREO" \
        ARCH=IBMPC "COMPAT=bmalloc.o erf.o getpagesize.o" \
        INSTDIR=/usr/local/bin \
        LIBDIR=/usr/local/lib/ray \
        ESUFFIX= \
        CC=gcc "$@" -f Rmakefile

What version of gcc is installed on your system?
Check using gcc -v

Looking at the man page for gcc-3.4 on my Debian (Athlon XP) system, I'd suggest the following settings:

-march=k8 to enable the AMD64 instructions, implies the same
        argument to -mtune.

-msse2 to enable SSE2 instructions. Without this, the -mfpmath=sse
        option is useless.

-mfpmath=sse,387 this will give you a boost if the SSE unit is separate
        from the old x87 unit but I don't know enough about the K8
        architecture to know if it does. It will try to use both
        execution units, but the man page says it still
        experimental.

-ffast-math the man page says this is dangerous but I've never noticed any problems myself. Try it if you want.

Apart from that, wait for upcoming GCC-4.x releases to flesh out its optimisation features, in particular auto vectorization. The SSE2 instruction set can handle double precision FP math, better than the single precision in SSE or Altivec. You should theoretically be able to get some pretty awesome performance out of that processor. Reality is another matter though... :frowning:

My other suggestion would be to check out some Gentoo web sites. Those guys are nuts about compiler optimisations :stuck_out_tongue:

bye

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi,

It might also be worth checking Mark Stock's benchmark page:

http://mark.technolope.org/pages/rad_bench.html

for some other compile options.

-Jack

atelier iebele abel wrote:

···

Hi Ian,

I used your recommended gcc options an got an rendering speed improvement of 1.035. That is 3.5 % (!).
I used gcc 4.0(etc, I dont know exactly) but did not find any option like "auto vectorization". We'll have to wait for that coming up in the future i think.
Thanks a lot for figuring out these settings so far !

Iebele

Ian Tester wrote:

iebele wrote:

Current rmake command is:
#!/bin/sh
exec make "SPECIAL=" \
        "OPT=-m64 -O3 -mfpmath=sse -DSPEED=200" \
        "MACH=-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib
-I/usr/include/X11 -DNOSTEREO" \
        ARCH=IBMPC "COMPAT=bmalloc.o erf.o getpagesize.o" \
        INSTDIR=/usr/local/bin \
        LIBDIR=/usr/local/lib/ray \
        ESUFFIX= \
        CC=gcc "$@" -f Rmakefile

What version of gcc is installed on your system?
Check using gcc -v

Looking at the man page for gcc-3.4 on my Debian (Athlon XP) system, I'd suggest the following settings:

-march=k8 to enable the AMD64 instructions, implies the same
        argument to -mtune.

-msse2 to enable SSE2 instructions. Without this, the -mfpmath=sse
        option is useless.

-mfpmath=sse,387 this will give you a boost if the SSE unit is separate
        from the old x87 unit but I don't know enough about the K8
        architecture to know if it does. It will try to use both
        execution units, but the man page says it still
        experimental.

-ffast-math the man page says this is dangerous but I've never noticed any problems myself. Try it if you want.

Apart from that, wait for upcoming GCC-4.x releases to flesh out its optimisation features, in particular auto vectorization. The SSE2 instruction set can handle double precision FP math, better than the single precision in SSE or Altivec. You should theoretically be able to get some pretty awesome performance out of that processor. Reality is another matter though... :frowning:

My other suggestion would be to check out some Gentoo web sites. Those guys are nuts about compiler optimisations :stuck_out_tongue:

bye

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

--
# John E. de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction