Subject: lang/gcc broken on 1.5.x
To: None <>
From: Klaus Heinz <>
List: tech-pkg
Date: 02/29/2004 08:14:02

I believe the build gcc-2.95.3nb5 is broken on 1.5.4_ALPHA, while it
builds fine on 1.6.

With pkgsrc from a few hours ago it stops here:

  ===> Checking for vulnerabilities in gcc-2.95.3nb5
  => Checksum OK for gcc-2.95.3.tar.gz.
  => Checksum OK for gcc-2.95.3-diff-2002-08-29.gz.
  work.i386 -> /var/tmp2/workobj-pkgsrc/lang/gcc/work.i386
  ===> Extracting for gcc-2.95.3nb5
  ===> Required installed package gmake>=3.78: gmake-3.80nb2 found


  /var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/objdir/gcc/xgcc -B/var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/objdir/gcc/ -B/usr/pkg/gcc-2.95.3/i386--netbsdelf/bin/ -c -O2 -I/usr/pkg/include -fno-implicit-templates -I/var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/gcc-2.95.3/libstdc++ -I/var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/gcc-2.95.3/libstdc++/stl -I../libio -I/var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/gcc-2.95.3/libstdc++/../libio -nostdinc++  -DLD `for N in EXTRACT INSERT; do echo " -D${N}"; done` \
    /var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/gcc-2.95.3/libstdc++/ -o ldcomio.o
  touch bigstmp-complx
  rm -f tlist
  touch tlist
  echo *.o >> tlist
  for f in `cat ../libio/iostream.list` ; do \
    echo "../libio/$f" >> tlist ; \
  for f in `cat ../libiberty/needed-list` strerror.o ; do \
    echo "../libiberty/$f" >> tlist ; \
  mv tlist stdlist
  rm -f tlibstdc++.a.4.0
  ar rc tlibstdc++.a.4.0 `cat stdlist`
  mv tlibstdc++.a.4.0 libstdc++.a.4.0
  ranlib libstdc++.a.4.0
  rm -f libstdc++.a
  ln -s libstdc++.a.4.0 libstdc++.a || cp libstdc++.a.4.0 libstdc++.a
  rm -f tlist
  cp stdlist tlist
  if [ x"yes" = xyes ]; then \
    sed 's,\([A-Za-z_]*\.o\),pic/\1,g' tlist > tlist2 ; \
    mv tlist2 tlist ; \
  else true ; fi
  mv tlist piclist
  /var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/objdir/gcc/xgcc -B/var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/objdir/gcc/ -B/usr/pkg/gcc-2.95.3/i386--netbsdelf/bin/ -O2 -I/usr/pkg/include -fno-implicit-templates  -shared -o `cat piclist` 
  /usr/bin/ld: cannot open -lgcc_pic: No such file or directory
  collect2: ld returned 1 exit status
  gmake[1]: *** [] Error 1
  gmake[1]: Leaving directory `/var/tmp2/workobj-pkgsrc/lang/gcc/work.i386/objdir/i386--netbsdelf/libstdc++'
  gmake: *** [all-target-libstdc++] Error 2
  *** Error code 2
  *** Error code 1


I do not know whether this could be related, but the reason why I wanted
to rebuild gcc-2.95.3 was libgcc_pic.a as well. The old compiler package
(plain gcc-2.95) did not link the shared library of devel/smpeg with
libgcc_pic.a which seems to be required to resolve the symbol
__pure_virtual. Probably needless to mention that the system compiler on
1.5.x (egcs-1.1.2) could not compile the library correctly, either;
At least one package depending on complained later about the
missing symbol __pure_virtual.

The binary packages for 1.5.1 (smpeg-0.4.1 and smpeg-0.4.1) miss the
symbol as well, while binary packages for 1.6* (smpeg-0.4.3 and
smpeg-0.4.4*) provide it.

Should a PR for this be filed under pkg or toolchain?