LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-09-2011, 03:19 AM   #1
sheelavantar
Member
 
Registered: Aug 2010
Posts: 69

Rep: Reputation: 1
Berkeley db-4.8.26 Compilation Failed.


Hi,
I have downloaded "db-4.8.26" and trying to compile it for MIPS. I am using the following configuration options

../dist/configure --host=mips CC=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc LD=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-ld CFLAGS="-g -O2 -lpthread -D_REENTRANT" LDFLAGS=-Bshareable

but compilation is giving lot of errors for mutex.
./libtool --mode=compile /opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc -c -I. -I../dist/.. -g -O2 -lpthread -D_REENTRANT ../dist/../mutex/mut_pthread.c
libtool: compile: /opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc -c -I. -I../dist/.. -g -O2 -lpthread -D_REENTRANT ../dist/../mutex/mut_pthread.c -o mut_pthread.o
In file included from ../dbinc/mutex.h:15,
from db_int.h:884,
from ../mutex/mut_pthread.c:11:
../dbinc/mutex_int.h:932: error: parse error before "pthread_rwlock_t"
../dbinc/mutex_int.h:932: warning: no semicolon at end of struct or union
../dbinc/mutex_int.h:932: warning: no semicolon at end of struct or union
../dbinc/mutex_int.h:932: warning: data definition has no type or storage class
../dbinc/mutex_int.h:985: error: parse error before '}' token
In file included from db_int.h:884,
from ../mutex/mut_pthread.c:11:
../dbinc/mutex.h: In function `__db_pthread_mutex_trylock':
../dbinc/mutex.h:102: error: dereferencing pointer to incomplete type
../dbinc/mutex.h:103: error: dereferencing pointer to incomplete type
../dbinc/mutex.h:106: error: dereferencing pointer to incomplete type
../dbinc/mutex.h:107: error: dereferencing pointer to incomplete type
../dbinc/mutex.h:112: error: dereferencing pointer to incomplete type
../dbinc/mutex.h: In function `__db_pthread_mutex_tryreadlock':
../dbinc/mutex.h:126: error: dereferencing pointer to incomplete type
../dbinc/mutex.h:127: error: dereferencing pointer to incomplete type
../dbinc/mutex.h:134: error: dereferencing pointer to incomplete type
../mutex/mut_pthread.c: In function `__db_pthread_mutex_init':
../mutex/mut_pthread.c:101: error: `pthread_rwlockattr_t' undeclared (first use in this function

.
.
.
more....
.
.
Kindly help me to fix these errors.
 
Old 09-10-2011, 12:31 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
May be have a look at http://packages.debian.org/source/lenny-backports/db

The patch db_4.8.24-1~bpo50+1.diff.gz makes two edits :
One in dbinc/mutex_int.h , and : dist/Makefile.in
( zcat db_4.8.24-1~bpo50+1.diff.gz | patch -p1 )


There are 10,000 mips packages for Debian, db-4.8.24 included.
Suggest : Try out the packages, if your compilation still fails.
http://packages.debian.org/lenny-backports/libdb4.8
http://packages.debian.org/lenny-bac...db4.8/filelist

Also : It's easy to unpack .deb packages : 1) ar -x <package>.deb
2) tar xvf data.tar.gz

.

Last edited by knudfl; 09-10-2011 at 12:37 PM.
 
Old 09-14-2011, 01:12 AM   #3
sheelavantar
Member
 
Registered: Aug 2010
Posts: 69

Original Poster
Rep: Reputation: 1
I am comiling it on montavista linux with mips_fp_be-gcc.
I have tried configuring with "--disable-mutexsupport".

Now I am facing some different problem while compilation.
xn.o txn_auto.o txn_chkpt.o txn_failchk.o txn_method.o txn_rec.o txn_recover.o txn_region.o txn_stat.o txn_util.o zerofill.o
ranlib libdb-4.8.a
rm -f libdb.a
ln -s libdb-4.8.a libdb.a
./libtool --mode=compile /opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc -c -I. -I../dist/.. -g -O2 ../dist/../db_archive/db_archive.c
libtool: compile: /opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc -c -I. -I../dist/.. -g -O2 ../dist/../db_archive/db_archive.c -o db_archive.o
./libtool --mode=compile /opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc -c -I. -I../dist/.. -g -O2 ../dist/../common/util_sig.c
libtool: compile: /opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc -c -I. -I../dist/.. -g -O2 ../dist/../common/util_sig.c -o util_sig.o
./libtool --mode=link /opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc -g -O2 -o db_archive -Bshareable \
db_archive.o util_sig.o libdb-4.8.a -lpthread
libtool: link: /opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc -g -O2 -o db_archive -Bshareable db_archive.o util_sig.o libdb-4.8.a -lpthread
libdb-4.8.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status

make: *** [db_archive] Error 1
 
Old 09-14-2011, 10:03 PM   #4
sheelavantar
Member
 
Registered: Aug 2010
Posts: 69

Original Poster
Rep: Reputation: 1
I found the solution for this.

In configure command following options solved the error.

AR=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-ar RANLIB=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-ranlib
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Njam compilation failed kukibl Slackware 4 10-05-2009 11:03 AM
error in compilation of berkeley DB madhava_kulkarni1986 Linux - Software 7 04-17-2009 02:04 AM
compilation error + Berkeley DB kshkid Programming 5 03-01-2007 09:57 AM
mps compilation failed ph0enix Linux - Software 3 02-09-2005 05:37 PM
Compilation of lt_modem.ko failed matt_com911 Linux - Hardware 27 12-27-2004 04:58 AM


All times are GMT -5. The time now is 06:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration