[Simh] Compiling most recent release of simh
Rhialto
rhialto at falu.nl
Tue Oct 11 14:21:27 EDT 2016
On Tue 11 Oct 2016 at 11:15:39 -0400, Paul Koning wrote:
> But the odd thing is that the makefile did find SDL -- but failed to
> find SDL_ttf even though it is installed in the very same spot.
I'm trying it right now and although I think it worked in the past for
me, now it also seems to fail.
(I don't have a completely unmodified makefile because of some changes
for NetBSD that I ought to pass upstream[1], but the part that seems
relevant here is original.)
I put some debugging output in around line 1390, so that I now have
this:
ifneq (,$(BESM6_BUILD))
$(info find include: $(call find_include,SDL2/SDL_ttf))
$(info find lib: $(call find_lib,SDL2_ttf))
$(info VIDEO_LDFLAGS=${VIDEO_LDFLAGS})
$(info )
ifneq (,$(and ${VIDEO_LDFLAGS}, $(or $(and $(findstring SDL2,${VIDEO_LDFLAGS}),$(call find_include,SDL2/SDL_ttf),$(call find_lib,SDL2_ttf)), $(and $(call find_include,SDL/SDL_ttf),$(call find_lib,SDL_ttf)))))
$(info found ttf includes and libraries)
FONTPATH += /usr/share/fonts /Library/Fonts /usr/lib/jvm /System/Library/Frameworks/JavaVM.framework/Versions C:/Windows/Fonts
FONTPATH := $(dir $(foreach dir,$(strip $(FONTPATH)),$(wildcard $(dir)/.)))
FONTNAME += DejaVuSans.ttf LucidaSansRegular.ttf FreeSans.ttf AppleGothic.ttf tahoma.ttf
$(info font paths are: $(FONTPATH))
$(info font names are: $(FONTNAME))
find_fontfile = $(strip $(firstword $(foreach dir,$(strip $(FONTPATH)),$(wildcard $(dir)/$(1))$(wildcard $(dir)/*/$(1))$(wildcard $(dir)/*/*/$(1))$(wildcard $(dir)/*/*/*/$(1)))))
$(info *** find_fontfile=${find_fontfile})
find_font = $(abspath $(strip $(firstword $(foreach font,$(strip $(FONTNAME)),$(call find_fontfile,$(font))))))
$(info *** find_font=${find_font})
ifneq (,$(call find_font))
FONTFILE=$(call find_font)
else
$(info ***)
$(info *** No font file available, BESM-6 video panel disabled.)
$(info ***)
$(info *** To enable the panel display please specify one of:)
$(info *** a font path with FONTNAME=path)
$(info *** a font name with FONTNAME=fontname.ttf)
$(info *** a font file with FONTFILE=path/fontname.ttf)
$(info ***)
endif
endif
endif
ifeq (,$(and ${VIDEO_LDFLAGS}, ${FONTFILE}, $(BESM6_BUILD)))
$(info *** No SDL ttf support available. BESM-6 video panel disabled.)
$(info ***)
$(info *** VIDEO_LDFLAGS=${VIDEO_LDFLAGS})
$(info *** FONTPATH=${FONTPATH})
$(info *** FONTFILE=${FONTFILE})
$(info *** BESM6_BUILD=${BESM6_BUILD})
which as some extra $(info lines to show crucial variables. My output is this:
$ gmake -j4 GCC=clang FONTPATH=/usr/pkg/share/fonts/X11/TTF besm6
lib paths are: /usr/lib /usr/pkg/lib /usr/X11R7/lib
include paths are: /usr/include /usr/pkg/include /usr/X11R7/include
using libm: /usr/lib/libm.so
using librt: /usr/lib/librt.so
using libpthread: /usr/lib/libpthread.so /usr/include/pthread.h
using libpcreposix: /usr/pkg/lib/libpcreposix.so /usr/pkg/include/pcreposix.h
using libdl: /usr/include/dlfcn.h
using mman: /usr/include/sys/mman.h
using libSDL2: /usr/pkg/include/SDL2/SDL.h
***
*** besm6 Simulator being built with:
*** - compiler optimizations and no debugging support. clang version 3.8.0.
*** - video capabilities provided by libSDL2 (Simple Directmedia Layer).
***
*** git commit id is 701f1610ffba85226c0dcd323a956595e94f9389.
***
find include: /usr/pkg/include/SDL2/SDL_ttf.h
find lib: /usr/pkg/lib/libSDL2_ttf.so
VIDEO_LDFLAGS=`/usr/pkg/bin/sdl2-config --libs`
*** No SDL ttf support available. BESM-6 video panel disabled.
***
*** VIDEO_LDFLAGS=`/usr/pkg/bin/sdl2-config --libs`
*** FONTPATH=/usr/pkg/share/fonts/X11/TTF
*** FONTFILE=
*** BESM6_BUILD=true
gmake: Nothing to be done for 'besm6'.
I would *think* that having all of VIDEO_LDFLAGS and the results from
find_include and find_lib all non-empty should be enough.
Aha, but maybe I see the problem: VIDEO_LDFLAGS contains a command to be
run, and it seems there is a check if SDL2 is in ${VIDEO_LDFLAGS}, which
it isn't in this string. If it's replaced by the command's output, then
it's there: "-L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -lSDL2", but maybe
that doesn't happen in this invocation.
[1] Essentially: change -Rdirname options to Wl,-Rdirname, because
gcc is ok with either, but clang wants the long form.
- OS_LDFLAGS += -L/usr/pkg/lib -R/usr/pkg/lib
+ OS_LDFLAGS += -L/usr/pkg/lib -Wl,-R/usr/pkg/lib
- OS_LDFLAGS += -L/usr/X11R7/lib -R/usr/X11R7/lib
+ OS_LDFLAGS += -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib^M
and comment out removal of BuildROMs (because this way prevents a lot of
unnecessary rebuilds):
- ${RM} $@
+ # ${RM} $@
> paul
-Olaf.
--
___ Olaf 'Rhialto' Seibert -- Wayland: Those who don't understand X
\X/ rhialto/at/xs4all.nl -- are condemned to reinvent it. Poorly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20161011/357c4799/attachment.sig>
More information about the Simh
mailing list