Bug 188445

Summary: Unable to link testmain in sys/boot/ficl after make all
Product: Base System Reporter: Devin Teske <dteske>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: 9.2-STABLE   
Hardware: Any   
OS: Any   

Description Devin Teske freebsd_committer freebsd_triage 2014-04-11 02:40:00 UTC
If you say "make all" (or simply "make") in sys/boot/ficl prior to saying "make testmain", the latter fails.

NOTE: "testmain" is the userland ficl interpreter used for honing your Forth, teaching others, or just plain messing around with the language.

Fix: 

A work-around exists which is to first say "make clean", then "make testmain". Another acceptable workaround is to say "make clean" and then perform "make all testmain" (which interestingly links testmain fine despite running the `all' target prior to testmain).
How-To-Repeat: First say "make clean" in sys/boot/ficl. Then say "make" or "make all". Both of these are expected to return successfully. Finally say "make testmain" to produce the following error:

cc -O2 -pipe  -ffreestanding -march=i386 -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -DTESTMAIN -D_TESTMAIN -std=gnu99   -m32 -I. -I/usr/src/sys/boot/ficl -I/usr/src/sys/boot/ficl/i386  -I/usr/src/sys/boot/ficl/../common  -o testmain dict.o ficl.o fileaccess.o float.o loader.o math64.o prefix.o search.o stack.o tools.o vm.o words.o sysdep.o softcore.o testmain.o
loader.o: In function `keyQuestion':
loader.c:(.text+0x312): undefined reference to `ischar'
loader.o: In function `ficlCopyout':
loader.c:(.text+0x424): undefined reference to `archsw'
loader.o: In function `ficlCopyin':
loader.c:(.text+0x468): undefined reference to `archsw'
loader.o: In function `pfopen':
loader.c:(.text+0x697): undefined reference to `Malloc'
loader.c:(.text+0x6c3): undefined reference to `Free'
loader.o: In function `ficlFindfile':
loader.c:(.text+0x8c6): undefined reference to `file_findfile'
loader.o: In function `ms':
loader.c:(.text+0x2fc): undefined reference to `delay'
sysdep.o: In function `ficlFree':
sysdep.c:(.text+0xd2): undefined reference to `Free'
sysdep.o: In function `ficlRealloc':
sysdep.c:(.text+0xed): undefined reference to `Realloc'
sysdep.o: In function `ficlMalloc':
sysdep.c:(.text+0x102): undefined reference to `Malloc'
*** [testmain] Error code 1

See "Fix to the problem if known" for work-around.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:06 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped