v2pro/koala

alpine系统编译不了

Closed this issue · 1 comments

/go/src/github.com/didi/rdebug/koala # ./build.sh recorder
+++ dirname ./build.sh
++ cd ../.
++ pwd -P
+ RDEBUG=/go/src/github.com/didi/rdebug
+ case $1 in
+ export GOPATH=/tmp/build-golang
+ GOPATH=/tmp/build-golang
+ export 'CGO_CFLAGS=-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ CGO_CFLAGS='-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ export 'CGO_CPPFLAGS=-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ CGO_CPPFLAGS='-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ export 'CGO_CXXFLAGS=-std=c++11 -Wno-ignored-attributes'
+ CGO_CXXFLAGS='-std=c++11 -Wno-ignored-attributes'
+ exec go build -tags=koala_recorder -buildmode=c-shared -o /go/src/github.com/didi/rdebug/output/libs/koala-recorder.so github.com/didi/rdebug/koala/cmd/recorder
# github.com/didi/rdebug/koala/gateway/gw4libc
In file included from file_hook.cpp:11:
file_hook.cpp:73:11: error: redefinition of 'template<class ... Args> decltype (fopen(real::fopen::args ...)) real::fopen(Args ...)'
 INTERPOSE(fopen)(const char *filename, const char *opentype) {
           ^~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
     auto NAME(Args... args) -> decltype(::NAME(args...)) { \
          ^~~~
file_hook.cpp:19:11: note: 'template<class ... Args> decltype (fopen(real::fopen::args ...)) real::fopen(Args ...)' previously declared here
 INTERPOSE(fopen64)(const char *filename, const char *opentype) {
           ^~~~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
     auto NAME(Args... args) -> decltype(::NAME(args...)) { \
          ^~~~
file_hook.cpp:73:11: error: redefinition of 'FILE* fopen(const char*, const char*)'
 INTERPOSE(fopen)(const char *filename, const char *opentype) {
           ^~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
   extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
                               ^~~~
file_hook.cpp:19:11: note: 'FILE* fopen(const char*, const char*)' previously defined here
 INTERPOSE(fopen64)(const char *filename, const char *opentype) {
           ^~~~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
   extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
                               ^~~~
file_hook.cpp:101:11: error: redefinition of 'template<class ... Args> decltype (open(real::open::args ...)) real::open(Args ...)'
 INTERPOSE(open)(const char *filename, int flags, ...) {
           ^~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
     auto NAME(Args... args) -> decltype(::NAME(args...)) { \
          ^~~~
file_hook.cpp:47:11: note: 'template<class ... Args> decltype (open(real::open::args ...)) real::open(Args ...)' previously declared here
 INTERPOSE(open64)(const char *filename, int flags, mode_t mode) {
           ^~~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
     auto NAME(Args... args) -> decltype(::NAME(args...)) { \
          ^~~~
file_hook.cpp:101:11: error: redefinition of 'int open(const char*, int, ...)'
 INTERPOSE(open)(const char *filename, int flags, ...) {
           ^~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
   extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
                               ^~~~
file_hook.cpp:47:11: note: 'int open(const char*, int, ...)' previously defined here
 INTERPOSE(open64)(const char *filename, int flags, mode_t mode) {
           ^~~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
   extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
                               ^~~~
/go/src/github.com/didi/rdebug/koala # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/8.3.0/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-8.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 8.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-cloog-backend --enable-languages=c,c++,objc,fortran,ada --disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
gcc version 8.3.0 (Alpine 8.3.0)


/go/src/github.com/didi/rdebug/koala # cat /etc/issue
Welcome to Alpine Linux 3.10
Kernel \r on an \m (\l)