servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
170 stars 81 forks source link

Error __buffer_arg_is_not_array #115

Closed mingodad closed 6 years ago

mingodad commented 7 years ago

Hello ! I'm trying to compile on ubuntu 14.04 with gcc 6 and I'm getting this erros:

make -j 4 
SERVALD CC http_server.c
SERVALD CC rhizome_bundle.c
SERVALD CC rhizome_direct_cli.c
SERVALD CC rhizome_fetch.c
In file included from uuid.h:26:0,
                 from rhizome.h:31,
                 from rhizome_direct_cli.c:23:
rhizome_direct_cli.c: In function ‘rhizome_sync_with_peers’:
strbuf.h:303:124: error: call to ‘__buffer_arg_is_not_array’ declared with attribute error: argument to strbuf_local_buf() must be an array not a pointer
 #   define strbuf_local_buf(buf) strbuf_local((char*)(buf), (sizeof(buf) == __builtin_object_size(buf, 1)) ? sizeof(buf) : __buffer_arg_is_not_array())
                                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
strbuf.h:264:87: note: in definition of macro ‘strbuf_local’
 #define strbuf_local(buf,len) __strbuf_init_chk(alloca(SIZEOF_STRBUF), (char*)(buf), (len), __builtin_object_size((buf), 1))
                                                                                       ^~~
rhizome_direct_cli.c:60:16: note: in expansion of macro ‘strbuf_local_buf’
     strbuf h = strbuf_local_buf(state->host);
                ^~~~~~~~~~~~~~~~
make: *** [objs_servald/rhizome_direct_cli.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from instance.h:26:0,
                 from serval.h:128,
                 from rhizome_fetch.c:23:

Cheers !

lakeman commented 7 years ago

We might be triggering the same condition as this test case; https://android.googlesource.com/toolchain/gcc/+/32fce3edda831e36ee484406c39dffbe0230f257/gcc-4.8/gcc/testsuite/gcc.dg/builtin-object-size-6.c#55

But I don't know why that test is expected to return -1. It makes no sense to me.

On Thu, Oct 27, 2016 at 11:40 PM, Domingo Alvarez Duarte < notifications@github.com> wrote:

Hello ! I'm trying to compile on ubuntu 14.04 with gcc 6 and I'm getting this erros:

make -j 4 SERVALD CC http_server.c SERVALD CC rhizome_bundle.c SERVALD CC rhizome_direct_cli.c SERVALD CC rhizome_fetch.c In file included from uuid.h:26:0, from rhizome.h:31, from rhizome_direct_cli.c:23: rhizome_direct_cli.c: In function ‘rhizome_sync_with_peers’: strbuf.h:303:124: error: call to ‘__buffer_arg_is_not_array’ declared with attribute error: argument to strbuf_local_buf() must be an array not a pointer

define strbuf_local_buf(buf) strbuflocal((char)(buf), (sizeof(buf) == builtin_object_size(buf, 1)) ? sizeof(buf) : buffer_arg_is_not_array())

                                                                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~

strbuf.h:264:87: note: in definition of macro ‘strbuf_local’

define strbuf_local(buf,len) strbuf_init_chk(alloca(SIZEOFSTRBUF), (char)(buf), (len), builtin_object_size((buf), 1))

                                                                                   ^~~

rhizome_direct_cli.c:60:16: note: in expansion of macro ‘strbuf_local_buf’ strbuf h = strbuf_local_buf(state->host); ^~~~ make: * [objs_servald/rhizome_direct_cli.o] Error 1 make: * Waiting for unfinished jobs.... In file included from instance.h:26:0, from serval.h:128, from rhizome_fetch.c:23:

Cheers !

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/servalproject/serval-dna/issues/115, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkD3omEEiSc2EpC8I5N9JcAUZA1x7Maks5q4KLFgaJpZM4KiVGc .

kbmulligan commented 6 years ago

I think you can close this due to this commit: https://github.com/servalproject/serval-dna/commit/f83b15d251aeffce9f015f64a1668bc63fea497c#diff-198e52d1482d46a3ffe7817dce7ec910