Subject: pkg/24267: ...pkgsrc/devel/smpeg does not compile (amd64?)
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/28/2004 18:34:44
>Number:         24267
>Category:       pkg
>Synopsis:       ...pkgsrc/devel/smpeg does not compile (amd64?)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 28 18:35:00 UTC 2004
>Originator:     Richard Rauch
>Release:        NetBSD/amd64 -current (20040127)
NetBSD socrates 1.6ZI NetBSD 1.6ZI (socrates) #2: Tue Jan 27 18:29:23 CST 2004  root@socrates:/usr/netbsd/current/src/sys/arch/amd64/compile/obj.amd64/socrates amd64

I attempted to build .../games/openmortal on a fresh install to verify
whether an old bug was really fixed.  I now am stalled by this error,
when pkgsrc tries to build smpeg as a prerequisite for openmortal:

mkdir .libs
c++ -DPACKAGE=\"smpeg\" -DVERSION=\"0.4.4\" -I. -Dunix=1 -I/usr/pkgsrc/devel/smpeg/work.x86_64/.buildlink/include -I/usr/pkgsrc/devel/smpeg/work.x86_64/.x11-buildlink/include -O2 -I/usr/pkgsrc/devel/smpeg/work.x86_64/.buildlink/include/SDL -D_REENTRANT -DTHREADED_AUDIO -I/usr/pkgsrc/devel/smpeg/work.x86_64/.x11-buildlink/include/gtk-1.2 -I/usr/pkgsrc/devel/smpeg/work.x86_64/.buildlink/include/glib/glib-1.2 -I/usr/pkgsrc/devel/smpeg/work.x86_64/.buildlink/lib/glib/include -DNDEBUG -I.. -DNOCONTROLS -I../audio -I../video -fno-exceptions -fno-rtti -c MPEGvideo.cpp  -fPIC -DPIC -o .libs/MPEGvideo.o
In file included from MPEGvideo.cpp:86:
video.h:435:20: endian.h: No such file or directory
gmake[1]: *** [MPEGvideo.lo] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/devel/smpeg/work.x86_64/smpeg-0.4.4/video'
gmake: *** [all-recursive] Error 1
*** Error code 2

I do have an endian.h in /usr/include/sys, and another in the amd64
/usr/include dir.

Try to build smpeg (possibly depends on your platform; use
NetBSD/amd64 to be most sure).
The following patch, post-config, in the*/video dir
seems to fix it for me:

--- video.h     2004-01-28 12:26:50.000000000 -0600
+++ video.h.orig        2004-01-28 12:26:40.000000000 -0600
@@ -432,7 +432,7 @@
-#include <sys/endian.h>
+#include <endian.h>

...that may  not be the best fix, but it's *a* fix.  (^&