Hi, I hope somebody can give me a nudge in the right direction here, I am working with Berkeley DB v6.2.23 and am trying to cross compile for arm-linux, using my build machine which is x86 linux.
Are there any known gotchas i should know about???
this is the error i get when i run .configure
checking for atomic operations... db_cv_atomicconfigure: error: in `/home/alan/workspace/extLibs/db-6.2.23/build_arm':
configure: error: cannot run test program while cross compiling
can i comment out the test program bit from the configure script?
i tried building with '--disable-atomicsupport ' and configure completed but it has these errors when i compile... any ideas?
./libtool --mode=compile /usr/local/arm/4.9.2/usr/bin/arm-linux-g++ -c -I. -I../src -D_GNU_SOURCE -D_REENTRANT -O3 ../src/mutex/mut_pthread.c
libtool: compile: /usr/local/arm/4.9.2/usr/bin/arm-linux-g++ -c -I. -I../src -D_GNU_SOURCE -D_REENTRANT -O3 ../src/mutex/mut_pthread.c -o mut_pthread.o
In file included from ./db_int.h:1215:0,
from ../src/mutex/mut_pthread.c:11:
../src/dbinc/mutex.h: In function 'int __db_pthread_mutex_trylock(ENV*, db_mutex_t)':
../src/dbinc/mutex.h:130:63: error: too many arguments to function
env->dbenv->thread_id(env->dbenv, &mutexp->pid, &mutexp->tid);
^
In file included from ../src/dbinc/rep.h:1198:0,
from ./db_int.h:1219,
from ../src/mutex/mut_pthread.c:11:
../src/dbinc_auto/rep_ext.h: At global scope:
../src/dbinc_auto/rep_ext.h:160:113: error: format string argument is not a string type
int __rep_print_system __P((ENV *, u_int32_t, const char *, ...)) __attribute__ ((__format__ (__printf__, 3, 4)));
^
../src/dbinc_auto/rep_ext.h:161:106: error: format string argument is not a string type
int __rep_print __P((ENV *, u_int32_t, const char *, ...)) __attribute__ ((__format__ (__printf__, 3, 4)));
^
In file included from ./db_int.h:1222:0,
from ../src/mutex/mut_pthread.c:11:
../src/dbinc_auto/common_ext.h:32:107: error: format string argument is not a string type
void __db_syserr __P((const ENV *, int, const char *, ...)) __attribute__ ((__format__ (__printf__, 3, 4)));
^
../src/dbinc_auto/common_ext.h:33:104: error: format string argument is not a string type
void __db_err __P((const ENV *, int, const char *, ...)) __attribute__ ((__format__ (__printf__, 3, 4)));
^
../src/dbinc_auto/common_ext.h:34:100: error: format string argument is not a string type
void __db_errx __P((const ENV *, const char *, ...)) __attribute__ ((__format__ (__printf__, 2, 3)));
^
../src/dbinc_auto/common_ext.h:37:115: error: format string argument is not a string type
void __db_msgadd __P((const ENV *, DB_MSGBUF *, const char *, ...)) __attribute__ ((__format__ (__printf__, 3, 4)));
^
../src/dbinc_auto/common_ext.h:39:99: error: format string argument is not a string type
void __db_msg __P((const ENV *, const char *, ...)) __attribute__ ((__format__ (__printf__, 2, 3)));
^
../src/dbinc_auto/common_ext.h:41:102: error: format string argument is not a string type
void __db_repmsg __P((const ENV *, const char *, ...)) __attribute__ ((__format__ (__printf__, 2, 3)));
^
../src/mutex/mut_pthread.c:88:25: error: 'int __db_pthread_mutex_init' redeclared as different kind of symbol
__db_pthread_mutex_init(env, mutex, flags)
^
In file included from ../src/dbinc/mutex.h:330:0,
from ./db_int.h:1215,
from ../src/mutex/mut_pthread.c:11:
../src/dbinc_auto/mutex_ext.h:46:5: note: previous declaration 'int __db_pthread_mutex_init()'
int __db_pthread_mutex_init __P((ENV *, db_mutex_t, u_int32_t));
^
../src/mutex/mut_pthread.c:88:25: error: 'env' was not declared in this scope
__db_pthread_mutex_init(env, mutex, flags)
^
../src/mutex/mut_pthread.c:88:30: error: 'mutex' was not declared in this scope
__db_pthread_mutex_init(env, mutex, flags)
^
../src/mutex/mut_pthread.c:88:37: error: 'flags' was not declared in this scope
__db_pthread_mutex_init(env, mutex, flags)
^
../src/mutex/mut_pthread.c:92:1: error: expected unqualified-id before '{' token
{
^
make: *** [mut_pthread.o] Error 1
i am compiling with the following script
#!/bin/sh -f
env \
CC=/usr/local/arm/4.9.2/usr/bin/arm-linux-g++ \
STRIP=/usr/local/arm/4.9.2/usr/bin/arm-linux-strip \
../dist/configure \
--build=i686-pc-linux-gnu \
--host=arm-linux-gnu \
--disable-largefile \
--disable-shared \
--disable-atomicsupport \
--disable-test \
--enable-cxx \
$*