[Simh] Build failure of v38-0 on OS X 10.5.3.
Gregory Wright
gwright at antiope.com
Thu Jun 26 00:00:06 EDT 2008
More snips and an answer:
On Jun 25, 2008, at 7:31 AM, Davis Johnson wrote:
> By the way, good you included the whole make output, but I snip parts.
>
> Gregory Wright wrote:
>
>>
>> Hi,
>>
>> I downloaded the latest v38-0 release today (24 June 2008). The host
>> system is MacBook Pro 2.6 GHz, 4 GB RAM running OS 10.5.3. The build
>> failed with
>>
>> redwing-dakota> export OSTYPE
>> redwing-dakota> make
>> gcc -std=c99 -U__STRICT_ANSI__ -g -D_GNU_SOURCE -I . PDP1/pdp1_lp.c
>>
<snip>
>> VAX/vaxmod_defs.h:457: warning: inline function ‘WriteL’ declared but
>> never defined
>> VAX/vaxmod_defs.h:456: warning: inline function ‘WriteW’ declared but
>> never defined
>> VAX/vaxmod_defs.h:455: warning: inline function ‘WriteB’ declared but
>> never defined
>> VAX/vaxmod_defs.h:454: warning: inline function ‘ReadLP’ declared but
>> never defined
>
> ...snip...
>
>> Undefined symbols:
>> "_ReadB", referenced from:
>> _cpu_ex in cc5k1kBU.o
>> _Map_ReadB in cciTF8h7.o
>> _Read in cc1KMW8b.o
>> "_ReadL", referenced from:
>> _Map_ReadB in cciTF8h7.o
>> _Map_ReadW in cciTF8h7.o
>> _Read in cc1KMW8b.o
>>
>> <snip>
>> From a quick look around the source tree it wasn't obvious to me
>> where the Read* and Write* functions are defined.
>
> I don't normally do VAX but it looks to me like they are following
> line
> 200 in VAX/vax_mmu.c following line 200.
>
>>
>> Is there an additional secret sauce needed to build on OS X?
>
> I've been building it on 10.3.9 PPC system. Library and toolchain
> issues
> are probably identical for you. All up to VAX built for you, so the
> makefile is probably OK. It looks to me so much like you are missing
> part of the source that I just downloaded it again and rebuilt. I
> failed
> to reproduce your problem. That, obviously, doesn't mean you aren't
> having a problem.
>
> I'd suggest grasping at straws:
> 1) Take a look in VAX/vax_mmu.c for the functions
> 2) Download and unzip the source again, do you get a different
> VAX/vax_mmu.c?
> 3) The functions in question are inlined for performance reasons. Try
> taking the SIM_INLINE away from them. Perhaps your compiler doesn't
> like
> that.
> 4) What compiler are you using. I tend to assume everybody uses a
> recent
> GCC, but that isn't always the case.
>>
On OS X 10.5.3 I'm using the default Apple gcc 4.0.1. It appears that
the inline
semantics have changed to be more C99-ish, if perhaps not fully C99.
This means that you don't want to declare a function inline (in the
prototype) and
also use the inline keyword in the definition. The inline keyword
should only
be used in the definition. I patched sim_defs.h to be
--- sim_defs.h.sav 2008-06-25 14:10:17.000000000 -0400
+++ sim_defs.h 2008-06-25 14:12:21.000000000 -0400
@@ -165,6 +165,7 @@
#if defined (__GNUC__) /* GCC */
#define SIM_INLINE inline
+#define SIM_INLINE_DECL
#elif defined (_MSC_VER) /* Microsoft
C Compilers */
#define SIM_INLINE __inline
#else /* default */
and changed the SIM_INLINE declarations in vax_cpu.c, vax780_defs.h and
vaxmod_defs.h to SIM_INLINE_DECL.
This solved the problem form me with Apple gcc-4.0.1; with some
additional
conditionals it can probably be made backwardly compatible with
Apple's gcc-3.x.
(C99 inline semantics were broken for at least some gcc 3.x compilers,
so specifying
-std=c99 may give whimsical results.)
Best Wishes,
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20080626/8505ea4f/attachment-0003.html>
More information about the Simh
mailing list