Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#2299 - gcc-g77 creates "bad" executables

Attached to Project: Arch Linux
Opened by Eric Belanger (Snowman) - Monday, 28 February 2005, 22:23 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 02 March 2005, 07:46 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

gcc-g77 can compile the program without error but when I try to run it, the hard drive starts acting up thus slowing the computer. According to gkrellm, MBs of data are written to the hard drive. It is definitely not due to my small program. And, I'm pretty sure that it is not due to any background task. I also tried with a different program with same results.
If I use my version of gcc-g77 or the Intel compiler, the programs are compiled and executed in less than 5 seconds.
Here is a working PKGBUILD:
#===================
pkgname=gcc-g77
pkgver=3.4.3
pkgrel=1
pkgdesc="The GNU Fortran Compiler"
url="http://gcc.gnu.org"
depends=('glibc' 'gcc=3.4.3')
makedepends=('sed')
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2)
md5sums=('e744b30c834360fccac41eb7269a3011')

build() {
cd $startdir/src/gcc-$pkgver
# changing maximum number of file unit
sed -i 's/#define MXUNIT 100/#define MXUNIT 1000/' libf2c/libI77/fio.h
mkdir ../gcc-build
cd ../gcc-build
../gcc-$pkgver/configure --prefix=/usr \
--enable-shared \
--enable-languages=f77 \
--enable-threads=posix \
--enable-__cxa_atexit
make bootstrap || return 1
make DESTDIR=$startdir/pkg install || return 1
mkdir -p $startdir/pkg/lib

# get rid of the references to my build dir
chmod 644 $startdir/pkg/usr/lib/*.la

# removing files provided by gcc
rm -r $startdir/pkg/usr/lib/{libgcc_s.so*,libiberty.a}
rm $startdir/pkg/usr/lib/gcc/i686-pc-linux-gnu/$pkgver/{*.o,*.a,specs}
rm $startdir/pkg/usr/lib/gcc/i686-pc-linux-gnu/$pkgver/include/{README,emmintrin.h,float.h,iso646.h,limits.h,mmintrin.h,pmmintrin.h,s*,unwind.h,varargs.h,xmmintrin.h,dbm/ncompat.h}
rm $startdir/pkg/usr/lib/gcc/i686-pc-linux-gnu/$pkgver/install-tools/*
rm -r $startdir/pkg/usr/lib/gcc/i686-pc-linux-gnu/$pkgver/install-tools/include/*
rm -r $startdir/pkg/usr/share/locale/{be,ca,da,de,el,es,fr,ja,nl,sv,tr}/LC_MESSAGES/*
rm -r $startdir/pkg/usr/libexec/gcc/i686-pc-linux-gnu/$pkgver/install-tools/*
rm -r $startdir/pkg/usr/libexec/gcc/i686-pc-linux-gnu/$pkgver/c*
rm $startdir/pkg/usr/bin/{cpp,gcc,gccbug,gcov,i686*}
rm $startdir/pkg/usr/man/man1/{gc*,cpp.1}
rm $startdir/pkg/usr/man/man7/*

}
#==================
The main differences with the one from Arch CVS are:
1. The use of the gcc-core-$pkgver.tar.bz2 sources (reason=?)
2. The official PKGBUILD compiles with:
make || return 1
while the working PKGBUILD compiles with:
make bootstrap || return 1

That might be the problem.
This task depends upon

Closed by  Jan de Groot (JGC)
Thursday, 03 March 2005, 10:09 GMT
Reason for closing:  Fixed
Comment by Jan de Groot (JGC) - Monday, 28 February 2005, 23:55 GMT
I compiled at least one package with it without problems, but the make bootstrap makes a point here. The gcc-core tarball vs the two I use doesn't make a difference, it only pulls much more bandwidth from the GNU download servers in your PKGBUILD.
Comment by Eric Belanger (Snowman) - Tuesday, 01 March 2005, 17:44 GMT
As for the sources, I haven't realized that, apart from the gcc-core tarball, you were using the gcc-g77 and not the whole gcc tarball.

I did extra tests with a "hello world" program. I found out that, after the string is printed (almost instantly), the program starts to use a LOTS of memory. It used the remaining 110 MB of my RAM plus another 230 MB of swap. This explains the high disk activity. After a while, the program stops without any error message.
Comment by Jan de Groot (JGC) - Wednesday, 02 March 2005, 07:46 GMT
Please verify if this package fixes your problem:

ftp://schoolbak.dyndns.org/gcc-g77-3.4.3-2.pkg.tar.gz
Comment by jan willem (jw) - Wednesday, 02 March 2005, 13:40 GMT
I do not know about the compile problems, but the new pakage does fix breakage of "octave" on my system:

With gcc-g77-3.4.3-1 octave would crash complaining about an error loading the shared library "libg2c.so.0". With the new pakage octave runs fine.

Loading...