Package: libbitcoin
Version: 2.0-2
Severity: important
Tags: sid + patch
Justification: FTBFS
User: [email protected]

Hello,

Package libbitcoin_2.0-2 FTBFS on big endian architectures.
https://buildd.debian.org/status/package.php?p=libbitcoin&suite=sid

with following error:

/bin/bash ../libtool  --tag=CXX   --mode=compile g++ 
-DPACKAGE_NAME=\"libbitcoin\" -DPACKAGE_TARNAME=\"libbitcoin\" 
-DPACKAGE_VERSION=\"1.0.10\" -DPACKAGE_STRING=\"libbitcoin\ 1.0.10\" 
-DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
-DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 
-D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DPACKAGE=\"libbitcoin\" 
-DVERSION=\"1.0.10\" -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" 
-DHAVE_BOOST=/\*\*/ -I.  -I./../include -D_FORTIFY_SOURCE=2 -ggdb -g3 -Wall 
-Wno-missing-braces -pedantic -Wextra -fstack-protector-all -DDEBUG -g -O2 
-Wformat -Werror=format-security -Wall -std=c++11 -c -o satoshi_serialize.lo 
satoshi_serialize.cpp
libtool: compile:  g++ -DPACKAGE_NAME=\"libbitcoin\" 
-DPACKAGE_TARNAME=\"libbitcoin\" -DPACKAGE_VERSION=\"1.0.10\" 
"-DPACKAGE_STRING=\"libbitcoin 1.0.10\"" 
-DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
-DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 
-D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DPACKAGE=\"libbitcoin\" 
-DVERSION=\"1.0.10\" -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" 
"-DHAVE_BOOST=/**/" -I. -I./../include -D_FORTIFY_SOURCE=2 -ggdb -g3 -Wall 
-Wno-missing-braces -pedantic -Wextra -fstack-protector-all -DDEBUG -g -O2 
-Wformat -Werror=format-security -Wall -std=c++11 -c satoshi_serialize.cpp  
-fPIC -DPIC -o .libs/satoshi_serialize.o
In file included from ./../include/bitcoin/satoshi_serialize.hpp:24:0,
                 from satoshi_serialize.cpp:20:
./../include/bitcoin/format.hpp:49:27: error: #elif with no expression
     #elif BOOST_BIG_ENDIAN
                           ^
./../include/bitcoin/format.hpp:52:10: error: #error "Endian isn't defined!"
         #error "Endian isn't defined!"
          ^
./../include/bitcoin/format.hpp:70:27: error: #elif with no expression
     #elif BOOST_BIG_ENDIAN
                           ^
./../include/bitcoin/format.hpp:73:10: error: #error "Endian isn't defined!"
         #error "Endian isn't defined!"
          ^
In file included from ./../include/bitcoin/satoshi_serialize.hpp:29:0,
                 from satoshi_serialize.cpp:20:
./../include/bitcoin/utility/serializer.hpp:348:27: error: #elif with no 
expression
     #elif BOOST_BIG_ENDIAN
                           ^
./../include/bitcoin/utility/serializer.hpp:351:10: error: #error "Endian isn't 
defined!"
         #error "Endian isn't defined!"
          ^
make[2]: *** [satoshi_serialize.lo] Error 1

This issue is resolved with the patch attached.

Regards,
Jurica
--- libbitcoin-2.0.orig/include/bitcoin/format.hpp
+++ libbitcoin-2.0/include/bitcoin/format.hpp
@@ -46,7 +46,7 @@ T cast_chunk(data_chunk chunk, bool reve
 {
     #ifdef BOOST_LITTLE_ENDIAN
         // do nothing
-    #elif BOOST_BIG_ENDIAN
+    #elif defined BOOST_BIG_ENDIAN
         reverse = !reverse;
     #else
         #error "Endian isn't defined!"
@@ -67,7 +67,7 @@ data_chunk uncast_type(T value, bool rev
     // TODO Future versions of boost will have boost::native_to_little(value);
     #ifdef BOOST_LITTLE_ENDIAN
         // do nothing
-    #elif BOOST_BIG_ENDIAN
+    #elif defined BOOST_BIG_ENDIAN
         reverse = !reverse;
     #else
         #error "Endian isn't defined!"
--- libbitcoin-2.0.orig/include/bitcoin/utility/serializer.hpp
+++ libbitcoin-2.0/include/bitcoin/utility/serializer.hpp
@@ -345,7 +345,7 @@ private:
         check_distance(begin, end, byte_array.size());
     #ifdef BOOST_LITTLE_ENDIAN
         // do nothing
-    #elif BOOST_BIG_ENDIAN
+    #elif defined BOOST_BIG_ENDIAN
         reverse = !reverse;
     #else
         #error "Endian isn't defined!"

Reply via email to