Jump to content
Sign in to follow this  
robzy

error: "class Db" has no member named "exists"

Recommended Posts

Okay, so I get an error when compiling, and I'm trying to track down the source of the problem (since dependencies on this system are a bit strange). The problem is that I can't seem to find where "class Db" actually originates from. Any suggestions on how I could track it down?

 

[root@localhost src]# make -f makefile.unix bitcoind
	g++ -c -O2 -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -D__WXGTK__ -DNOPCH -DFOURWAYSSE2 -DUSE_SSL -I"/usr/local/include/wx-2.9" -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" -o obj/nogui/util.o util.cpp
	db.h: In member function âbool CDB::Exists(const K&)â:
	db.h:146: error: âclass Dbâ has no member named âexistsâ
	make: *** [obj/nogui/util.o] Error 1
[root@localhost src]# grep -R "Db" ./ | grep -v "Dbt" | grep -v "Dbc" | grep -v "DbT"
	./db.cpp:static bool fDbEnvInit = false;
	./db.cpp:DbEnv dbenv(0);
	./db.cpp:static map<string, Db*> mapDb;
	./db.cpp:		if (fDbEnvInit)
	./db.cpp:			fDbEnvInit = false;
	./db.cpp:		if (!fDbEnvInit)
	./db.cpp:			fDbEnvInit = true;
	./db.cpp:		pdb = mapDb[strFile];
	./db.cpp:			pdb = new Db(&dbenv, 0);
	./db.cpp:			mapDb[strFile] = pdb;
	./db.cpp:void CloseDb(const string& strFile)
	./db.cpp:		if (mapDb[strFile] != NULL)
	./db.cpp:			Db* pdb = mapDb[strFile];
	./db.cpp:			mapDb[strFile] = NULL;
	./db.cpp:	printf("DBFlush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started");
	./db.cpp:	if (!fDbEnvInit)
	./db.cpp:				CloseDb(strFile);
	./db.cpp:			fDbEnvInit = false;
	./db.cpp:						CloseDb(strFile);
	./db.cpp:				CloseDb(strFile);
	./db.h:extern DbEnv dbenv;
	./db.h:	Db* pdb;
[root@localhost src]#

Thanks,

Rob.

Share this post


Link to post
Share on other sites

locate would be a good start. See if the file actually exists somewhere.

 

Could be you need to install an additional package for "WXWindows"? I assume that is the library you are using.

Share this post


Link to post
Share on other sites

locate would be a good start. See if the file actually exists somewhere.

Which file?

 

Could be you need to install an additional package for "WXWindows"? I assume that is the library you are using.

I don't actually have WxWidgets installed, that's why I'm compiling "bitcoind" (as opposed to "bitcoin", which spits out many errors about missing WxWidgets header files) which doesn't require WxWidgets. I see no reason to suspect this compiler error is due to WxWidgets.

 

Rob

Edited by robzy

Share this post


Link to post
Share on other sites

Okay, something funny was going on with the dependencies. CentOS has a number of older libraries, and it would appear BitCoin didn't like them.

 

Using these notes as a guide I was able to compile all the required dependancies to their own directory and just point the BitCoin build at them.

 

Rob.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×