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

Problems compiling on Debian 32bit #914

Closed
JanKalin opened this issue May 4, 2016 · 18 comments
Closed

Problems compiling on Debian 32bit #914

JanKalin opened this issue May 4, 2016 · 18 comments

Comments

@JanKalin
Copy link

@JanKalin JanKalin commented May 4, 2016

First of all, compilation and execution on a clean install of the latest stable 64-bit, Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux, works well, zcashd mines, zcash-cli works,... IOW, everything works as advertised.

However, compiling it on the same version only 32-bit Linux deb32 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) i686 GNU/Linux there are, surprisingly, all sorts of problems.

When compiling, the first place something goes wrong is here:

checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)

But one cannot just do an $ apt-get install libdb++-dev libdb-dev, because the latest BDB is version 5.2, whereas 4.8 is expected. So you need to add previous repository by editing /etc/apt/sources.list, adding lines

deb http://archive.debian.org/debian/ squeeze main contrib non-free
deb-src http://archive.debian.org/debian/ squeeze main contrib non-free

and running

$ apt-get update
$ apt-get install libdb4.8++-dev libdb4.8-dev

to get past this error. There are other libraries needed: $ apt-get install libgmp-dev libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev.

After all this the compilation stops with

configure: error: libsnark include directory not found

This is where I'm currently stuck. The same thing happened on a "real" computer and in a virtual machine. I'll investigate further and add information if/when I have it.

@ebfull

This comment has been minimized.

Copy link
Contributor

@ebfull ebfull commented May 4, 2016

i686 isn't a target CPU for us at this time.

But it seems like you aren't using the depends tree to compile dependencies. Try building with ./zcutil/build.sh.

@JanKalin

This comment has been minimized.

Copy link
Author

@JanKalin JanKalin commented May 4, 2016

OK about the CPU.

But I was just about to comment that something is probably messed up with paths.

I do use ./zcutil/build.sh and I can actually see that it's downloading boost, bdb4.8,... but apparently this is not being "registered" by the ./configure script.

@daira

This comment has been minimized.

Copy link
Contributor

@daira daira commented May 6, 2016

Can you link a transcript of the build output, please?

@JanKalin

This comment has been minimized.

Copy link
Author

@JanKalin JanKalin commented May 9, 2016

This is the transcript of an install to a completely fresh installation: install_1.txt

And this after I've manually added the "missing" stuff: install_2.txt. Note that it fails at a different stage than first reported - I must have installed libcryptopp at some point during the previous attempt. But again, this is apparently installed, compiled, but then not found by ./configure.

BTW, if the instructions are meant for complete newbies, the sudo apt-get install git should probably be a separate step before git clone.... At least on a fresh Debian system, git isn't installed.

@daira

This comment has been minimized.

Copy link
Contributor

@daira daira commented May 9, 2016

Hmm. On line 14 it extracts the Crypto++ tarball, which is the one it is supposed to use:

tar xf /home/zcash/zcash/depends/built/i686-pc-linux-gnu/crypto++/crypto++-5.6.2-c204e27ed5a.tar.gz

I don't know why configure isn't finding the headers from that.

@daira

This comment has been minimized.

Copy link
Contributor

@daira daira commented May 9, 2016

Actually given the previous error with libdb_cxx, it seems like it isn't finding any of the headers for downloaded dependencies. My arch tuple is "x86_64-unknown-linux-gnu" (not "i686-pc-linux-gnu"), and I seem to remember that being hardcoded somewhere; might that be the problem?

@marsmensch

This comment has been minimized.

Copy link

@marsmensch marsmensch commented Jul 2, 2016

@daira it is hardcoded at the bottom of zcutil/build.sh:

# BUG: parameterize the platform/host directory:
PREFIX="$(pwd)/depends/x86_64-unknown-linux-gnu/"
@chacham18

This comment has been minimized.

Copy link

@chacham18 chacham18 commented Oct 9, 2016

experiencing the exact same issue. any solutions found?

@daira

This comment has been minimized.

Copy link
Contributor

@daira daira commented Oct 9, 2016

In the ./configure line of zcutil/build.sh, try adding the options --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu . Then run make clean before trying to rebuild.

@radix42

This comment has been minimized.

Copy link
Contributor

@radix42 radix42 commented Oct 9, 2016

libsnark says in its docs that it won't build on 32 bit platforms, so is this build even possible?

@radix42

This comment has been minimized.

Copy link
Contributor

@radix42 radix42 commented Oct 9, 2016

I'd love to be wrong here, since if I can I want to do a release for 32 bit Windows

@chacham18

This comment has been minimized.

Copy link

@chacham18 chacham18 commented Oct 9, 2016

Tried, not get error message: "configure: error: Could not find a version
of the boost_system library!
"
Boost was fine before this change to the zcutil/build.sh file.

On Sun, Oct 9, 2016 at 5:46 PM, Daira Hopwood notifications@github.com
wrote:

In the ./configure line of zcutil/build.sh, try adding the options
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#914 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AT0cpAEVRQsFRTCng-RSDw2-Q0OeQ7fLks5qyP5QgaJpZM4IXQaD
.

::.gabrieldov.::

@daira

This comment has been minimized.

Copy link
Contributor

@daira daira commented Oct 10, 2016

libsnark needs some nontrivial fixes to work on 32-bit platforms; see scipr-lab/libsnark#26 .

@nathan-at-least nathan-at-least added this to the 1.0.1 stabilization milestone Oct 10, 2016
@nathan-at-least

This comment has been minimized.

Copy link
Contributor

@nathan-at-least nathan-at-least commented Oct 10, 2016

We don't yet support 32bit systems (and we won't by launch) but we can look into this after launch.

@daira daira modified the milestones: 1.0.1 stabilization, Wishlist - Soon After 1.0.1 Oct 18, 2016
@str4d str4d removed this from the Wishlist - Soon After 1.0.[Soon] milestone May 25, 2017
@nathan-at-least nathan-at-least added this to User Follow-up in User Support Jun 5, 2017
@daira daira moved this from User Follow-up to Blocked in User Support Jun 19, 2017
@trevirus

This comment has been minimized.

Copy link

@trevirus trevirus commented Dec 26, 2017

try:
sudo apt-get install libdb5.3++-dev libdb5.3-dev

@validsyntax1210

This comment has been minimized.

Copy link

@validsyntax1210 validsyntax1210 commented Dec 30, 2017

http://www.linuxfromscratch.org/blfs/view/cvs/server/db.html

Compile from source that version of berkley db and it will let the ./configure pass at least in my cause now time for the make!

@braddmiller braddmiller added the usi label Apr 16, 2018
@mdr0id mdr0id removed the documentation label Apr 23, 2018
@mdr0id mdr0id closed this Apr 26, 2018
User Support automation moved this from Blocked to Complete Apr 26, 2018
@Klimenos

This comment has been minimized.

Copy link

@Klimenos Klimenos commented Jul 20, 2018

Not sure why this issue was closed, but I'm unable to compile on 32 bits arm:

main.cpp: In function 'bool AcceptToMemoryPool(CTxMemPool&, CValidationState&, const CTransaction&, bool, bool*, bool)':
main.cpp:1333:5: error: static assertion failed: size_t too small
     static_assert(std::numeric_limits<size_t>::max() >= std::numeric_limits<int64_t>::max(), "size_t too small");
     ^~~~~~~~~~~~~
At global scope:
cc1plus: error: unrecognized command line option '-Wno-builtin-declaration-mismatch' [-Werror]
cc1plus: all warnings being treated as errors

Am I doing something wrong?

@radix42

This comment has been minimized.

Copy link
Contributor

@radix42 radix42 commented Jul 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
User Support
  
Complete
Portability
  
Awaiting triage
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.