Add libleveldb-dev to build dependencies #290

Closed
opened 1 year ago by onryo · 13 comments
onryo commented 1 year ago
Collaborator

Fixes leveldb/db.h: No such file or directory error when building.

plyvel requires leveldb development libraries for LevelDB >1.2.X

Added in fab9a7f51d. Related to #283.

Fixes `leveldb/db.h: No such file or directory` error when building. > plyvel requires leveldb development libraries for LevelDB >1.2.X Added in https://git.hush.is/hush/hush3/commit/fab9a7f51d138ec2e2025e7b668d620205ddd070. Related to https://git.hush.is/hush/hush3/issues/283.
onryo added the
build
label 1 year ago
onryo closed this issue 1 year ago
duke commented 1 year ago
Owner

@onryo which file gives you this error ? While I agree that adding a dependency might work in this instance, it mixes together the version of leveldb from our source code with whatever version is installed via package manager, which could be incompatible. Upstream does not depend on libleveldb-dev package and we have an older version of leveldb than upstream

@onryo which file gives you this error ? While I agree that adding a dependency might work in this instance, it mixes together the version of leveldb from our source code with whatever version is installed via package manager, which could be incompatible. Upstream does not depend on libleveldb-dev package and we have an older version of leveldb than upstream
duke reopened this issue 1 year ago
fekt commented 1 year ago
Collaborator

I was hitting the same error when trying to compile over the weekend.

+ ./makecustom

Linux
Building cclib to src/
LINUX
gcc -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/x86_64-unknown-linux-gnu/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -O0 -D _DEBUG -o customcc.so -c cclib.cpp
In file included from ../txdb.h:28,
                 from ../main.h:42,
                 from ../cc/../wallet/wallet.h:30,
                 from ../cc/CCinclude.h:66,
                 from cclib.cpp:25:
../dbwrapper.h:15:10: fatal error: leveldb/db.h: No such file or directory
   15 | #include <leveldb/db.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile_custom:25: customcc.so] Error 1
CUSTOMCC BUILD FAILED
I was hitting the same error when trying to compile over the weekend. ``` + ./makecustom Linux Building cclib to src/ LINUX gcc -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/x86_64-unknown-linux-gnu/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -O0 -D _DEBUG -o customcc.so -c cclib.cpp In file included from ../txdb.h:28, from ../main.h:42, from ../cc/../wallet/wallet.h:30, from ../cc/CCinclude.h:66, from cclib.cpp:25: ../dbwrapper.h:15:10: fatal error: leveldb/db.h: No such file or directory 15 | #include <leveldb/db.h> | ^~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile_custom:25: customcc.so] Error 1 CUSTOMCC BUILD FAILED ```
duke referenced this issue from a commit 1 year ago
duke commented 1 year ago
Owner

@onryo @fekt ok, try with the latest commit on this branch. You may need to uninstall libleveldb-dev if you installed it. I think this bug happened because some header files changed which other header files they include and I probably had libleveldb-dev installed on the machine, from a different codebase, because I didn't run into this compile problem.

@onryo @fekt ok, try with the latest commit on this branch. You may need to uninstall libleveldb-dev if you installed it. I think this bug happened because some header files changed which other header files they include and I probably had libleveldb-dev installed on the machine, from a different codebase, because I didn't run into this compile problem.
fekt commented 1 year ago
Collaborator

@duke still the same error on a fresh clone. i never installed libleveldb-dev either.

@duke still the same error on a fresh clone. i never installed libleveldb-dev either.
duke commented 1 year ago
Owner

@fekt weird. I checked and I don't have that package installed and yet, the compile works for me. You are sure your fresh clone had both of the new commits?

@fekt weird. I checked and I don't have that package installed and yet, the compile works for me. You are sure your fresh clone had both of the new commits?
fekt commented 1 year ago
Collaborator

@duke yeah, i did a pull first that showed both commits. did a clean and still got the error. then i cloned fresh and still got the error. this is on debian 11. the latest dev branch builds fine.

@duke yeah, i did a pull first that showed both commits. did a clean and still got the error. then i cloned fresh and still got the error. this is on debian 11. the latest dev branch builds fine.
fekt commented 1 year ago
Collaborator

On this box, it looks like the headers are here:
hush3/src/leveldb/include/leveldb

On this box, it looks like the headers are here: `hush3/src/leveldb/include/leveldb`
Poster
Collaborator

@duke still the same error on a fresh clone. i never installed libleveldb-dev either.

Same here on a fresh clone.

> @duke still the same error on a fresh clone. i never installed libleveldb-dev either. Same here on a fresh clone.
duke commented 1 year ago
Owner

Ok, I can reproduce this now. Working on it.

I accidentally changed src/cc/Makefile instead of src/cc/Makefile_custom

Ok, I can reproduce this now. Working on it. I accidentally changed src/cc/Makefile instead of src/cc/Makefile_custom
duke commented 1 year ago
Owner

@onryo @fekt ok, please test again with latest commit. We do not need to add libleveldb-dev to our dependencies, so that commit should be reverted

@onryo @fekt ok, please test again with latest commit. We do not need to add libleveldb-dev to our dependencies, so that commit should be reverted
Poster
Collaborator

All good now. 👍 Let me know if I can revert the commit to remove libleveldb-dev. @fekt

All good now. 👍 Let me know if I can revert the commit to remove libleveldb-dev. @fekt
fekt commented 1 year ago
Collaborator

@onryo good to revert. latest commit builds for me. 👍

@onryo good to revert. latest commit builds for me. 👍
duke commented 1 year ago
Owner

I reverted this change since it's no longer needed.

I reverted this change since it's no longer needed.
duke closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.