DoctorWkt / DoctorWkt/Apout

Trouble with 2.11BSD compiler

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
38
Forks
6
PR merge metrics
No merged PRs in 30d

Description

I’m having some trouble with the current 2.11BSD linker under Apout.

$ env APOUT_UNIX_VERSION=2.11BSD APOUT_ROOT="$(pwd -L)/x" ~/src/Apout/apout x/bin/cc -v -O -o crc crc.c
__iob: ld:/lib/libc.a(findiop.o): multiply defined
__smallbuf: /lib/libc.a(findiop.o): multiply defined
curbrk: /lib/libc.a(sbrk.o): multiply defined
minbrk: /lib/libc.a(sbrk.o): multiply defined
__ovno: /lib/libc.a(csv.o): multiply defined

The same happens when trying to manually link:

$ env APOUT_UNIX_VERSION=2.11BSD APOUT_ROOT="$(pwd -L)/x" ~/src/Apout/apout x/bin/ld -o crc /lib/crt0.o crc.o /lib/libc.a
__iob: ld:/lib/libc.a(findiop.o): multiply defined
__smallbuf: /lib/libc.a(findiop.o): multiply defined
curbrk: /lib/libc.a(sbrk.o): multiply defined
minbrk: /lib/libc.a(sbrk.o): multiply defined
__ovno: /lib/libc.a(csv.o): multiply defined

Using Fedora 44, “x” is 2.11BSDpl482 mounted with retro-fuse.

Image from: https://asjackson-211bsd-ci.s3.fr-par.scw.cloud/211bsd-ci-482.dsk.gz

Using the compiler and linker under SIMH is fine.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the compiler and manual linker commands from the report under Apout with APOUT_UNIX_VERSION=2.11BSD and the referenced 2.11BSDpl482 image. Compare the failing Apout behavior with the working SIMH setup, then trace the reported multiply-defined symbols through the linker and libc inputs. Done means the affected command links successfully under Apout without regressing the existing SIMH behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
compilers, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.