On Wed, May 18, 2016 at 09:51:07PM +0200, Jeremie Courreges-Anglas wrote:
> Matthieu Herrb <matth...@herrb.eu> writes:
> 
> > Hi,
> 
> Hi,
> 
> > I wanted to backup some data on a sparc64 using borg backup. I built
> > it myself after the last ABI jump. It fails with:
> >
> > pufferix$ doas borg init --help
> > python3.4:/usr/local/lib/python3.4/site-packages/borg/hashindex.so: 
> > undefined symbol '__builtin_bswap32'
> 
> It turns out I was just taking a look at borg.  Here's a diff that
> should fix your problem.

Yes. That works here. Thanks.

> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/borgbackup/Makefile,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile
> --- Makefile  15 May 2016 18:22:44 -0000      1.4
> +++ Makefile  18 May 2016 19:49:40 -0000
> @@ -3,6 +3,7 @@
>  COMMENT =            deduplicating backup program
>  
>  MODPY_EGG_VERSION =  1.0.2
> +REVISION =           0
>  DISTNAME =           borgbackup-${MODPY_EGG_VERSION}
>  
>  MODPY_PI =           Yes
> Index: patches/patch-borg__hashindex_c
> ===================================================================
> RCS file: patches/patch-borg__hashindex_c
> diff -N patches/patch-borg__hashindex_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-borg__hashindex_c   18 May 2016 19:49:40 -0000
> @@ -0,0 +1,25 @@
> +$OpenBSD$
> +
> +__builtin_bswap32 unavailable at least on sparc64
> +
> +--- borg/_hashindex.c.orig   Fri Apr 15 02:05:17 2016
> ++++ borg/_hashindex.c        Wed May 18 21:47:45 2016
> +@@ -7,6 +7,7 @@
> + #include <sys/stat.h>
> + #include <fcntl.h>
> + #include <unistd.h>
> ++#include <endian.h>
> + 
> + #if defined (__SVR4) && defined (__sun)
> + #include <sys/isa_defs.h>
> +@@ -14,8 +15,8 @@
> + 
> + #if (defined(BYTE_ORDER)&&(BYTE_ORDER == BIG_ENDIAN)) ||  \
> +     (defined(_BIG_ENDIAN)&&defined(__SVR4)&&defined(__sun))
> +-#define _le32toh(x) __builtin_bswap32(x)
> +-#define _htole32(x) __builtin_bswap32(x)
> ++#define _le32toh(x) letoh32(x)
> ++#define _htole32(x) htole32(x)
> + #elif (defined(BYTE_ORDER)&&(BYTE_ORDER == LITTLE_ENDIAN)) || \
> +       (defined(_LITTLE_ENDIAN)&&defined(__SVR4)&&defined(__sun))
> + #define _le32toh(x) (x)
> 
> 
> -- 
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

-- 
Matthieu Herrb

Attachment: signature.asc
Description: PGP signature

Reply via email to