Your message dated Wed, 28 May 2014 10:49:07 +0000
with message-id <e1wpbpv-0007m4...@franck.debian.org>
and subject line Bug#749501: fixed in osmium 0.0~20111213-g7f3500a-3.1
has caused the Debian Bug report #749501,
regarding package osmium_0.0~20111213-g7f3500a-3 FTBFS on big endian.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
749501: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749501
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: osmium
Version: 0.0~20111213-g7f3500a-3
Severity: important
Tags: sid patch
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch

Hello,

Package osmium_ FTBFS on mips big-endian.

mips build log:
https://buildd.debian.org/status/fetch.php?pkg=osmium&arch=mips&ver=0.0~20111213-g7f3500a-3&stamp=1397047060

Test values are hard-coded in little-endian.
I am sending a patch which detects endianess used and adds big-endian test 
values.

Best Regards,
Jurica
--- osmium-0.0~20111213-g7f3500a.orig/include/osmium/geometry.hpp
+++ osmium-0.0~20111213-g7f3500a/include/osmium/geometry.hpp
@@ -23,6 +23,7 @@ You should have received a copy of the L
 */
 
 #include <sstream>
+#include <endian.h>
 
 #ifdef OSMIUM_WITH_GEOS
 # include <geos/geom/GeometryFactory.h>
@@ -40,6 +41,14 @@ You should have received a copy of the L
 #include <osmium/exceptions.hpp>
 #include <osmium/osm/types.hpp>
 
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define BYTE_ORDER_LITTLE_ENDIAN
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define BYTE_ORDER_BIG_ENDIAN
+#else
+# error unknown byte order
+#endif
+
 namespace Osmium {
 
     /**
@@ -161,7 +173,11 @@ namespace Osmium {
          * - (optionally) the SRID
          */
         inline void write_binary_wkb_header(std::ostream& out, bool with_srid, uint32_t type) {
+#ifdef BYTE_ORDER_LITTLE_ENDIAN // LITTLE_ENDIAN
             write_binary<uint8_t>(out, wkbNDR);
+#else // BIG_ENDIAN
+	    write_binary<uint8_t>(out, wkbXDR);
+#endif
             if (with_srid) {
                 write_binary<uint32_t>(out, type | wkbSRID);
                 write_binary<uint32_t>(out, srid);
@@ -178,7 +194,11 @@ namespace Osmium {
          * - (optionally) the SRID
          */
         inline void write_hex_wkb_header(std::ostream& out, bool with_srid, uint32_t type) {
+#ifdef BYTE_ORDER_LITTLE_ENDIAN // LITTLE_ENDIAN
             write_hex<uint8_t>(out, wkbNDR);
+#else // BIG_ENDIAN
+            write_hex<uint8_t>(out, wkbXDR);
+#endif
             if (with_srid) {
                 write_hex<uint32_t>(out, type | wkbSRID);
                 write_hex<uint32_t>(out, srid);
--- osmium-0.0~20111213-g7f3500a.orig/test/testgroup_ogr/geometry/test_geometry.cpp
+++ osmium-0.0~20111213-g7f3500a/test/testgroup_ogr/geometry/test_geometry.cpp
@@ -53,7 +53,11 @@ BOOST_AUTO_TEST_CASE(polygon_from_way) {
     OGRPolygon* ogrpolygon = polygon.create_ogr_geometry();
     std::string ogrwkb;
     ogrwkb.resize(ogrpolygon->WkbSize());
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     ogrpolygon->exportToWkb(wkbNDR, (unsigned char*)ogrwkb.c_str());
+#else
+    ogrpolygon->exportToWkb(wkbXDR, (unsigned char*)ogrwkb.c_str());
+#endif
     output_test_stream osmiumwkb;
     osmiumwkb << polygon.as_WKB();
     BOOST_CHECK_EQUAL(osmiumwkb.str().size(), ogrpolygon->WkbSize());
--- osmium-0.0~20111213-g7f3500a.orig/test/testgroup_plain/geometry/test_linestring_geometry.cpp
+++ osmium-0.0~20111213-g7f3500a/test/testgroup_plain/geometry/test_linestring_geometry.cpp
@@ -47,19 +47,35 @@ BOOST_AUTO_TEST_CASE(output) {
 
     std::ostringstream out_wkb;
     out_wkb << line2.as_WKB();
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "01020000000300000033333333333307403333333333330740666666666666FE3F3333333333330740666666666666FE3F666666666666FE3F");
+#else
+    BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "000000000200000003400733333333333340073333333333333FFE66666666666640073333333333333FFE6666666666663FFE666666666666");
+#endif
 
     std::ostringstream out_ewkb;
     out_ewkb << line2.as_WKB(true);
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0102000020E61000000300000033333333333307403333333333330740666666666666FE3F3333333333330740666666666666FE3F666666666666FE3F");
+#else
+    BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0020000002000010E600000003400733333333333340073333333333333FFE66666666666640073333333333333FFE6666666666663FFE666666666666");
+#endif
 
     std::ostringstream out_hexwkb;
     out_hexwkb << line1.as_HexWKB();
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(out_hexwkb.str(), "010200000003000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740");
+#else
+    BOOST_CHECK_EQUAL(out_hexwkb.str(), "0000000002000000033FFE6666666666663FFE6666666666663FFE666666666666400733333333333340073333333333334007333333333333");
+#endif
 
     std::ostringstream out_hexewkb;
     out_hexewkb << line1.as_HexWKB(true);
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(out_hexewkb.str(), "0102000020E610000003000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740");
+#else
+    BOOST_CHECK_EQUAL(out_hexewkb.str(), "0020000002000010E6000000033FFE6666666666663FFE6666666666663FFE666666666666400733333333333340073333333333334007333333333333");
+#endif
 }
 
 BOOST_AUTO_TEST_SUITE_END()
--- osmium-0.0~20111213-g7f3500a.orig/test/testgroup_plain/geometry/test_point_geometry.cpp
+++ osmium-0.0~20111213-g7f3500a/test/testgroup_plain/geometry/test_point_geometry.cpp
@@ -36,19 +36,35 @@ BOOST_AUTO_TEST_CASE(output) {
 
     std::ostringstream out_wkb;
     out_wkb << point1.as_WKB();
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "0101000000333333333333F33F3333333333330B40");
+#else
+    BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "00000000013FF3333333333333400B333333333333");
+#endif
 
     std::ostringstream out_ewkb;
     out_ewkb << point1.as_WKB(true);
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0101000020E6100000333333333333F33F3333333333330B40");
+#else
+    BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0020000001000010E63FF3333333333333400B333333333333");
+#endif
 
     std::ostringstream out_hexwkb;
     out_hexwkb << point1.as_HexWKB();
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(out_hexwkb.str(), "0101000000333333333333F33F3333333333330B40");
+#else
+    BOOST_CHECK_EQUAL(out_hexwkb.str(), "00000000013FF3333333333333400B333333333333");
+#endif
 
     std::ostringstream out_hexewkb;
     out_hexewkb << point1.as_HexWKB(true);
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(out_hexewkb.str(), "0101000020E6100000333333333333F33F3333333333330B40");
+#else
+    BOOST_CHECK_EQUAL(out_hexewkb.str(), "0020000001000010E63FF3333333333333400B333333333333");
+#endif
 }
 
 BOOST_AUTO_TEST_SUITE_END()
--- osmium-0.0~20111213-g7f3500a.orig/test/testgroup_plain/geometry/test_polygon_geometry.cpp
+++ osmium-0.0~20111213-g7f3500a/test/testgroup_plain/geometry/test_polygon_geometry.cpp
@@ -51,19 +51,35 @@ BOOST_AUTO_TEST_CASE(output) {
 
     std::ostringstream out_wkb;
     out_wkb << polygon.as_WKB();
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "01030000000100000004000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740666666666666FE3F666666666666FE3F");

+#else
+    BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), "000000000300000001000000043FFE6666666666663FFE6666666666663FFE6666666666664007333333333333400733333333333340073333333333333FFE6666666666663FFE666666666666");
+#endif
     std::ostringstream out_ewkb;
     out_ewkb << polygon.as_WKB(true);
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0103000020E61000000100000004000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740666666666666FE3F666666666666FE3F");

+#else
+    BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), "0020000003000010E600000001000000043FFE6666666666663FFE6666666666663FFE6666666666664007333333333333400733333333333340073333333333333FFE6666666666663FFE666666666666");
+#endif
     std::ostringstream out_hexwkb;
     out_hexwkb << polygon.as_HexWKB();
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(out_hexwkb.str(), "01030000000100000004000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740666666666666FE3F666666666666FE3F");

+#else
+    BOOST_CHECK_EQUAL(out_hexwkb.str(), "000000000300000001000000043FFE6666666666663FFE6666666666663FFE6666666666664007333333333333400733333333333340073333333333333FFE6666666666663FFE666666666666");
+#endif
     std::ostringstream out_hexewkb;
     out_hexewkb << polygon.as_HexWKB(true);
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
     BOOST_CHECK_EQUAL(out_hexewkb.str(), "0103000020E61000000100000004000000666666666666FE3F666666666666FE3F666666666666FE3F333333333333074033333333333307403333333333330740666666666666FE3F666666666666FE3F");
+#else
+    BOOST_CHECK_EQUAL(out_hexewkb.str(), "0020000003000010E600000001000000043FFE6666666666663FFE6666666666663FFE6666666666664007333333333333400733333333333340073333333333333FFE6666666666663FFE666666666666");
+#endif
 }
 
 BOOST_AUTO_TEST_SUITE_END()

--- End Message ---
--- Begin Message ---
Source: osmium
Source-Version: 0.0~20111213-g7f3500a-3.1

We believe that the bug you reported is fixed in the latest version of
osmium, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 749...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Anibal Monsalve Salazar <ani...@debian.org> (supplier of updated osmium package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 28 May 2014 09:20:00 +0100
Source: osmium
Binary: libosmium-dev osmjs
Architecture: source mips
Version: 0.0~20111213-g7f3500a-3.1
Distribution: unstable
Urgency: medium
Maintainer: Debian OpenStreetMap Team <pkg-osm-maint@lists.alioth.debian.org>
Changed-By: Anibal Monsalve Salazar <ani...@debian.org>
Description: 
 libosmium-dev - C++ framework for working with OSM data files
 osmjs      - osmium-based Javascript framework for handling OSM data
Closes: 749501
Changes: 
 osmium (0.0~20111213-g7f3500a-3.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Fix FTBFS on mips big-endian.
     Add 04-big-endian.patch.
     Patch by Jurica Stanojkovic <jurica.stanojko...@imgtec.com>.
     Closes: #749501.
Checksums-Sha1: 
 bc6cb2e00c0aa4cbf090e96cae6e3f3fcdc2f96e 2288 
osmium_0.0~20111213-g7f3500a-3.1.dsc
 2279a7bec1688e4925c214e5e3b9416e719958c3 9168 
osmium_0.0~20111213-g7f3500a-3.1.debian.tar.xz
 0eb270f6bb6b9cd4fef9a71cc754fdf623d24764 78538 
libosmium-dev_0.0~20111213-g7f3500a-3.1_mips.deb
 5c8d6b3a04d1f5a7d70bd49fbb210791f612e4d8 183268 
osmjs_0.0~20111213-g7f3500a-3.1_mips.deb
Checksums-Sha256: 
 5d8048bc203e13b648138bf4dbb74558ec2ed75f88a3ef93b8cd5e22b5468bec 2288 
osmium_0.0~20111213-g7f3500a-3.1.dsc
 3f0a9b516c8a797af236399167ee0d74eb50a88c36b8b7944fe2bc7fc0b81ab5 9168 
osmium_0.0~20111213-g7f3500a-3.1.debian.tar.xz
 541544638f48ab6ab388af8dac9463c1bca5bb838d58fdfd1d033e06cc312ca7 78538 
libosmium-dev_0.0~20111213-g7f3500a-3.1_mips.deb
 0a17b45fa7091922346bb46ef3c081ea6767c0e7ae1fd7410fd4d63c0107a329 183268 
osmjs_0.0~20111213-g7f3500a-3.1_mips.deb
Files: 
 009db3e0ddbd3b35cd57d6f9d560a621 78538 libdevel extra 
libosmium-dev_0.0~20111213-g7f3500a-3.1_mips.deb
 5e2b319bc2c1b8e21f5fb8bef0fb7d05 183268 utils extra 
osmjs_0.0~20111213-g7f3500a-3.1_mips.deb
 03bfc3597986e0729776a30e174a616d 2288 utils extra 
osmium_0.0~20111213-g7f3500a-3.1.dsc
 c3bf7880ca14364d08a257682653f3b1 9168 utils extra 
osmium_0.0~20111213-g7f3500a-3.1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJThbs5AAoJEHxWrP6UeJfYZd8QAMQaB005DfcxiU9B5dKR+6i0
17gml5/4MXKqAHwwTLXvUtHFcy/ICnOuNg9UlSaJA+PrL1/Q5rE/iinxYlX6K4gh
3mYw3XPUlPOrPrsCS4VrJyxd2RQz9QIxQXbrnbZovN+Uma3RhGCXloWcunEuLUQe
Kk8xcCO2mO+4TQhryxEypztYbNX4MkNSazEi5/VDxEKV2NhkB6fbgbdyhOdRxD7b
7gOtLa+6bN17grLcFuCGvH0c9eWTalbGUEJFnK/sNCpTOKH6ItXCDjx5jaAsmBHc
wRzuX4zgZSwjAlsifPtD8Vq0tg2/X5QzAB6+fw6QX6AMHrlLlokFSXM7kMbjA7v3
8Q+wNlpet7XxoCfkiLfGllVz3wKnCe4pHYLZTa1F/zqdhf2Nok8iTexKF1siGvkL
evEgEXGKzVq1UC+u8IZ8uhjGPoHf4XDaXHO8d2+x6ZxQVER3ofotRlh0OB1N57rx
dNKbzt2agw9zO62UdqXIbiDrmRxg0ppeYVuit08/T++n9Sg63l1mkjfwjorfem0Z
2xukb89d9Pr1P5Bp1To8HrqUrZaAXfK6ezW+97/ZdhgZND8ywLsHwN3ILQ5R7k/H
cTtkkNtyPWZZQNLn3k3txtT9BPHggCsWo3XHlYYWQ0WVWx0e3Pj8dAYFKc75Jh9b
qARqjb++gq5uJo9kH9RR
=Fdp9
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Pkg-osm-maint mailing list
Pkg-osm-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-osm-maint

Reply via email to