This is the mail archive of the 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 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
>  il.0.18 was not listed but 0.16 etc .i might be wrong.

il -> isl.

isl-0.18.tar.bz2 is in

>  ./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

/* snip */

> [pb@dendrite gcc-8.1.0]$ wget
> --directory=/home1/pb/gcc-8.1.0
> --2018-05-21 11:24:24--
>            => “/home1/pb/gcc-8.1.0/gmp-6.1.0.tar.bz2.1”
> Resolving
> Connecting to||: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:
Xi Ruoyao <>
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]