This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regarding download_prerequisite


On 2018-05-21 11:35 +0530, Priya Shrivastava wrote:
> I am a newbie so please bear with me. I ssh to centos 6.5(RHEL) and wants
> to upgrade gcc as nonroot user. I have downloaded gcc-8.1.0 tar.bz from
> mirrors but i am not able to run this download_prerequisite script .these
> are error i got while running it Please help anyone
> 
> i also noticed that this script have  il version 0.18 while at server
> gcc.gnu.org....  il.0.18 was not listed but 0.16 etc .i might be wrong.

il -> isl.

isl-0.18.tar.bz2 is in ftp://gcc.gnu.org/pub/gcc/infrastructure/.

>  ./contrib/download_prerequisites
> --directory=home1/pb/gcc-8.1.0             error: No such directory:
> home1/pb/gcc-8.1.0
> [pb@dendrite gcc-8.1.0]$ ./contrib/download_prerequisites
> --directory=/home1/pb/gcc-8.1.0
> gmp-6.1.0.tar.bz2: FAILED

/* snip */

> [pb@dendrite gcc-8.1.0]$ ./contrib/download_prerequisites --no-verify
> --directory=/home1/pb/gcc-8.1.0
> tar: This does not look like a tar archive
> 
> bzip2: Compressed file ends unexpectedly;
>         perhaps it is corrupted?  *Possible* reason follows.
> bzip2: Function not implemented
>         Input file = (stdin), output file = (stdout)
> 
> It is possible that the compressed file(s) have become corrupted.
> You can use the -tvv option to test integrity of such files.
> 
> You can use the `bzip2recover' program to attempt to recover
> data from undamaged sections of corrupted files.
> 
> tar: Child returned status 2
> tar: Error is not recoverable: exiting now
> error: Cannot extract package from gmp-6.1.0.tar.bz2

You have a broken gmp-6.1.0.tar.bz2.  Maybe it was not downloaded
completely.

/* snip */

> [pb@dendrite gcc-8.1.0]$ wget
> ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
> --directory=/home1/pb/gcc-8.1.0
> --2018-05-21 11:24:24--
> ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
>            => “/home1/pb/gcc-8.1.0/gmp-6.1.0.tar.bz2.1”
> Resolving gcc.gnu.org... 209.132.180.131
> Connecting to gcc.gnu.org|209.132.180.131|:21... failed: Connection timed
> out.
> Retrying.

/* snip */

It seems your network environment is not good. 

> [pb@dendrite gcc-8.1.0]$ export http_proxy=http://xxxxxxxxxxxxx_xx
> [pb@dendrite gcc-8.1.0]$ export http_proxy=http://xxxxxxxxxxxxx@xxxxxxxxx_xx

wget only uses http_proxy for HTTP connections.  It won't work
since download_prerequisite uses FTP URLs.

Try to replace FTP with HTTP:

cd /path/to/gcc-8.1.0

    sed -i contrib/download_prerequisite \
        -e '/base_url=/s/ftp/http/'

Clean the downloaded (and broken) packages:

    find -name \*.tar.\* -delete

Then use download_prerequiste with proxy:

    http_proxy=http://xxxx@xxxx contrib/download_prerequiste

Or get the packages from upstream:

https://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2
https://ftp.gnu.org/gnu/gmp/gmp-6.1.1.tar.bz2
https://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
https://isl.gforge.inria.fr/isl-0.18.tar.bz2
-- 
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]