[zeromq-dev] error: ISO C++ 1998 does not support 'long long'

Peter Kleiweg pkleiweg at xs4all.nl
Wed Oct 23 18:49:02 CEST 2013


Pieter Hintjens schreef op de 23e dag van de wijnmaand van het jaar 2013:

> The best option would be to make a patch for libsodium,
> github.com/jedisct1/libsodium

Libsodium uses a lot of long long. And why would the maker 
change it? There is nothing wrong with using long long per se.

 
> The FAIL on test_stream will be something different. Can you get
> details on that?

In test_stream_to_dealer, some fields are shifted 5 bytes to the
right. If I change the test like below, the test passes.

I don't get it. The availability of libsodium shouldn't change 
code that doesn't depend on it. And the tests passes if 
libsodium is unavailable. Nor should removing the option 
-pedantic change anything. It is a warning option, it doesn't 
change how code is compiled. 


Changed test that passes:


--- test_stream.cpp     2013-09-26 12:17:28.000000000 +0200
+++ test_stream.cpp.new 2013-10-23 18:13:25.000000000 +0200
@@ -106,15 +106,15 @@
     //  First two bytes are major and minor version numbers.
     assert (buffer [0] == 3);       //  ZMTP/3.0
     assert (buffer [1] == 0);
 
     //  Mechanism is "NULL"
     assert (memcmp (buffer + 2, "NULL\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) == 0);
-    assert (memcmp (buffer + 54, "\4\51\5READY", 8) == 0);
-    assert (memcmp (buffer + 62, "\13Socket-Type\0\0\0\6DEALER", 22) == 0);
-    assert (memcmp (buffer + 84, "\10Identity\0\0\0\0", 13) == 0);
+    assert (memcmp (buffer + 54 + 5, "\4\51\5READY", 8) == 0);
+    assert (memcmp (buffer + 62 + 5, "\13Socket-Type\0\0\0\6DEALER", 22) == 0);
+    assert (memcmp (buffer + 84 + 5, "\10Identity\0\0\0\0", 13) == 0);
 
     //  Announce we are ready
     memcpy (buffer, "\4\51\5READY", 8);
     memcpy (buffer + 8, "\13Socket-Type\0\0\0\6ROUTER", 22);
     memcpy (buffer + 30, "\10Identity\0\0\0\0", 13);







> 
> On Wed, Oct 23, 2013 at 11:23 AM, Peter Kleiweg <pkleiweg at xs4all.nl> wrote:
> >
> > Debian GNU/Linux 6.0, 2.6.32-5-amd64
> > ZeroMQ, version 4.0.1
> > libsodium, version 0.4.3
> >
> > When I compile ZeroMQ without libsodium, and then run `make check` I get:
> >
> >     XFAIL: test_linger
> >
> > When I try to compile with libsodium, I get:
> >
> >     ... sodium/randombytes.h:29: error: ISO C++ 1998 does not support 'long long'
> >
> > When I remove all options '-pendantic' from each ZeroMQ Makefile, it compiles.
> > But then, running `make check` gives:
> >
> >     XFAIL: test_linger
> >     FAIL: test_stream




-- 
Peter Kleiweg
http://pkleiweg.home.xs4all.nl/



More information about the zeromq-dev mailing list