Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error #81

Open
jlopp opened this issue Nov 10, 2023 · 6 comments
Open

Build Error #81

jlopp opened this issue Nov 10, 2023 · 6 comments

Comments

@jlopp
Copy link

jlopp commented Nov 10, 2023

Trying to compile a checkout of 0.9.6 on Ubuntu 22.04.

Installed dependencies listed in readme.

$ make -j4
golpe/rules.mk:31: update target 'build/main.o' due to: build/main.cpp
g++ -std=c++20 -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/lmdbxx/include -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/parallel-hashmap -Iexternal/negentropy/cpp -MMD -MP -MT build/main.o -MF build/main.d -c build/main.cpp -o build/main.o
golpe/rules.mk:31: update target 'build/config.o' due to: build/config.cpp build/golpe.h build/config.h build/defaultDb.h
g++ -std=c++20 -O0 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/lmdbxx/include -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/parallel-hashmap -Iexternal/negentropy/cpp -MMD -MP -MT build/config.o -MF build/config.d -c build/config.cpp -o build/config.o
golpe/rules.mk:31: update target 'src/apps/dbutils/cmd_delete.o' due to: src/apps/dbutils/cmd_delete.cpp build/golpe.h build/config.h build/defaultDb.h
g++ -std=c++20 -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/lmdbxx/include -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/parallel-hashmap -Iexternal/negentropy/cpp -MMD -MP -MT src/apps/dbutils/cmd_delete.o -MF src/apps/dbutils/cmd_delete.d -c src/apps/dbutils/cmd_delete.cpp -o src/apps/dbutils/cmd_delete.o
golpe/rules.mk:31: update target 'src/apps/dbutils/cmd_dict.o' due to: src/apps/dbutils/cmd_dict.cpp build/golpe.h build/config.h build/defaultDb.h
g++ -std=c++20 -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/lmdbxx/include -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/parallel-hashmap -Iexternal/negentropy/cpp -MMD -MP -MT src/apps/dbutils/cmd_dict.o -MF src/apps/dbutils/cmd_dict.d -c src/apps/dbutils/cmd_dict.cpp -o src/apps/dbutils/cmd_dict.o
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [golpe/rules.mk:31: build/config.o] Error 1
make: *** Waiting for unfinished jobs....
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [golpe/rules.mk:31: src/apps/dbutils/cmd_dict.o] Error 1
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make: *** [golpe/rules.mk:31: src/apps/dbutils/cmd_delete.o] Error 1

@jlopp
Copy link
Author

jlopp commented Nov 10, 2023

From some searching around it sounds like one possibility is that it's getting killed due to running out of memory.

I tried "make" without -j4 but it still fails. To be clear, this is on a machine that only has 2 GB of RAM.

@jlopp
Copy link
Author

jlopp commented Nov 11, 2023

I was able to compile the binary on a different Ubuntu machine with more RAM and then run it on this machine. Might be worth updating your documentation and/or making precompiled binaries available.

@hoytech
Copy link
Owner

hoytech commented Nov 11, 2023

Ahh yeah sorry about that, some of the files need a lot of memory to compile. You might be able to build it on the low-memory machine if you had some swap, although building it on a build server with lots of resources is a good way too.

I will look into distributing binaries somehow. What would be your preference? A deb package?

@jlopp
Copy link
Author

jlopp commented Nov 11, 2023

Just the raw binary should suffice; I don't think there's a need for a deb package.

@angelonardone
Copy link

I'm getting the following error:

perl golpe/gen-fbs.pl perl golpe/gen-config.pl golpe/external/rasgueadb/rasgueadb-generate golpe.yaml build perl golpe/gen-main.cpp.pl error: /home/angelo/strfry/strfry/fbs/nostr-index.fbs:4: 16: error: expecting: ] instead got: : flatc failure building fbs/nostr-index.fbs at golpe/gen-fbs.pl line 22, <$fh> line 1. make: *** [golpe/rules.mk:44: build/golpe.h] Error 1 make: *** Waiting for unfinished jobs.... FLATC: error: /home/angelo/strfry/strfry/fbs/nostr-index.fbs:4: 16: error: expecting: ] instead got: : flatc failure at golpe/external/rasgueadb/rasgueadb-generate line 155. make: *** [golpe/rules.mk:54: build/defaultDb.h] Error 1

Any Idea?
I'm using Ubuntu 20.04.5 LTS
thanks

@hoytech
Copy link
Owner

hoytech commented Dec 16, 2023

I think the flatc that ships with 20.04 might not support some new syntax I'm using -- sorry! Easiest is probably to use 22.04.

I'm going to be getting rid of that flatbuffers file for the next major release, so I don't think it's worth figuring out a long-term fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants