Author

Topic: make: *** [Makefile:2018: cxx_db.o] Error 1 (Read 128 times)

hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
September 29, 2022, 11:34:16 AM
#6
1. Please post the full error message including source code if it is given.
2. Please tell us what program you are compiling (Bitcoin Core?)
i solved this error by enter dbinc and atomic.h and edit atomic_compare_exchange to atomic_compare_exchange_db in atomic.h . 
Um... No. Don't modify the Bitcoin source code to fix compiling errors.. Cheesy
It compiles just fine providing your setup (dependencies, hardware, ...) is good. Working around such issues by modifying the source is not the way to go.

Now I compile bitcoin core by following commands
Code:
cd bitcoin
./autogen.sh
sudo chmod -R 775 /root/bitcoin/
First of all, I wouldn't recommend running Bitcoin Core as root user, nor installing it as user root.

Code:
./autogen.sh
./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/"
make
Why don't you use the default build commands from the documentation?
https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

when command make , it show error again . this is
Code:
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [Makefile:9605: libbitcoin_node_a-init.o] Error 1
make[2]: Leaving directory '/root/bitcoin/src'
make[1]: *** [Makefile:18946: all-recursive] Error 1
make[1]: Leaving directory '/root/bitcoin/src'
make: *** [Makefile:821: all-recursive] Error 1
why this happen ?
This is again not the complete error message, though, right.

You seem to be running out of memory during compilation. How much RAM do you have, and how are you calling make (e.g. make -j4)? A single thread requires about 2GB of memory for compiling Bitcoin Core.

If you are just using make with one thread (no -j argument), you can try adding temporary swap space, but I don't recommend this.
RAM 1GB cannot handle bitcoin core. Right ? just simply call by ``` make ``` . if increase RAM GB , it will be ok . right?
It is recommended to have 1.5GB at the very least, but you can tune compiler flags.
C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of memory available when compiling Bitcoin Core. On systems with less, gcc can be tuned to conserve memory with additional CXXFLAGS:
[...]
newbie
Activity: 23
Merit: 6
September 29, 2022, 09:38:20 AM
#5
You seem to be running out of memory during compilation. How much RAM do you have, and how are you calling make (e.g. make -j4)? A single thread requires about 2GB of memory for compiling Bitcoin Core.

If you are just using make with one thread (no -j argument), you can try adding temporary swap space, but I don't recommend this.

RAM 1GB cannot handle bitcoin core. Right ? just simply call by ``` make ``` . if increase RAM GB , it will be ok . right?
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
September 29, 2022, 09:33:55 AM
#4
You seem to be running out of memory during compilation. How much RAM do you have, and how are you calling make (e.g. make -j4)? A single thread requires about 2GB of memory for compiling Bitcoin Core.

If you are just using make with one thread (no -j argument), you can try adding temporary swap space, but I don't recommend this.
newbie
Activity: 23
Merit: 6
September 29, 2022, 09:18:28 AM
#3
1. Please post the full error message including source code if it is given.
2. Please tell us what program you are compiling (Bitcoin Core?)
i solved this error by enter dbinc and atomic.h and edit atomic_compare_exchange to atomic_compare_exchange_db in atomic.h . 
Now I compile bitcoin core by following commands
```
cd bitcoin

./autogen.sh

sudo chmod -R 775 /root/bitcoin/

./autogen.sh

./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/"

make


```
when command make , it show error again . this is
```
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [Makefile:9605: libbitcoin_node_a-init.o] Error 1
make[2]: Leaving directory '/root/bitcoin/src'
make[1]: *** [Makefile:18946: all-recursive] Error 1
make[1]: Leaving directory '/root/bitcoin/src'
make: *** [Makefile:821: all-recursive] Error 1


```

why this happen ?
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
September 29, 2022, 08:34:02 AM
#2
1. Please post the full error message including source code if it is given.
2. Please tell us what program you are compiling (Bitcoin Core?)
newbie
Activity: 23
Merit: 6
September 29, 2022, 07:19:54 AM
#1
hello friends,i install
sudo make install in ubuntu 20 . 
it show error as follow
```
 make: *** [Makefile:2018: cxx_db.o] Error 1
```
how can i fix that
Jump to: