[Logo] Codebox Software Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Compiling BitmeterOS
Forum Index » BitMeterOS
Author Message
Anonymous User



Hi,

I could compile bmcapture and bmclient successfully, but it gave me the following error when I tried to compile bmdb:

gcc -c ../../bmdb/src/bmdb.c -o bmdb.o -I ../../shared/src -I../../bmdb/src
gcc -c ../../bmdb/src/config.c -o bmdbConfig.o -I../../shared/src -I../../bmdb/src
gcc -c ../../bmdb/src/upgrade.c -o upgrade.o -I../../shared/src -I../../bmdb/src
gcc -c ../../bmdb/src/version.c -o bmdbVersion.o -I../../shared/src -I../../bmdb/src
gcc -c ../../shared/src/log.c -o log.o -I../../shared/src
gcc -c ../../shared/src/db.c -o db.o -I../../shared/src
gcc -c ../../shared/src/common.c -o common.o -I../../shared/src
../../shared/src/common.c: In function âtrimâ:
../../shared/src/common.c:193: warning: incompatible implicit declaration of built-in function âstrlenâ
gcc -c ../../shared/src/platform.c -o platform.o -I../../shared/src
gcc -c ../../shared/src/data.c -o data.o -I../../shared/src
gcc bmdb.o bmdbConfig.o upgrade.o bmdbVersion.o log.o db.o common.o platform.o data.o -o bmdb -lsqlite3 -lm
bmdb.o: In function `doHelp':
bmdb.c:(.text+0x4b6): undefined reference to `helpTxt'
bmdb.o:(.data+0xb8): undefined reference to `doWebStop'
bmdb.o:(.data+0xd0): undefined reference to `doWebStart'
bmdb.o:(.data+0xe8): undefined reference to `doCapStop'
bmdb.o:(.data+0x100): undefined reference to `doCapStart'
collect2: ld returned 1 exit status
make: *** [bmdb] Error 1

When I tried to compile bmws, it throws this error
gcc -c ../../webserver/src/bmws.c -o bmws.o -I../../shared/src
gcc -c ../../webserver/src/handleConfig.c -o handleConfig.o -I../../shared/src -I../../shared_client/src
gcc -c ../../webserver/src/handleFile.c -o handleFile.o -I../../shared/src
gcc -c ../../webserver/src/handleMonitor.c -o handleMonitor.o -I../../shared/src -I../../shared_client/src
gcc -c ../../webserver/src/handleQuery.c -o handleQuery.o -I../../shared/src -I../../shared_client/src
gcc -c ../../webserver/src/handleSummary.c -o handleSummary.o -I../../shared/src -I../../shared_client/src
gcc -c ../../webserver/src/http.c -o http.o -I../../shared/src
gcc -c ../../webserver/src/httpRequest.c -o httpRequest.o -I../../shared/src
gcc -c ../../shared_client/src/clientMonitor.c -o clientMonitor.o -I../../shared/src -I../../shared_client/src
gcc -c ../../shared_client/src/clientSummary.c -o clientSummary.o -I../../shared/src -I../../shared_client/src
gcc -c ../../shared_client/src/clientQuery.c -o clientQuery.o -I../../shared/src -I../../shared_client/src
gcc -c ../../shared_client/src/clientUtil.c -o clientUtil.o -I../../shared/src -I../../shared_client/src
../../shared_client/src/clientUtil.c: In function âcalcTsBoundsHostâ:
../../shared_client/src/clientUtil.c:142: warning: incompatible implicit declaration of built-in function âstrlenâ
../../shared_client/src/clientUtil.c: In function âcalcTsBoundsHostAdapterâ:
../../shared_client/src/clientUtil.c:165: warning: incompatible implicit declaration of built-in function âstrlenâ
../../shared_client/src/clientUtil.c: In function âgetHostAdapterâ:
../../shared_client/src/clientUtil.c:226: warning: incompatible implicit declaration of built-in function âstrdupâ
../../shared_client/src/clientUtil.c:231: warning: incompatible implicit declaration of built-in function âstrchrâ
../../shared_client/src/clientUtil.c:236: warning: incompatible implicit declaration of built-in function âstrncpyâ
gcc -c ../../shared/src/time.c -o time.o
gcc bmws.o handleConfig.o handleFile.o handleMonitor.o handleQuery.o handleSummary.o http.o httpRequest.o data.o common.o log.o platform.o db.o clientMonitor.o clientSummary.o clientQuery.o clientUtil.o time.o -o bmws -lsqlite3 -lm
http.o: In function `processRequest':
http.c:(.text+0x6f2): undefined reference to `processSyncRequest'
http.c:(.text+0x73e): undefined reference to `processExportRequest'
collect2: ld returned 1 exit status
make: *** [bmws] Error 1

I am trying to compile in a Suse Enterprise Server 11.

Thanks in advance
Anonymous User



Anonymous User wrote:Hi,

I could compile bmcapture and bmclient successfully, but it gave me the following error when I tried to compile bmdb:

gcc -c ../../bmdb/src/bmdb.c -o bmdb.o -I ../../shared/src -I../../bmdb/src
gcc -c ../../bmdb/src/config.c -o bmdbConfig.o -I../../shared/src -I../../bmdb/src
gcc -c ../../bmdb/src/upgrade.c -o upgrade.o -I../../shared/src -I../../bmdb/src
gcc -c ../../bmdb/src/version.c -o bmdbVersion.o -I../../shared/src -I../../bmdb/src
gcc -c ../../shared/src/log.c -o log.o -I../../shared/src
gcc -c ../../shared/src/db.c -o db.o -I../../shared/src
gcc -c ../../shared/src/common.c -o common.o -I../../shared/src
../../shared/src/common.c: In function âtrimâ:
../../shared/src/common.c:193: warning: incompatible implicit declaration of built-in function âstrlenâ
gcc -c ../../shared/src/platform.c -o platform.o -I../../shared/src
gcc -c ../../shared/src/data.c -o data.o -I../../shared/src
gcc bmdb.o bmdbConfig.o upgrade.o bmdbVersion.o log.o db.o common.o platform.o data.o -o bmdb -lsqlite3 -lm
bmdb.o: In function `doHelp':
bmdb.c:(.text+0x4b6): undefined reference to `helpTxt'
bmdb.o:(.data+0xb8): undefined reference to `doWebStop'
bmdb.o:(.data+0xd0): undefined reference to `doWebStart'
bmdb.o:(.data+0xe8): undefined reference to `doCapStop'
bmdb.o:(.data+0x100): undefined reference to `doCapStart'
collect2: ld returned 1 exit status
make: *** [bmdb] Error 1

When I tried to compile bmws, it throws this error
gcc -c ../../webserver/src/bmws.c -o bmws.o -I../../shared/src
gcc -c ../../webserver/src/handleConfig.c -o handleConfig.o -I../../shared/src -I../../shared_client/src
gcc -c ../../webserver/src/handleFile.c -o handleFile.o -I../../shared/src
gcc -c ../../webserver/src/handleMonitor.c -o handleMonitor.o -I../../shared/src -I../../shared_client/src
gcc -c ../../webserver/src/handleQuery.c -o handleQuery.o -I../../shared/src -I../../shared_client/src
gcc -c ../../webserver/src/handleSummary.c -o handleSummary.o -I../../shared/src -I../../shared_client/src
gcc -c ../../webserver/src/http.c -o http.o -I../../shared/src
gcc -c ../../webserver/src/httpRequest.c -o httpRequest.o -I../../shared/src
gcc -c ../../shared_client/src/clientMonitor.c -o clientMonitor.o -I../../shared/src -I../../shared_client/src
gcc -c ../../shared_client/src/clientSummary.c -o clientSummary.o -I../../shared/src -I../../shared_client/src
gcc -c ../../shared_client/src/clientQuery.c -o clientQuery.o -I../../shared/src -I../../shared_client/src
gcc -c ../../shared_client/src/clientUtil.c -o clientUtil.o -I../../shared/src -I../../shared_client/src
../../shared_client/src/clientUtil.c: In function âcalcTsBoundsHostâ:
../../shared_client/src/clientUtil.c:142: warning: incompatible implicit declaration of built-in function âstrlenâ
../../shared_client/src/clientUtil.c: In function âcalcTsBoundsHostAdapterâ:
../../shared_client/src/clientUtil.c:165: warning: incompatible implicit declaration of built-in function âstrlenâ
../../shared_client/src/clientUtil.c: In function âgetHostAdapterâ:
../../shared_client/src/clientUtil.c:226: warning: incompatible implicit declaration of built-in function âstrdupâ
../../shared_client/src/clientUtil.c:231: warning: incompatible implicit declaration of built-in function âstrchrâ
../../shared_client/src/clientUtil.c:236: warning: incompatible implicit declaration of built-in function âstrncpyâ
gcc -c ../../shared/src/time.c -o time.o
gcc bmws.o handleConfig.o handleFile.o handleMonitor.o handleQuery.o handleSummary.o http.o httpRequest.o data.o common.o log.o platform.o db.o clientMonitor.o clientSummary.o clientQuery.o clientUtil.o time.o -o bmws -lsqlite3 -lm
http.o: In function `processRequest':
http.c:(.text+0x6f2): undefined reference to `processSyncRequest'
http.c:(.text+0x73e): undefined reference to `processExportRequest'
collect2: ld returned 1 exit status
make: *** [bmws] Error 1

I am trying to compile in a Suse Enterprise Server 11.

Thanks in advance


I'll have a look into this, I'm not sure if the makefile in sourceforge is the latest one - thanks for the heads up
Rob
rob


Joined: 19/03/2008 18:27:35
Messages: 519
Offline

Ok, can you try with the latest one from the repository now? Let me know if you have any other problems, and also let me know how it runs on Suse - thanks!
Anonymous User



rob wrote:Ok, can you try with the latest one from the repository now? Let me know if you have any other problems, and also let me know how it runs on Suse - thanks!


Hi,

I could compile everything now and is running smoothly. I will

Thanks
Anonymous User



BTW, if anyone wants to install using the source, there are some steps after the compilation.

You will have to create three directories:
/var/www/bitmeter/
/var/log/bitmeter/
/var/lib/bitmeter/

Copy the files in <extracted dir>/webserver/web/ to /var/www/bitmeter/

You will need to copy BitmeterOS database (bitmeter.db) to /var/lib/bitmeter/.
For this I had to install the debian package on another machine and copy the database.

You will probably want to create a startup script for bmws and bmcapture. I creater mine based on rsyncd startup script.
rob


Joined: 19/03/2008 18:27:35
Messages: 519
Offline

Anonymous User wrote:BTW, if anyone wants to install using the source, there are some steps after the compilation.

You will have to create three directories:
/var/www/bitmeter/
/var/log/bitmeter/
/var/lib/bitmeter/

Copy the files in <extracted dir>/webserver/web/ to /var/www/bitmeter/

You will need to copy BitmeterOS database (bitmeter.db) to /var/lib/bitmeter/.
For this I had to install the debian package on another machine and copy the database.

You will probably want to create a startup script for bmws and bmcapture. I creater mine based on rsyncd startup script.


Thanks for the notes, I'm sure they will help those that come after you. I should put this on the main site really.
Anonymous User



Hi Rob, its me again.

I downloaded the latest CVS code and tried to compile it.
Now I got this error:

make bmdb

echo '#include "common.h"' > ../../bmdb/src/helpText.c
echo 'char* helpTxt=' >> ../../bmdb/src/helpText.c
cat ../../bmdb/src/../help.txt | sed 's/^/"/' | sed 's/$/" EOL/' >> ../../bmdb/src/helpText.c
cat: ../../bmdb/src/../help.txt: No such file or directory
echo ';' >> ../../bmdb/src/helpText.c
gcc -c ../../bmdb/src/helpText.c -o bmdbHelpText.o -I../../shared/src -I../../shared_client/src -I../../bmclient/src -I../../capture/src -I../../webserver/src -I../../bmdb/src -I../../bmsync/src -I../../test
../../bmdb/src/helpText.c:3: error: expected expression before â;â token
make: *** [bmdbHelpText.o] Error 1

make bmsync

echo '#include "common.h"' > ../../bmsync/src/helpText.c
echo 'char* helpTxt=' >> ../../bmsync/src/helpText.c
cat ../../bmsync/src/../help.txt | sed 's/^/"/' | sed 's/$/" EOL/' >> ../../bmsync/src/helpText.c
cat: ../../bmsync/src/../help.txt: No such file or directory
echo ';' >> ../../bmsync/src/helpText.c
gcc -c ../../bmsync/src/helpText.c -o syncHelpText.o -I../../shared/src -I../../shared_client/src -I../../bmclient/src -I../../capture/src -I../../webserver/src -I../../bmdb/src -I../../bmsync/src -I../../test
../../bmsync/src/helpText.c:3: error: expected expression before â;â token
make: *** [syncHelpText.o] Error 1

The file helpText.c in both directories contains only this

The problems seens to be on this line inside the makefile

The file help.txt doesnt exists there.

I solved this problem by extracting the files again and changed the lines above to one simple echo "asd" just to execute the line.
rob


Joined: 19/03/2008 18:27:35
Messages: 519
Offline

Thanks again for your feedback, I think a couple of files were missing from the last check-in which I have now added. Let me know if you have further problems!
Rob D
Anonymous User



Hi Rob,

I would like to convey my thanks to you first, for giving me such a useful tool.
I downloaded the source code (BitmeterOS 0.7.5) from github and trying to compile the code.
can you please help me with the steps to compile/make an executable of the source code.

I am a windows 7 user.

Regards
Stanley T
rob


Joined: 19/03/2008 18:27:35
Messages: 519
Offline

Hi Stanley,

You might find this page useful:
https://github.com/codebox/bitmeteros/wiki/How-to-build-on-Windows

regards

Rob D
 
Forum Index » BitMeterOS
Go to:   
Powered by JForum 2.1.9 © JForum Team