ports/140731: emulators/hatari does not build if emulators/rtc is installed

Bojan Petrovic bpetrovi at f.bg.ac.rs
Sat Nov 21 02:00:10 UTC 2009


>Number:         140731
>Category:       ports
>Synopsis:       emulators/hatari does not build if emulators/rtc is installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 21 02:00:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Bojan Petrovic
>Release:        7.2-STABLE
>Organization:
>Environment:
FreeBSD localhost 7.2-STABLE FreeBSD 7.2-STABLE #0: Sat Sep 19 12:21:53 CEST 2009     root at localhost:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
If emulators/rtc port is installed, the emulators/hatari port will 
not build.

The build fails with:

cc -O1 -pipe -Wall -D_THREAD_SAFE -I/usr/local/include   -I/usr/local/include/libpng  -I.. -I./includes -Iuae-cpu -I./falcon -DCONFDIR=\"/usr/local/etc\" -I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT -DENABLE_DSP_EMU=1  -c -o ioMemTabST.o ioMemTabST.c
ioMemTabST.c:160: error: 'Rtc_SecondsUnits_ReadByte' undeclared here (not in a function)
ioMemTabST.c:162: error: 'Rtc_SecondsTens_ReadByte' undeclared here (not in a function)
ioMemTabST.c:164: error: 'Rtc_MinutesUnits_ReadByte' undeclared here (not in a function)
[similar lines removed]

Diagnosis:

1. The emulators/rtc port installs /usr/local/include/rtc.h

2. There are several .c files in hatari's src directory which
include src/includes/rtc.h by `#include "rtc.h"'

3. After the configure step, the @X_CFLAGS@ in Makefile.cnf.in is
replaced with `-D_THREAD_SAFE -I/usr/local/include' (the output of
`pkg-config --cflags x11'). This makes /usr/local/include the
first directory to be searched for include files, shadowing the
hatari's src/includes directory. Beacuse of this, the wrong rtc.h is 
included.
>How-To-Repeat:
Install emulators/rtc and build emulators/hatari.
>Fix:
1) Replace `#include "str.h"' with `#include "./includes/str.h"' in:

src/ioMemTabFalcon.c
src/ioMemTabST.c
src/ioMemTabSTE.c
src/ioMemTabTT.c
src/rtc.c

1a) Add the following line in the post-patch rule:

@${REINPLACE_CMD} -e \
's|^#include "rtc.h"|#include "./includes/rtc.h"|' ${WRKSRC}/src/*.c

Or

1b) Add patch for exactly those files to port

Or

2) Set the X_CFLAGS environment variable to
the output of `pkg-config --cflags-only-other x11' :

CONFIGURE_ENV=X_CFLAGS=`pkg-config --cflags-only-other x11`

This removes `-I/usr/local/include' from CFLAGS, but
this directory is included as a SDL requirement.


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list