Subject: pkg/24267: ...pkgsrc/devel/smpeg does not compile (amd64?)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <rkr@olib.org>
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
>Closed-Date:
>Last-Modified:
>Originator:     Richard Rauch
>Release:        NetBSD/amd64 -current (20040127)
>Organization:
n/a
>Environment:
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

>Description:
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.

>How-To-Repeat:
Try to build smpeg (possibly depends on your platform; use
NetBSD/amd64 to be most sure).
>Fix:
The following patch, post-config, in the ...work/smpeg*/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 @@
 #undef  LITTLE_ENDIAN_ARCHITECTURE
 #define BIG_ENDIAN_ARCHITECTURE 1
 #else
-#include <sys/endian.h>
+#include <endian.h>
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #undef  BIG_ENDIAN_ARCHITECTURE
 #define LITTLE_ENDIAN_ARCHITECTURE 1

...that may  not be the best fix, but it's *a* fix.  (^&
>Release-Note:
>Audit-Trail:
>Unformatted: