General user support mailing list

2 2

[alpine-user] error: '__va_copy' was not declared in this scope

Kouam Josiane
Details
Message ID
<CAL8WB=tWPUGkK2qhAxUxzDwLUFLtjcFzpV6y2__EMQx0uWP5dA@mail.gmail.com>
Sender timestamp
1562235412
DKIM signature
missing
Download raw message
Hello everyone,

I'm new in alpine linux and i want to compile an c++ project i've well
compiled in ubuntu linux using gcc v5.4.0.

I'm using alpine 6.4.0 version of gcc and g++ compiler.

I got this error and many other syntax error. I don't know if there is a
corresponding version of gcc i should use in this case.


Here are the output of make command :

g++ -g -O3 -fno-strict-aliasing -MD -msse4.2 -DNDEBUG -march=native
-DENABLE_ZOOKEEPER -std=c++11 -I/root/RAMCloud/src
-I/root/RAMCloud/obj.master -I/root/RAMCloud/gtest/include
-I/usr/local/openonload-201405/src/include -Werror -Wall -Wformat=2 -Wextra
-Wwrite-strings -Wno-unused-parameter -Wmissing-format-attribute
-Wno-non-template-friend -Woverloaded-virtual -Wcast-qual -Wcast-align
-Wconversion -Weffc++ -fPIC -c -o obj.master/Common.o
/root/RAMCloud/src/Common.cc
/root/RAMCloud/src/Common.cc: In function 'std::__cxx11::string
RAMCloud::vformat(const char*, __va_list_tag*)':
/root/RAMCloud/src/Common.cc:65:25: error: '__va_copy' was not declared in
this scope
         __va_copy(aq, ap);
                         ^
/root/RAMCloud/src/Common.cc: In function 'uint64_t
RAMCloud::_generateRandom()':
/root/RAMCloud/src/Common.cc:90:21: error: 'random_data' does not name a
type
     static __thread random_data buf;
                     ^~~~~~~~~~~
/root/RAMCloud/src/Common.cc:103:51: error: 'buf' was not declared in this
scope
         initstate_r(seed, statebuf, STATE_BYTES, &buf);
                                                   ^~~
/root/RAMCloud/src/Common.cc:103:54: error: 'initstate_r' was not declared
in this scope
         initstate_r(seed, statebuf, STATE_BYTES, &buf);
                                                      ^
/root/RAMCloud/src/Common.cc:110:15: error: 'buf' was not declared in this
scope
     random_r(&buf, &lo);
               ^~~
/root/RAMCloud/src/Common.cc:110:23: error: 'random_r' was not declared in
this scope
     random_r(&buf, &lo);
                       ^
make: *** [src/Makefrag:204: obj.master/Common.o] Error 1


Thans a lot.
PICCORO McKAY Lenz
Details
Message ID
<CALci+FRsDiAQ5N56He4T3tw6KdtCKgy2oWtFGCGh819pgOim_Q@mail.gmail.com>
In-Reply-To
<CAL8WB=tWPUGkK2qhAxUxzDwLUFLtjcFzpV6y2__EMQx0uWP5dA@mail.gmail.com> (view parent)
Sender timestamp
1562252668
DKIM signature
missing
Download raw message
missing linker¡?

from where are you using that  '__va_copy' ?

have are you declared at the header file?

El jue., 4 de jul. de 2019 a la(s) 06:17, Kouam Josiane (kouamj60@gmail.com)
escribió:

> Hello everyone,
>
> I'm new in alpine linux and i want to compile an c++ project i've well
> compiled in ubuntu linux using gcc v5.4.0.
>
> I'm using alpine 6.4.0 version of gcc and g++ compiler.
>
> I got this error and many other syntax error. I don't know if there is a
> corresponding version of gcc i should use in this case.
>
>
> Here are the output of make command :
>
> g++ -g -O3 -fno-strict-aliasing -MD -msse4.2 -DNDEBUG -march=native
> -DENABLE_ZOOKEEPER -std=c++11 -I/root/RAMCloud/src
> -I/root/RAMCloud/obj.master -I/root/RAMCloud/gtest/include
> -I/usr/local/openonload-201405/src/include -Werror -Wall -Wformat=2 -Wextra
> -Wwrite-strings -Wno-unused-parameter -Wmissing-format-attribute
> -Wno-non-template-friend -Woverloaded-virtual -Wcast-qual -Wcast-align
> -Wconversion -Weffc++ -fPIC -c -o obj.master/Common.o
> /root/RAMCloud/src/Common.cc
> /root/RAMCloud/src/Common.cc: In function 'std::__cxx11::string
> RAMCloud::vformat(const char*, __va_list_tag*)':
> /root/RAMCloud/src/Common.cc:65:25: error: '__va_copy' was not declared in
> this scope
>          __va_copy(aq, ap);
>                          ^
> /root/RAMCloud/src/Common.cc: In function 'uint64_t
> RAMCloud::_generateRandom()':
> /root/RAMCloud/src/Common.cc:90:21: error: 'random_data' does not name a
> type
>      static __thread random_data buf;
>                      ^~~~~~~~~~~
> /root/RAMCloud/src/Common.cc:103:51: error: 'buf' was not declared in this
> scope
>          initstate_r(seed, statebuf, STATE_BYTES, &buf);
>                                                    ^~~
> /root/RAMCloud/src/Common.cc:103:54: error: 'initstate_r' was not declared
> in this scope
>          initstate_r(seed, statebuf, STATE_BYTES, &buf);
>                                                       ^
> /root/RAMCloud/src/Common.cc:110:15: error: 'buf' was not declared in this
> scope
>      random_r(&buf, &lo);
>                ^~~
> /root/RAMCloud/src/Common.cc:110:23: error: 'random_r' was not declared in
> this scope
>      random_r(&buf, &lo);
>                        ^
> make: *** [src/Makefrag:204: obj.master/Common.o] Error 1
>
>
> Thans a lot.
>
Natanael Copa
Details
Message ID
<20190704172357.5a1810a4@ncopa-desktop.copa.dup.pw>
In-Reply-To
<CAL8WB=tWPUGkK2qhAxUxzDwLUFLtjcFzpV6y2__EMQx0uWP5dA@mail.gmail.com> (view parent)
Sender timestamp
1562253837
DKIM signature
missing
Download raw message
On Thu, 4 Jul 2019 12:16:52 +0200
Kouam Josiane <kouamj60@gmail.com> wrote:

> Hello everyone,
> 
> I'm new in alpine linux and i want to compile an c++ project i've well
> compiled in ubuntu linux using gcc v5.4.0.
> 
> I'm using alpine 6.4.0 version of gcc and g++ compiler.
> 
> I got this error and many other syntax error. I don't know if there is a
> corresponding version of gcc i should use in this case.

...

> /root/RAMCloud/src/Common.cc:65:25: error: '__va_copy' was not declared in
> this scope
>          __va_copy(aq, ap);
>                          ^

Looks like the Common.cc is using an internal GNU libc identifier (__va_copy).

From http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html

> With the exception of identifiers beginning with the prefix POSIX, all
> identifiers that begin with an underscore and either an uppercase
> letter or another underscore are always reserved for any use by the
> implementation.

This means that __va_copy is an idetifer for the GNU libc
implementation and can not be expected to work on any other
implementation (such as musl libc).

In other words: It is a bug in the application you are trying to build.


> /root/RAMCloud/src/Common.cc: In function 'uint64_t
> RAMCloud::_generateRandom()':
> /root/RAMCloud/src/Common.cc:90:21: error: 'random_data' does not name a
> type
>      static __thread random_data buf;
>                      ^~~~~~~~~~~
> /root/RAMCloud/src/Common.cc:103:51: error: 'buf' was not declared in this
> scope
>          initstate_r(seed, statebuf, STATE_BYTES, &buf);
>                                                    ^~~
> /root/RAMCloud/src/Common.cc:103:54: error: 'initstate_r' was not declared
> in this scope
>          initstate_r(seed, statebuf, STATE_BYTES, &buf);
>                                                       ^
> /root/RAMCloud/src/Common.cc:110:15: error: 'buf' was not declared in this
> scope
>      random_r(&buf, &lo);
>                ^~~
> /root/RAMCloud/src/Common.cc:110:23: error: 'random_r' was not declared in
> this scope
>      random_r(&buf, &lo);
>                        ^

The other errors may be related or there is some other bug int the app.

You should report it upstream to the project you are trying to build.

-nc


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---