NetBSD Problem Report #51758

From tsutsui@ceres.dti.ne.jp  Sun Jan  1 02:08:32 2017
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 72E487A2DD
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  1 Jan 2017 02:08:32 +0000 (UTC)
Message-Id: <201701010208.v0128P3g003205@ceres.dti.ne.jp>
Date: Sun, 1 Jan 2017 11:08:25 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: pkgsrc/emulators/simh build fails if SDL2 is installed
X-Send-Pr-Version: 3.95

>Number:         51758
>Category:       pkg
>Synopsis:       pkgsrc/emulators/simh build fails if SDL2 is installed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 01 02:10:00 +0000 2017
>Last-Modified:  Sun Jan 01 06:10:01 +0000 2017
>Originator:     Izumi Tsutsui
>Release:        NetBSD 7.0.2 + pkgsrc-2016Q4
>Organization:
>Environment:
System: NetBSD 7.0.2 NetBSD 7.0.2 (GENERIC.201610210724Z) i386
Architecture: i386
Machine: i386
>Description:
pkgsrc/emulators/simh build fails if SDL2 is installed.
It looks the default makefile (as configure) implicitly checks SDL2 first
before SDL, and there is no option to explicitly disable SDL2.

>How-To-Repeat:
cd /usr/pkgsrc/devel/SDL2 && make package-install
cd /usr/pkgsrc/emulators/simh && make package

---
 :
===> Building for simh-4.0.0.20161218
*** Warning ***
*** Warning *** Unsupported build with INCLUDES defined as: /usr/pkg/include: /usr/pkg/include/SDL: /usr/include/pcap: /usr/pkg/include/pcre: /usr/pkg/include
*** Warning *** Unsupported build with LIBRARIES defined as: /usr/pkg/lib: /usr/pkg/lib: /usr/lib: /usr/pkg/lib: /usr/pkg/lib
*** Warning ***
lib paths are: /usr/pkg/lib /usr/pkg/lib /usr/lib /usr/pkg/lib /usr/pkg/lib /usr/pkg/lib /usr/X11R7/lib
include paths are: /usr/pkg/include /usr/pkg/include/SDL /usr/include/pcap /usr/pkg/include/pcre /usr/pkg/include /usr/pkg/include /usr/X11R7/include
using libm: /usr/lib/libm.so
using librt: /usr/lib/librt.so
using libpcreposix: /usr/pkg/lib/libpcreposix.so /usr/pkg/include/pcreposix.h
using libSDL2: /usr/pkg/include/SDL2/SDL.h
using libpcap: /usr/include/pcap/pcap.h

 :

gcc -std=gnu99 -U__STRICT_ANSI__  -O2  -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/libdrm -I/usr/X11R7/include/freetype2 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -Wno-unused-result -DSIM_GIT_COMMIT_ID=7964e2b72d9cad0309afa7da08dd7e5e2336cd37 -DSIM_BUILD=Unsupported=include+lib -DSIM_COMPILER="GCC Version: 4.8.4" -I . -D_GNU_SOURCE -I/usr/pkg/include -I/usr/X11R7/include -DHAVE_PCREPOSIX_H  HP3000/hp_disclib.c HP3000/hp_tapelib.c HP3000/hp3000_atc.c HP3000/hp3000_clk.c HP3000/hp3000_cpu.c HP3000/hp3000_cpu_base.c HP3000/hp3000_cpu_fp.c HP3000/hp3000_ds.c HP3000/hp3000_iop.c HP3000/hp3000_lp.c HP3000/hp3000_mpx.c HP3000/hp3000_ms.c HP3000/hp3000_scmb.c HP3000/hp3000_sel.c HP3000/hp3000_sys.c scp.c sim_console.c sim_fio.c sim_timer.c sim_sock.c sim_tmxr.c sim_ether.c sim_tape.c sim_disk.c sim_serial.c sim_video.c sim_imd.c sim_card.c -I HP3000 -o BIN/hp3000   !
  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -R/usr/pkg/lib -L/usr/X11R7/lib -R/usr/X11R7/lib -lm -lrt -lpcreposix -L/usr/pkg/lib/
In file included from PDP1/pdp1_dpy.c:38:0:
./sim_video.h:217:17: fatal error: SDL.h: No such file or directory
 #include <SDL.h>
                 ^
compilation terminated.
In file included from display/sim_ws.c:41:0:
./sim_video.h:217:17: fatal error: SDL.h: No such file or directory
 #include <SDL.h>
                 ^
compilation terminated.
In file included from scp.c:225:0:
sim_video.h:217:17: fatal error: SDL.h: No such file or directory
 #include <SDL.h>
                 ^
 :

compilation terminated.
makefile:1609: recipe for target 'BIN/pdp11' failed
gmake: *** [BIN/pdp11] Error 1
*** Error code 2

---

>Fix:

Specify
> .include "../../devel/SDL2/buildlink3.mk"
instead of SDL in pkgsrc/emulators/simh/Makefile,
or patch makefile in simh to disable SDL2?

---
 :
    ifneq (,$(call find_include,SDL2/SDL))
      ifneq (,$(call find_lib,SDL2))
        VIDEO_CCDEFS += -DHAVE_LIBSDL -DUSE_SIM_VIDEO `$(realpath $(dir $(call find_include,SDL2/SDL))../../bin/sdl2-config) --cflags`
        VIDEO_LDFLAGS += `$(realpath $(dir $(call find_include,SDL2/SDL))../../bin/sdl2-config) --libs`
        VIDEO_FEATURES = - video capabilities provided by libSDL2 (Simple Directmedia Layer)
        DISPLAYL = ${DISPLAYD}/display.c $(DISPLAYD)/sim_ws.c
        DISPLAYVT = ${DISPLAYD}/vt11.c
        DISPLAY_OPT += -DUSE_DISPLAY $(VIDEO_CCDEFS) $(VIDEO_LDFLAGS)
        $(info using libSDL2: $(call find_include,SDL2/SDL))
        ifeq (Darwin,$(OSTYPE))
          VIDEO_CCDEFS += -DSDL_MAIN_AVAILABLE
        endif
      endif
    else
      ifneq (,$(call find_include,SDL/SDL))
        ifneq (,$(call find_lib,SDL))
 :
---

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/51758: pkgsrc/emulators/simh build fails if SDL2 is installed
Date: Sun, 1 Jan 2017 05:08:38 +0000

 On Sun, Jan 01, 2017 at 02:10:00AM +0000, Izumi Tsutsui wrote:
  > pkgsrc/emulators/simh build fails if SDL2 is installed.
  > It looks the default makefile (as configure) implicitly checks SDL2 first
  > before SDL, and there is no option to explicitly disable SDL2.

 I would say if it works with SDL2, switch it over...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: pkg/51758: pkgsrc/emulators/simh build fails if SDL2 is installed
Date: Sun, 1 Jan 2017 15:05:30 +0900

 >   > pkgsrc/emulators/simh build fails if SDL2 is installed.
 >   > It looks the default makefile (as configure) implicitly checks SDL2 first
 >   > before SDL, and there is no option to explicitly disable SDL2.
 >  
 >  I would say if it works with SDL2, switch it over...

 It looks only limited emulations require SDL
 (at least vaxen emulations don't use it) so
 I have no idea how to test if it works.
 (though build seems okay)

 ---
 Izumi Tsutsui

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.