[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (2.8) build ports: ld dumps core
Quoted from Mustafa C. Kuscu [06 Dec 2000]:
> Description:
> /usr/ports is on a different partition of 3GB size. When building a
> problematic port, the filesystem on that partition gets full. Then I look at
> the work folder and see that there is a file "ld.core" of ~2.8GB size.
I've seen this problem before, after upgrading to 2.8 from 2.7 from
source. If your problem is anything like mine, feel free to try the
procedure below (but remember that I'm not an OpenBSD crew member, so
take everything with a grain of salt):
1. Check your GCC version (``cc -v''). If it's 2.95.3, skip to step 4.
2. Get libc.so.25.0 from OpenBSD 2.7, and put in some directory. List
this directory in LIBRARY_PATH.
3. Go to /usr/src/gnu/egcs/gcc, and run:
make -f Makefile.bsd-wrapper obj
make -f Makefile.bsd-wrapper cleandir
make -f Makefile.bsd-wrapper depend
make -f Makefile.bsd-wrapper
sudo make -f Makefile.bsd-wrapper install
4. Go to /usr/src/lib/libc, and run:
rm obj/libc.so.25.2 # if you have already built libc
make obj # } if you have not
make depend # } already buit libc
make # } do this in
sudo make install # } both cases
Things ``should'' work again. If not, consider downloading libc.so.25.2
from your OpenBSD mirror and installing it.
My speculation (and it's _only_ a speculation) on why this is happening:
1. OpenBSD 2.7's ``cc -shared'' links in -lc; OpenBSD 2.8's doesn't.
2. ``make build'' builds libc ahead of the new gcc.
3. When building libc, it uses ``cc -shared'' (since bsd.lib.mk is
already updated). This creates a dependency on libc.so.25, under
the OpenBSD 2.7 cc.
4. User installs libc.so.25.2.
5. Next time some program is linked with a dependency on -lc, the
linker sees a dependency on libc.so.25 (=> libc.so.25.2). Linker
recurses infinitely, and crashes horribly when it runs out of
stack.
Part 5 is not a speculation: I've traced the linker under a debugger
for a few hours to learn about this.
---Chris K.
--
Chris, the Young One |_ If you can't afford a backup system, you can't
Auckland, New Zealand |_ afford to have important data on your computer.
GnuPG: CCC6114E/706A6AAD |_ ---Tracy R. Reed