Bitcoin Forum
November 05, 2024, 11:38:15 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: make: *** [Makefile:2018: cxx_db.o] Error 1  (Read 125 times)
linz (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 6


View Profile
September 29, 2022, 12:19:54 PM
 #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
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
September 29, 2022, 01:34:02 PM
Merited by ABCbits (1)
 #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?)

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
linz (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 6


View Profile
September 29, 2022, 02:18:28 PM
 #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 ?
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
September 29, 2022, 02:33:55 PM
 #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.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
linz (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 6


View Profile
September 29, 2022, 02:38:20 PM
 #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?
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5918


not your keys, not your coins!


View Profile WWW
September 29, 2022, 04:34:16 PM
Merited by ABCbits (3)
 #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:
[...]

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!