fix lang/swi-prolog build on arm

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

fix lang/swi-prolog build on arm

Jonathan Gray-11
Use ports gcc to get atomic builtins and depend on libuuid to fix the
build.

checking for uuid_create in -lossp-uuid... no
checking for uuid_create in -luuid... yes
checking for ossp/uuid.h... no
checking for uuid.h... yes

cc -O2 -pipe    -I/usr/local/include -O2 -pipe  -pthread -fPIC -I/usr/local/include -I/usr/pobj/swi-prolog-6.6.4/pl-6.6.4/src/../include -I/usr/pobj/swi-prolog-6.6.4/pl-6.6.4/src/../packages/clib -I/usr/pobj/swi-prolog-6.6.4/pl-6.6.4/src/../packages/clib/maildrop/rfc2045 -I/usr/pobj/swi-prolog-6.6.4/pl-6.6.4/src/../packages/clib/maildrop/rfc822 -DHAVE_CONFIG_H -D__SWI_PROLOG__   -c -o uuid.o uuid.c
uuid.c: In function 'pl_uuid':
uuid.c:45:23: error: 'UUID_MAKE_V1' undeclared (first use in this function)
 { unsigned int mode = UUID_MAKE_V1;

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/swi-prolog/Makefile,v
retrieving revision 1.67
diff -u -p -r1.67 Makefile
--- Makefile 10 Sep 2016 13:03:42 -0000 1.67
+++ Makefile 30 Dec 2016 16:08:05 -0000
@@ -1,13 +1,12 @@
 # $OpenBSD: Makefile,v 1.67 2016/09/10 13:03:42 ajacoutot Exp $
 
-BROKEN-arm = undefined reference to `__sync_fetch_and_add_4'
 BROKEN-hppa = undefined reference to `__sync_fetch_and_add_4'
 BROKEN-sparc64 = infinite loop or aborts during build
 
 COMMENT = Prolog for the real world
 
 V = 6.6.4
-REVISION = 9
+REVISION = 10
 DISTNAME = pl-$V
 PKGNAME = swi-prolog-$V
 CATEGORIES = lang
@@ -28,6 +27,10 @@ WANTLIB += z
 MASTER_SITES = ${HOMEPAGE}/download/stable/src/ \
  https://distfiles.nl/
 
+# for atomic builtins
+MODULES = gcc4
+MODGCC4_ARCHS = arm
+
 CONFIGURE_STYLE = gnu
 MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC}/src \
  ${WRKSRC}/packages/jpl \
@@ -54,6 +57,7 @@ MAKE_FLAGS = SONAMEOPT= \
 BUILD_DEPENDS = ${RUN_DEPENDS}
 LIB_DEPENDS = devel/gmp \
  devel/libexecinfo \
+ devel/uuid \
  graphics/jpeg
 
 FULLARCH = ${MACHINE_ARCH:S/amd64/x86_64/}-openbsd${OSREV}
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/swi-prolog/pkg/PLIST,v
retrieving revision 1.15
diff -u -p -r1.15 PLIST
--- pkg/PLIST 15 Mar 2016 21:12:07 -0000 1.15
+++ pkg/PLIST 30 Dec 2016 16:08:05 -0000
@@ -53,6 +53,7 @@ lib/swipl-${V}/include/sicstus/
 lib/swipl-${V}/include/sicstus/sicstus.h
 lib/swipl-${V}/lib/
 lib/swipl-${V}/lib/${FULLARCH}/
+lib/swipl-${V}/lib/${FULLARCH}/archive4pl.so
 lib/swipl-${V}/lib/${FULLARCH}/cgi.so
 lib/swipl-${V}/lib/${FULLARCH}/crypt.so
 lib/swipl-${V}/lib/${FULLARCH}/double_metaphone.so
@@ -88,6 +89,7 @@ lib/swipl-${V}/lib/${FULLARCH}/uid.so
 lib/swipl-${V}/lib/${FULLARCH}/unicode4pl.so
 lib/swipl-${V}/lib/${FULLARCH}/unix.so
 lib/swipl-${V}/lib/${FULLARCH}/uri.so
+lib/swipl-${V}/lib/${FULLARCH}/uuid.so
 lib/swipl-${V}/lib/${FULLARCH}/zlib4pl.so
 lib/swipl-${V}/library/
 lib/swipl-${V}/library/DTD/
@@ -106,6 +108,7 @@ lib/swipl-${V}/library/am_match.pl
 lib/swipl-${V}/library/ansi_term.pl
 lib/swipl-${V}/library/apply.pl
 lib/swipl-${V}/library/apply_macros.pl
+lib/swipl-${V}/library/archive.pl
 lib/swipl-${V}/library/arithmetic.pl
 lib/swipl-${V}/library/assoc.pl
 lib/swipl-${V}/library/backcomp.pl
@@ -479,6 +482,7 @@ lib/swipl-${V}/library/unix.pl
 lib/swipl-${V}/library/uri.pl
 lib/swipl-${V}/library/url.pl
 lib/swipl-${V}/library/utf8.pl
+lib/swipl-${V}/library/uuid.pl
 lib/swipl-${V}/library/varnumbers.pl
 lib/swipl-${V}/library/vm.pl
 lib/swipl-${V}/library/when.pl

Reply | Threaded
Open this post in threaded view
|

Re: fix lang/swi-prolog build on arm

Edd Barrett-3
On Sat, Dec 31, 2016 at 03:13:37AM +1100, Jonathan Gray wrote:
> Use ports gcc to get atomic builtins and depend on libuuid to fix the
> build.

This looks fine to me. Have you tested on amd64?

--
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk

Reply | Threaded
Open this post in threaded view
|

Re: fix lang/swi-prolog build on arm

Jonathan Gray-11
On Fri, Dec 30, 2016 at 09:02:34PM +0000, Edd Barrett wrote:
> On Sat, Dec 31, 2016 at 03:13:37AM +1100, Jonathan Gray wrote:
> > Use ports gcc to get atomic builtins and depend on libuuid to fix the
> > build.
>
> This looks fine to me. Have you tested on amd64?

Using base gcc results in a build that lacks files so it won't build with
the diff.