[Simh] SIMH compile/link bug fix for openSUSE and Kubuntu Linux...

Lyle Bickley lbickley at bickleywest.com
Mon Apr 21 15:06:56 EDT 2008


I'm on the PDP-1 and IBM1620 Restoration Teams at the Computer 
History Museum. We use SIMH regularly.

Attempting to compile SIMH for any system with release 37-2 or 37-3 
on openSUSE or Kubuntu Linux produced the following error:
---------------------------------------------------------
/home/lpb/simh/sim_timer.c:302: undefined reference to `clock_getres'
collect2: ld returned 1 exit status
make: *** [BIN/pdp1] Error 1
---------------------------------------------------------

The problem was resolved by insuring -lrt is included in the 
makefile. I did so by removing the $(OSTYPE),macos test from the 
makefile.

Here's a fix (as a diff):
---------------------------------------------------------
diff makefile.orig makefile
13c13
< ifeq ($(OSTYPE),macos)
---
> # ifeq ($(OSTYPE),macos)
15,17c15,17
< else
< CC = gcc -std=c99 -O2 -U__STRICT_ANSI__ -g -lm $(OS_CCDEFS) -I .
< endif
---
> # else
> # CC = gcc -std=c99 -O2 -U__STRICT_ANSI__ -g -lm $(OS_CCDEFS) -I .
> # endif
----------------------------------------------------------

Cheers,
Lyle
-- 
Lyle Bickley
Bickley Consulting West Inc.
Mountain View, CA
http://bickleywest.com

"Black holes are where God is dividing by zero"



More information about the Simh mailing list