# gcc  4.6 upgrade problem



## roelof (Jun 12, 2012)

Hello, 

When I try to update lang/gcc46 I get this message: 

```
Making GCC 4.6.4.20120608 for FreeBSD 9.0  target=x86_64-portbld-freebsd9.0
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for gcc-4.6.4.20120608
===>  Extracting for gcc-4.6.4.20120608
=> SHA256 Checksum mismatch for gcc-4.6-20120608.tar.bz2.
=> SHA256 Checksum OK for ecj-4.5.jar.
===>  Refetch for 1 more times files: gcc-4.6-20120608.tar.bz2 
Making GCC 4.6.4.20120608 for FreeBSD 9.0  target=x86_64-portbld-freebsd9.0
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for gcc-4.6.4.20120608
=> gcc-4.6-20120608.tar.bz2 doesn't seem to exist in /usr/ports/distfiles//.
=> Attempting to fetch [url]ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.redhat.com/gcc/snapshots/4.6-20120608/gcc-4.6-20120608.tar.bz2[/url]
Making GCC 4.6.4.20120608 for FreeBSD 9.0  target=x86_64-portbld-freebsd9.0
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for gcc-4.6.4.20120608
=> SHA256 Checksum mismatch for gcc-4.6-20120608.tar.bz2.
=> SHA256 Checksum OK for ecj-4.5.jar.
===>  Giving up on fetching files: gcc-4.6-20120608.tar.bz2 
Make sure the Makefile and distinfo file (/usr/ports/lang/gcc46/distinfo)
are up to date.  If you are absolutely sure you want to override this
check, type "make NO_CHECKSUM=yes [other args]".
*** Error code 1

Stop in /usr/ports/lang/gcc46.
*** Error code 1

Stop in /usr/ports/lang/gcc46.
*** Error code 1

Stop in /usr/ports/lang/gcc46.

===>>> make failed for lang/gcc46
===>>> Aborting update

===>>> Update for lang/gcc46 failed
===>>> Aborting update

===>>> Update for www/firefox failed
===>>> Aborting update
```

Roelof


----------



## SirDice (Jun 12, 2012)

```
=> SHA256 Checksum mismatch for gcc-4.6-20120608.tar.bz2.
```

Looks like the file may have been corrupted during download. Try removing it from /usr/ports/distfiles/ and try again.


----------



## roelof (Jun 12, 2012)

I did that and the same error appear*s*.


----------



## SirDice (Jun 12, 2012)

I'm getting the same error. The file has the correct size but the SHA256 checksum is different.

You can try generating a new checksum and continuing the build. But the port maintainer will need to have a look as I'm unsure why the checksums are different.

`# make makesum`
This should calculate a new checksum, after that the build should continue as normal.


----------



## roelof (Jun 12, 2012)

I think the tar file is corrupt.
I'm now getting this error: 

```
tamara# make makesum
Making GCC 4.6.4.20120608 for FreeBSD 9.0  target=x86_64-portbld-freebsd9.0
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for gcc-4.6.4.20120608
tamara# make install clean
Making GCC 4.6.4.20120608 for FreeBSD 9.0  target=x86_64-portbld-freebsd9.0
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for gcc-4.6.4.20120608
===>  Extracting for gcc-4.6.4.20120608
=> SHA256 Checksum OK for gcc-4.6-20120608.tar.bz2.
=> SHA256 Checksum OK for ecj-4.5.jar.
===>   gcc-4.6.4.20120608 depends on file: /usr/local/bin/perl5.10.1 - found

bzip2: Data integrity error when decompressing.
        Input file = /usr/ports/distfiles//gcc-4.6-20120608.tar.bz2, 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.

gcc-4.6-20120608/gcc/po/id.po: Truncated tar archive
tar: Error exit delayed from previous errors.
*** Error code 1

Stop in /usr/ports/lang/gcc46.
*** Error code 1

Stop in /usr/ports/lang/gcc46.
```

Roelof


----------



## SirDice (Jun 12, 2012)

Hehehe, at least now we know _why_ the checksum failed :e

It would appear the file is corrupt at the source.


----------



## roelof (Jun 12, 2012)

I think that the maintainer has to give a message to the gcc people.
So I have to wait.

Roelof


----------



## ljboiler (Jun 12, 2012)

I downloaded the distfile from one of the other master sites (http://mirrors.kernel.org/sources.redhat.com/gcc/snapshots/4.6-20120608/gcc-4.6-20120608.tar.bz2); no checksum problem with that one.


----------



## roelof (Jun 12, 2012)

Thanks, then it looks like the mirror is somehow broken.


----------



## roelof (Jun 13, 2012)

I downloaded the tar.bz2 file from the location that ljboiler says.
Then I did `# make install clean` again and say to my surprise this message appears: 

```
=> gcc-4.6-20120608.tar.bz2 doesn't seem to exist in /usr/ports/distfiles//.
```

But the file is there.

```
ls /usr/ports/distfiles/gcc*
/usr/ports/distfiles/gcc-4.6-20120608.tar.bz2
```

Roelof


----------



## SirDice (Jun 13, 2012)

This might be due to the *make makesum* we did earlier. Have a look in the distinfo, it might be there twice now.

Doing a *make makesum* should fix things if you now have the correct file.


----------



## roelof (Jun 13, 2012)

Thanks. this problem is solved.


----------

