devel/lua-alien on sparc64 or absence of FFI_SYSV

Anonymous swell.k at gmail.com
Fri Sep 10 17:18:11 UTC 2010


http://pointyhat.freebsd.org/errorlogs/sparc64-errorlogs/e.7.20100907084544/lua51-alien-0.5.0.log writes:

> building lua51-alien-0.5.0 on netra5.isc.freebsd.org
> building for: 7.1-RELEASE-p13 sparc64
> ...
> ===>  Building for lua51-alien-0.5.0
> cc -c -O2 -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/local/include/lua51 -DBSD -fPIC  -o src/alien/core.o src/alien/core.c
> src/alien/core.c:308: error: 'FFI_SYSV' undeclared here (not in a function)
> *** Error code 1

Hmm...

  $ cd devel/libffi; make patch; cd $(make -V WRKSRC)
  $ fgrep -l FFI_SYSV src/*/*ffitarg* | sed 's|src/||; s|/ffi.*||' | rs 1
  arm avr32 cris m32r m68k powerpc s390 sh sh64 x86

Try to apply below diff and if it doesn't build or crashes then just
mark the port as BROKEN on sparc64.

%%
Index: devel/lua-alien/files/patch-src-alien-core.c
===================================================================
RCS file: devel/lua-alien/files/patch-src-alien-core.c
diff -N devel/lua-alien/files/patch-src-alien-core.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ devel/lua-alien/files/patch-src-alien-core.c	10 Sep 2010 17:14:27 -0000
@@ -0,0 +1,11 @@
+--- src/alien/core.c~
++++ src/alien/core.c
+@@ -301,7 +301,7 @@ static void *alien_loadfunc (lua_State *
+ #define FFI_STDCALL FFI_DEFAULT_ABI
+ #endif
+ 
+-#ifdef DARWIN
++#if defined(DARWIN) || !defined(FFI_SYSV)
+ #define FFI_SYSV FFI_DEFAULT_ABI
+ #endif
+ 
%%


More information about the freebsd-ports mailing list