Project

General

Profile

Actions

Bug #877

closed

Multiple inclusions of different <cdefs.h>

Added by Alex A. almost 10 years ago. Updated almost 10 years ago.

Status:
Completed
Priority:
High
Assignee:
Category:
libcrystax
Target version:
Start date:
01/24/2015
Due date:
% Done:

100%

Estimated time:
CPU Architecture:
Host OS:
Linux
Toolchain:
gcc-4.9
Android version:
CrystaX NDK Version:

Description

I'm trying to compile sqlite3 using https://github.com/lookout/sqlite-android.git repo and getting some redefinition errors

vagrant@vagrant-ubuntu-trusty-64:~/sqlite-android$ ndk-build V=1
rm -f ./libs/arm64-v8a/lib*.so ./libs/armeabi/lib*.so ./libs/armeabi-v7a/lib*.so ./libs/armeabi-v7a-hard/lib*.so ./libs/mips/lib*.so ./libs/x86/lib*.so ./libs/x86_64/lib*.so
rm -f ./libs/arm64-v8a/gdbserver ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/armeabi-v7a-hard/gdbserver ./libs/mips/gdbserver ./libs/x86/gdbserver ./libs/x86_64/gdbserver
rm -f ./libs/arm64-v8a/gdb.setup ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/armeabi-v7a-hard/gdb.setup ./libs/mips/gdb.setup ./libs/x86/gdb.setup ./libs/x86_64/gdb.setup
[armeabi] Compile thumb  : sqlite <= sqlite3.c
/opt/crystax-ndk-10.1.0/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -MMD -MP -MF ./obj/local/armeabi/objs/sqlite/__/sqlite3.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -g -DNDEBUG -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Ijni -DANDROID -DSQLITE_THREADSAFE=1 -Wa,--noexecstack -Wformat -Werror=format-security -Wall -Wno-unused -Wno-multichar -Wstrict-aliasing=2 -Werror -fvisibility=hidden -fno-exceptions -fmessage-length=0 -c -I/opt/crystax-ndk-10.1.0/sources/crystax/include -I/opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include jni/../sqlite3.c -o ./obj/local/armeabi/objs/sqlite/__/sqlite3.o
In file included from /opt/crystax-ndk-10.1.0/sources/crystax/include/sys/cdefs.h:59:0,
                 from /opt/crystax-ndk-10.1.0/sources/crystax/include/crystax/freebsd.h:34,
                 from /opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/stdio.h:43,
                 from jni/../sqlite3.c:7993:
/opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/crystax/google/sys/cdefs.h:447:0: error: "__XSI_VISIBLE" redefined [-Werror]
 #define __XSI_VISIBLE  500
 ^
In file included from /opt/crystax-ndk-10.1.0/sources/crystax/include/crystax/freebsd.h:34:0,
                 from /opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/stdio.h:43,
                 from jni/../sqlite3.c:7993:
/opt/crystax-ndk-10.1.0/sources/crystax/include/sys/cdefs.h:52:0: note: this is the location of the previous definition
 #define __XSI_VISIBLE 600
 ^
In file included from /opt/crystax-ndk-10.1.0/sources/crystax/include/sys/cdefs.h:59:0,
                 from /opt/crystax-ndk-10.1.0/sources/crystax/include/crystax/freebsd.h:34,
                 from /opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/stdio.h:43,
                 from jni/../sqlite3.c:7993:
/opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/crystax/google/sys/cdefs.h:468:0: error: "__POSIX_VISIBLE" redefined [-Werror]
 #define __POSIX_VISIBLE  199506
 ^
In file included from /opt/crystax-ndk-10.1.0/sources/crystax/include/crystax/freebsd.h:34:0,
                 from /opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/stdio.h:43,
                 from jni/../sqlite3.c:7993:
/opt/crystax-ndk-10.1.0/sources/crystax/include/sys/cdefs.h:47:0: note: this is the location of the previous definition
 #define __POSIX_VISIBLE 200809
 ^
In file included from /opt/crystax-ndk-10.1.0/sources/crystax/include/sys/cdefs.h:59:0,
                 from /opt/crystax-ndk-10.1.0/sources/crystax/include/crystax/freebsd.h:34,
                 from /opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/stdio.h:43,
                 from jni/../sqlite3.c:7993:
/opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/crystax/google/sys/cdefs.h:469:0: error: "__ISO_C_VISIBLE" redefined [-Werror]
 #define __ISO_C_VISIBLE  1990
 ^
In file included from /opt/crystax-ndk-10.1.0/sources/crystax/include/crystax/freebsd.h:34:0,
                 from /opt/crystax-ndk-10.1.0/platforms/android-3/arch-arm/usr/include/stdio.h:43,
                 from jni/../sqlite3.c:7993:
/opt/crystax-ndk-10.1.0/sources/crystax/include/sys/cdefs.h:57:0: note: this is the location of the previous definition
 #define __ISO_C_VISIBLE 1999
 ^
cc1: all warnings being treated as errors
make: *** [obj/local/armeabi/objs/sqlite/__/sqlite3.o] Error 1

To reproduce:

git clone https://github.com/lookout/sqlite-android.git
cd sqlite-android
make
ndk-build
Actions

Also available in: Atom PDF