views:

32

answers:

1

I tryied to build gcc 4.5.0 on Linux version 2.6.18-164.6.1.el5, and found the following problems that I couldn't find an answer on Google. I used the following command.

../gcc-4.3.5/configure --prefix=/usr --prefix=/apps --with-gmp=/apps --with-mpc=/apps --with-mpfr=/apps --enable-shared --enable-threads=posix make -j 8

Here is the part when it complained about the error

...

cp: preserving ACL for `./asm/org/objectweb/asm/ClassAdapter.class': Operation not supported

cp: preserving permissions for `./asm/org/objectweb/asm': Operation not supported

cp: preserving permissions for `./asm/org/objectweb': Operation not supported

cp: preserving permissions for `./asm/org': Operation not supported

cp: preserving permissions for `./asm': Operation not supported

make[6]: * [tools.zip] Error 1

make[6]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava/classpath/tools'

make[6]: Entering directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava/classpath'

true DO=all multi-do # make

make[6]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava/classpath'

make[5]: * [all-recursive] Error 1

make[5]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava/classpath'

make[4]: * [all-recursive] Error 1

make[4]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/32/libjava'

make[3]: * [multi-do] Error 1

make[3]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/libjava'

make[2]: * [all-multi] Error 2

make[2]: Leaving directory `/home/gl/gcc4.3obj/x86_64-unknown-linux-gnu/libjava'

make[1]: * [all-target-libjava] Error 2

make[1]: Leaving directory `/home/gl/gcc4.3obj'

make: * [all] Error 2

Any clarification and help will be highly appreciated. Thank you.

A: 

You say you're building gcc 4.5.0 but your error messages and ./configure line suggest that you are instead building gcc 4.3.5. I point this out because it's possible you have tripped over a bug in gcc 4.3.x's build scripts.

Second, the error messages you quoted make me think that you are doing your build on a weird file system, or else you have a buggy cp (unlikely but not impossible). What sort of file system is /home? You can find out with the mount command -- type it with no arguments, look for the /home line, see what it says next to "type". I have this:

/dev/sda3 on /home type ext4 (rw)

ext2, ext3, ext4, btrfs, xfs, and jfs should not be troublesome; anything else might well be for this use.

By the way, the precise version of your kernel ("Linux version 2.6.18-164.6.1.el5") is very unlikely to be relevant; for this sort of problem it would be much more useful to know which distribution you are using, and the version of that.

Zack
Thank you for your quick response. You were right, it's 4.3.5, but the same problems happened when I tried to build 4.5.0 in another directory at the beginning, and then I downloaded 4.3.5 to have another try.Here is the output from mount,nfs-1:/p0/home/gl on /home/gl type nfs (rw,addr=10.1.0.3)The distribution is from redhatCentOS release 5.4 (Final)Again, thank you very much.
xatan
NFS? Oho. Are you doing your build as root? Never do that. Always compile and test as a normal user; only do `make install` as root. This is not just for safety - lots of projects' build systems break (as you have seen) if you run the compilation phase as root, especially if you're working out of NFS, which normally maps root-on-the-client to a totally unprivileged user ID on the server. (By the way, your build will be *orders of magnitude* faster if you put the build directory on a local disk. It's okay to have the source on NFS.)
Zack
No. I am not the root, and that's why I have to specify the prefix in configure. I connect to the server as a normal user, and so I have access only to /apps and my home directory.Do you think the cp command is the reason for the error?Thank you.
xatan
It's possible that the real error is some way above the errors you quoted. But the first thing I would try is putting the build directory on a local disk.
Zack
Thank you. I don't have the write access to other disks on the server. I will see if there is another way around this.
xatan