Giter Club home page Giter Club logo

Comments (27)

r000n avatar r000n commented on September 28, 2024

Caused by C standard declaration. These functions not available with -std=c99.
Temporary solution - add -D_POSIX_SOURCE to CFLAGS

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

Thanks r000n. The core library is only C99 but the default dependency implementations use POSIX. I'll add the flag and I will commit it next time around (this weekend hopefully).

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

I updated it. Try it again now with the added flag. Should just be:

./configure
make

And to test: make test

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

./configure
make build
make

Built with warnings:

src/CBAssociativeArray.c: In function ‘CBAssociativeArrayInsert’:
src/CBAssociativeArray.c:246:5: warning: multi-line comment [-Wcomment]
src/CBAssociativeArray.c:250:5: warning: multi-line comment [-Wcomment]
src/CBAssociativeArray.c:254:5: warning: multi-line comment [-Wcomment]
src/CBAssociativeArray.c:256:5: warning: multi-line comment [-Wcomment]
src/CBAssociativeArray.c:270:5: warning: multi-line comment [-Wcomment]
src/CBAssociativeArray.c:276:5: warning: multi-line comment [-Wcomment]
src/CBAssociativeArray.c:280:5: warning: multi-line comment [-Wcomment]
src/CBAssociativeArray.c:284:5: warning: multi-line comment [-Wcomment]
src/CBAssociativeArray.c:286:5: warning: multi-line comment [-Wcomment]
dependencies/storage/CBBlockChainStorage.c: In function ‘CBNewBlockChainStorage’:
dependencies/storage/CBBlockChainStorage.c:152:3: warning: implicit declaration of function ‘fsync’ [-Wimplicit-function-declaration]
dependencies/storage/CBBlockChainStorage.c: In function ‘CBBlockChainStorageEnsureConsistent’:
dependencies/storage/CBBlockChainStorage.c:595:2: warning: implicit declaration of function ‘truncate’ [-Wimplicit-function-declaration]
dependencies/storage/CBBlockChainStorage.c: In function ‘CBBlockChainStorageGetDeletedSection’:
dependencies/storage/CBBlockChainStorage.c:902:2: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

make test

/usr/bin/ld: cannot find -lcbitcoin.2.0
/usr/bin/ld: cannot find -lcbitcoin-crypto.2.0
/usr/bin/ld: cannot find -lcbitcoin-network.2.0
/usr/bin/ld: cannot find -lcbitcoin-storage.2.0
/usr/bin/ld: cannot find -lcbitcoin-rand.2.0
collect2: error: ld returned 1 exit status

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

Changing -lcbitcoin -> -llibcbitcoin don't helps

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

Quick fix:
$(CC) $(BINDIR)/libcbitcoin.so.2.0 $(BINDIR)/libcbitcoin-crypto.so.2.0 $(BINDIR)/libcbitcoin-network.so.2.0 $(BINDIR)/libcbitcoin-storage.so.2.0 $(BINDIR)/libcbitcoin-rand.so.2.0 -L/opt/local/lib -levent_core -levent_pthreads $< -o $@

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

After this, test started, but was interrupted:

Session = 1355597278i
Could not read the previous data to be overwritten.
Failed to add an overwrite operation to update the deletion index for writting data to a deleted section
Failed to add a value to the database with a new key.
Could not find a value for a key.
3RD VALUE FAIL

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

I've improved the makefile a lot now, and I think it should work on debian but I cannot confirm this.

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

git clone https://github.com/MatthewLM/cbitcoin.git
./configure
make

src/CBAddressBroadcast.c: In function ‘CBFreeAddressBroadcast’:
src/CBAddressBroadcast.c:83:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/CBAddressBroadcast.c:83:2: note: use option -std=c99 or -std=gnu99 to compile your code
src/CBAddressBroadcast.c: In function ‘CBAddressBroadcastDeserialise’:
src/CBAddressBroadcast.c:105:2: warning: ISO C90 forbids mixed declarations and code [-pedantic]
src/CBAddressBroadcast.c:116:2: warning: ISO C90 forbids mixed declarations and code [-pedantic]
src/CBAddressBroadcast.c:117:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/CBAddressBroadcast.c: In function ‘CBAddressBroadcastSerialise’:
src/CBAddressBroadcast.c:161:2: warning: ISO C90 forbids mixed declarations and code [-pedantic]
src/CBAddressBroadcast.c:163:2: warning: ISO C90 forbids mixed declarations and code [-pedantic]
src/CBAddressBroadcast.c:164:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/CBAddressBroadcast.c:177:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/CBAddressBroadcast.c: In function ‘CBAddressBroadcastTakeNetworkAddress’:
src/CBAddressBroadcast.c:196:2: warning: ISO C90 forbids mixed declarations and code [-pedantic]
make: *** [build/CBAddressBroadcast.o] Error 1

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

OK thanks. I'll look into it. It should be in C99 mode, so I don't understand that, but I'll take a look.

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

I added -std=c99 which seemed to have got removed somehow. That error should have gone away.

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

make test

/usr/bin/ld: cannot find -lcbitcoin.2.0
/usr/bin/ld: cannot find -lcbitcoin-crypto.2.0
/usr/bin/ld: cannot find -lcbitcoin-network.2.0
/usr/bin/ld: cannot find -lcbitcoin-file-ec.2.0
/usr/bin/ld: cannot find -lcbitcoin-storage.2.0
/usr/bin/ld: cannot find -lcbitcoin-rand.2.0
collect2: error: ld returned 1 exit status
make: *** [bin/testCBAddressBroadcast] Error 1

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

The build should work now but I'll leave this open just in case.

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

make test

bin/testCBAddressBroadcast: error while loading shared libraries: libcbitcoin.2.0.so: cannot open shared object file: No such file or directory
make: *** [bin/testCBAddressBroadcast] Error 127

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

Did you run ./configure beforehand? That is an important step (Since it replaces the makefile with the new one). I recommend:

./configure
make clean
make test

Tell me if that causes any issues.

Thanks.

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

For some reason I've just got this error myself, which is weird since it was working yesterday...

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

I have LD_LIBRARY_PATH = $(BINDIR) in the makefile so it should work... Linux can be a real pain sometimes.

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

So I changed it to export LD_LIBRARY_PATH = $(BINDIR) and it worked for me.

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

*** glibc detected *** bin/testCBDatabase: free(): invalid pointer: 0x00000000016b4870 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x76d76)[0x2aaaac3b3d76]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x2aaaac3b8aac]
/home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-storage.2.0.so(CBDatabaseClearPending+0xa3)[0x2aaaab520203]
/home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-storage.2.0.so(CBDatabaseCommit+0xa5a)[0x2aaaab5223fa]
bin/testCBDatabase[0x400f6b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x2aaaac35bead]
bin/testCBDatabase[0x403869]
======= Memory map: ========
00400000-00405000 r-xp 00000000 08:04 2883530 /home/r000n/fresh/other/cbitcoin/bin/testCBDatabase
00604000-00605000 rw-p 00004000 08:04 2883530 /home/r000n/fresh/other/cbitcoin/bin/testCBDatabase
016b4000-016d5000 rw-p 00000000 00:00 0 [heap]
2aaaaaaab000-2aaaaaacb000 r-xp 00000000 08:02 276439 /lib/x86_64-linux-gnu/ld-2.13.so
2aaaaaacb000-2aaaaaad0000 rw-p 00000000 00:00 0
2aaaaaad1000-2aaaaaad2000 rw-p 00000000 00:00 0
2aaaaaaec000-2aaaaaaf3000 rw-p 00000000 00:00 0
2aaaaacca000-2aaaaaccb000 r--p 0001f000 08:02 276439 /lib/x86_64-linux-gnu/ld-2.13.so
2aaaaaccb000-2aaaaaccc000 rw-p 00020000 08:02 276439 /lib/x86_64-linux-gnu/ld-2.13.so
2aaaaaccc000-2aaaaaccd000 rw-p 00000000 00:00 0
2aaaaaccd000-2aaaaace4000 r-xp 00000000 08:02 276413 /lib/x86_64-linux-gnu/libpthread-2.13.so
2aaaaace4000-2aaaaaee3000 ---p 00017000 08:02 276413 /lib/x86_64-linux-gnu/libpthread-2.13.so
2aaaaaee3000-2aaaaaee4000 r--p 00016000 08:02 276413 /lib/x86_64-linux-gnu/libpthread-2.13.so
2aaaaaee4000-2aaaaaee5000 rw-p 00017000 08:02 276413 /lib/x86_64-linux-gnu/libpthread-2.13.so
2aaaaaee5000-2aaaaaee9000 rw-p 00000000 00:00 0
2aaaaaee9000-2aaaaaf16000 r-xp 00000000 08:04 2883489 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin.2.0.so
2aaaaaf16000-2aaaab116000 ---p 0002d000 08:04 2883489 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin.2.0.so
2aaaab116000-2aaaab117000 rw-p 0002d000 08:04 2883489 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin.2.0.so
2aaaab117000-2aaaab118000 r-xp 00000000 08:04 2883491 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-crypto.2.0.so
2aaaab118000-2aaaab317000 ---p 00001000 08:04 2883491 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-crypto.2.0.so
2aaaab317000-2aaaab318000 rw-p 00000000 08:04 2883491 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-crypto.2.0.so
2aaaab318000-2aaaab31b000 r-xp 00000000 08:04 2883495 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-network.2.0.so
2aaaab31b000-2aaaab51a000 ---p 00003000 08:04 2883495 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-network.2.0.so
2aaaab51a000-2aaaab51b000 rw-p 00002000 08:04 2883495 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-network.2.0.so
2aaaab51b000-2aaaab526000 r-xp 00000000 08:04 2883499 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-storage.2.0.so
2aaaab526000-2aaaab726000 ---p 0000b000 08:04 2883499 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-storage.2.0.so
2aaaab726000-2aaaab727000 rw-p 0000b000 08:04 2883499 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-storage.2.0.so
2aaaab727000-2aaaab72a000 r-xp 00000000 08:04 2883502 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-file-ec.2.0.so
2aaaab72a000-2aaaab929000 ---p 00003000 08:04 2883502 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-file-ec.2.0.so
2aaaab929000-2aaaab92a000 rw-p 00002000 08:04 2883502 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-file-ec.2.0.so
2aaaab92a000-2aaaab92b000 r-xp 00000000 08:04 2883493 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-rand.2.0.so
2aaaab92b000-2aaaabb2a000 ---p 00001000 08:04 2883493 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-rand.2.0.so
2aaaabb2a000-2aaaabb2b000 rw-p 00000000 08:04 2883493 /home/r000n/fresh/other/cbitcoin/bin/libcbitcoin-rand.2.0.so
2aaaabb2b000-2aaaabb54000 r-xp 00000000 08:02 788106 /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5.1.7
2aaaabb54000-2aaaabd54000 ---p 00029000 08:02 788106 /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5.1.7
2aaaabd54000-2aaaabd55000 r--p 00029000 08:02 788106 /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5.1.7
2aaaabd55000-2aaaabd56000 rw-p 0002a000 08:02 788106 /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5.1.7
2aaaabd56000-2aaaabd58000 r-xp 00000000 08:02 789379 /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5.1.7
2aaaabd58000-2aaaabf57000 ---p 00002000 08:02 789379 /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5.1.7
2aaaabf57000-2aaaabf58000 r--p 00001000 08:02 789379 /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5.1.7
2aaaabf58000-2aaaabf59000 rw-p 00002000 08:02 789379 /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.0.so.5.1.7
2aaaabf59000-2aaaac10f000 r-xp 00000000 08:02 790830 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
2aaaac10f000-2aaaac30f000 ---p 001b6000 08:02 790830 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
2aaaac30f000-2aaaac32a000 r--p 001b6000 08:02 790830 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
2aaaac32a000-2aaaac339000 rw-p 001d1000 08:02 790830 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
2aaaac339000-2aaaac33d000 rw-p 00000000 00:00 0
2aaaac33d000-2aaaac4bd000 r-xp 00000000 08:02 276433 /lib/x86_64-linux-gnu/libc-2.13.so
2aaaac4bd000-2aaaac6bd000 ---p 00180000 08:02 276433 /lib/x86_64-linux-gnu/libc-2.13.so
2aaaac6bd000-2aaaac6c1000 r--p 00180000 08:02 276433 /lib/x86_64-linux-gnu/libc-2.13.so
2aaaac6c1000-2aaaac6c2000 rw-p 00184000 08:02 276433 /lib/x86_64-linux-gnu/libc-2.13.so
2aaaac6c2000-2aaaac6c7000 rw-p 00000000 00:00 0
2aaaac6c7000-2aaaac6c9000 r-xp 00000000 08:02 276419 /lib/x86_64-linux-gnu/libdl-2.13.so
2aaaac6c9000-2aaaac8c9000 ---p 00002000 08:02 276419 /lib/x86_64-linux-gnu/libdl-2.13.so
2aaaac8c9000-2aaaac8ca000 r--p 00002000 08:02 276419 /lib/x86_64-linux-gnu/libdl-2.13.so
2aaaac8ca000-2aaaac8cb000 rw-p 00003000 08:02 276419 /lib/x86_64-linux-gnu/libdl-2.13.so
2aaaac8cb000-2aaaac91f000 r-xp 00000000 08:02 791242 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
2aaaac91f000-2aaaacb1f000 ---p 00054000 08:02 791242 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
2aaaacb1f000-2aaaacb22000 r--p 00054000 08:02 791242 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
2aaaacb22000-2aaaacb29000 rw-p 00057000 08:02 791242 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
2aaaacb29000-2aaaacb30000 r-xp 00000000 08:02 276423 /lib/x86_64-linux-gnu/librt-2.13.so
2aaaacb30000-2aaaacd2f000 ---p 00007000 08:02 276423 /lib/x86_64-linux-gnu/librt-2.13.so
2aaaacd2f000-2aaaacd30000 r--p 00006000 08:02 276423 /lib/x86_64-linux-gnu/librt-2.13.so
2aaaacd30000-2aaaacd31000 rw-p 00007000 08:02 276423 /lib/x86_64-linux-gnu/librt-2.13.so
2aaaacd31000-2aaaacd47000 r-xp 00000000 08:02 264352 /lib/x86_64-linux-gnu/libz.so.1.2.7
2aaaacd47000-2aaaacf46000 ---p 00016000 08:02 264352 /lib/x86_64-linux-gnu/libz.so.1.2.7
2aaaacf46000-2aaaacf47000 r--p 00015000 08:02 264352 /lib/x86_64-linux-gnu/libz.so.1.2.7
2aaaacf47000-2aaaacf48000 rw-p 00016000 08:02 264352 /lib/x86_64-linux-gnu/libz.so.1.2.7
2aaaacf48000-2aaaacf5d000 r-xp 00000000 08:02 300657 /lib/x86_64-linux-gnu/libgcc_s.so.1
2aaaacf5d000-2aaaad15d000 ---p 00015000 08:02 300657 /lib/x86_64-linux-gnu/libgcc_s.so.1
2aaaad15d000-2aaaad15e000 rw-p 00015000 08:02 300657 /lib/x86_64-linux-gnu/libgcc_s.so.1
2aaab0000000-2aaab0021000 rw-p 00000000 00:00 0
2aaab0021000-2aaab4000000 ---p 00000000 00:00 0
7fff9564d000-7fff9566e000 rw-p 00000000 00:00 0 [stack]
7fff957ff000-7fff95800000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
make: *** [bin/testCBDatabase] Aborted
make: *** Deleting file `bin/testCBDatabase'

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

I've not been able to build that far with Linux Mint. With Linux Mint I get stuck on testCBAddressManager: #24 I'm glad you can at least get to the execution of the tests.

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

bin/testCBDatabase should work now and you should have a problem when you reach testCBTransaction.

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

The entire build process now works for me with zero problems on OSX and Linux Mint. If it can be confirmed with you, r000n, then I'll be happy to close this. There may be occasional problems with testCBNetworkCommunicator but it should work most of the time. I will fix the remaining issues with that.

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

L2 onMessageReceived from L1 (0x1e37ba0) WITH TESTER 5 and PROG 19 (0x7fff048a9fa4) MESS = 4
COMPLETION: 7 - 0
ADDR COMPLETE FAIL
make: *** [bin/testCBNetworkCommunicator] Error 1

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

Does this happen persistently? I've got another issue for testCBNetworkCommunicator (#9). Most of the time it works for me but sometimes it will not.

from cbitcoin.

r000n avatar r000n commented on September 28, 2024

Not. Right now OK

from cbitcoin.

MatthewLM avatar MatthewLM commented on September 28, 2024

OK thank you, I'm aware that testCBNetworkCommunicator has occasional problems so I'll close this and leave it to issue #9.

from cbitcoin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.