Author

Topic: Compiling under Linux (0.3.6) - Older Glibc 2.9 version (Read 11723 times)

donator
Activity: 2772
Merit: 1019
Try changing the link options (LIBS=... variable) from static to dynamic. This has solved the problem for me. It seems that some packages in Gentoo require extra options to enable static linking, and I have not enabled them as I do not need them otherwise.

Thanks! That did the trick for me (gentoo).

Likely could've also put "dev-libs/boost static-libs" in /usr/portage/package.use and reemerged boost.
newbie
Activity: 38
Merit: 0
Now if we can get a repository set up, everything will be awesome.
sr. member
Activity: 308
Merit: 258
I have a 64bit compile of the linux client bitcoin up here that I just finished. All the debug symbols are stripped as well so the file isn't 60+ megabytes in size.
Test at your own risk (like me right now)

64bit Build Only - Client only (bitcoin)
http://knightmb.dyndns.org/files/bitcoin/bitcoin.tar.gz

64bit Build Only - Daemon only (bitcoind)
http://knightmb.dyndns.org/files/bitcoin/bitcoind.tar.gz

Compiled on a Ubuntu 9.04 box with Glibc 2.9 (so those running 2.9, 2.10, 2.11 should work with this)

[edit]New version has come out since then, so those links are valid not anymore.
sr. member
Activity: 308
Merit: 258
Victory at last, finally installed enough files to compile, LOL.

But then, I just noticed a 32bit build on Ubuntu 9.04 was just put up, haha.
sr. member
Activity: 308
Merit: 258
As far as I know, but I finally got past the wxWidgets problem (typo in a command while installing, grrr)

I've finally landed at the libboost-dev-all package to install, but it's not found in the Ubuntu repository for some reason? I guess I'll just install anything/everything that has to do with boost-dev  Grin

That's what I did and it seemed to work.  Cheers!
Is there a blanket command with apt-get to install everything that has to do with libboost without it error out on package conflicts? I tried to cheat with a "apt-get install libboost*" but it just complains that it's not possible due to conflicts (which I understand since I can't install 2 versions of the same thing at the same time).
sr. member
Activity: 308
Merit: 258
That's what I'm hoping for as well, between compiling from the website then downloading another hundred megabytes worth of files anyway, hehe.
newbie
Activity: 38
Merit: 0
As far as I know, but I finally got past the wxWidgets problem (typo in a command while installing, grrr)

I've finally landed at the libboost-dev-all package to install, but it's not found in the Ubuntu repository for some reason? I guess I'll just install anything/everything that has to do with boost-dev  Grin

That's what I did and it seemed to work.  Cheers!
sr. member
Activity: 308
Merit: 258
As far as I know, but I finally got past the wxWidgets problem (typo in a command while installing, grrr)

I've finally landed at the libboost-dev-all package to install, but it's not found in the Ubuntu repository for some reason? I guess I'll just install anything/everything that has to do with boost-dev   Grin
newbie
Activity: 38
Merit: 0
Yeah, I'm following those to the letter, but I think that's my issue is, there might be a step missing because when compiling bitcoin, the errors point towards something else missing in the wx2.9 stuff (maybe an additional step) necessary. I think I'm close to figuring it out, if I do, I'll be sure to post it and hopefully have the text updated for future people to avoid any frustration  Grin
You downloaded all the dependencies too?  I know I had a bunch of problems until I did that.  Good luck, I've done it myself so it's definitely possible.
sr. member
Activity: 308
Merit: 258
I've built a Ubuntu 9.04 box and the irony is, when it finally came time to compile, I get the same errors I got on my Mandriva box.

So I'm stuck at the wxWidgets again. I guess I'm not understanding what my wxWidgets issue is. I've downloaded the 2.9 source directly from the website, compiled and installed without any errors. When it comes time to compile bitcoin, it just throws up a ton of wxWidget errors, too long to really paste here.

Has anyone done a successful build of Bitcoin in Linux, if so I'm curious to which Distro you were using?

Have you read the directions in `path-to-bitcoin-folder`/src/build-unix.txt?
It contains information about how to compile wx 2.9 that you need to follow.  Apologies if you already know this.
Yeah, I'm following those to the letter, but I think that's my issue is, there might be a step missing because when compiling bitcoin, the errors point towards something else missing in the wx2.9 stuff (maybe an additional step) necessary. I think I'm close to figuring it out, if I do, I'll be sure to post it and hopefully have the text updated for future people to avoid any frustration  Grin
newbie
Activity: 38
Merit: 0
I've built a Ubuntu 9.04 box and the irony is, when it finally came time to compile, I get the same errors I got on my Mandriva box.

So I'm stuck at the wxWidgets again. I guess I'm not understanding what my wxWidgets issue is. I've downloaded the 2.9 source directly from the website, compiled and installed without any errors. When it comes time to compile bitcoin, it just throws up a ton of wxWidget errors, too long to really paste here.

Has anyone done a successful build of Bitcoin in Linux, if so I'm curious to which Distro you were using?

Have you read the directions in `path-to-bitcoin-folder`/src/build-unix.txt?
It contains information about how to compile wx 2.9 that you need to follow.  Apologies if you already know this.
sr. member
Activity: 308
Merit: 258
I've built a Ubuntu 9.04 box and the irony is, when it finally came time to compile, I get the same errors I got on my Mandriva box.

So I'm stuck at the wxWidgets again. I guess I'm not understanding what my wxWidgets issue is. I've downloaded the 2.9 source directly from the website, compiled and installed without any errors. When it comes time to compile bitcoin, it just throws up a ton of wxWidget errors, too long to really paste here.

Has anyone done a successful build of Bitcoin in Linux, if so I'm curious to which Distro you were using?
sr. member
Activity: 308
Merit: 258
Thanks for the help, I did finally get past those errors, got hung up on the wxWidgets even though it's installed exactly as the instructions showed, I don't know enough about wxWidgets to troubleshoot the error.

But I'm building a Ubuntu box on the same setup (well older version) of what the program is being compiled on for release here in hopes it will speed things up for testing rather than troubleshooting different distro builds.
legendary
Activity: 1596
Merit: 1100
I know I've seen this topic a half-dozen times (can't compile), but after spending hours hunting down source and compiling every piece of software listed in the build-unix.txt, correcting path errors in the build files, etc.  I still can't get the program compiled, LOL.

The error it hangs at is:
Code:
/usr/bin/ld: cannot find -lboost_system
collect2: ld returned 1 exit status
make: *** [bitcoin] Error 1

A bit tough to elaborate on, since I don't see your Linux OS version.

For some OS's, like Fedora here, you need to link with the multi-threaded boost libs instead.  This implies adding a "-mt" suffix, eg. -lboost_system-mt rather than -lboost_system, for example.

Here is the complete, makefile-free, working solution I use to build bitcoind on Fedora:
Code:
g++ -O3 -ffast-math -march=native -Wno-invalid-offsetof -Wformat -pthread \
-I"/usr/local/openssl-0.9.8/include" \
-o bitcoind \
rpc.cpp main.cpp util.cpp script.cpp db.cpp net.cpp irc.cpp \
init.cpp cryptopp/sha.cpp cryptopp/cpu.cpp \
-L"/usr/local/openssl-0.9.8/lib" \
-l boost_system-mt -l boost_filesystem-mt -l boost_program_options-mt \
-l boost_thread-mt -l db_cxx -l crypto -l gthread-2.0

(openssl 0.9.8 is installed in /usr/local/openssl-0.9.8, everything else is a system lib)
sr. member
Activity: 308
Merit: 258
I'm going to take the easier route, found a virtual box of Ubuntu 9.04, so I'm going to fire one up, go through the instructions again and see if I can compile a version that isn't using the latest glibc library for those of us on old distros  Grin
sr. member
Activity: 308
Merit: 258
That seems to solved the problem, but now it hangs on the wxWidgets 2.9 with a screen full of "undefined reference" errors in the for the displayx11.cpp files.  Cry

I think I might have an easier time compiling on the same Distro that he uses in a virtual box rather than have hunting down all these errors.
sr. member
Activity: 520
Merit: 253
555
The error it hangs at is:
Code:
/usr/bin/ld: cannot find -lboost_system
collect2: ld returned 1 exit status
make: *** [bitcoin] Error 1

Try changing the link options (LIBS=... variable) from static to dynamic. This has solved the problem for me. It seems that some packages in Gentoo require extra options to enable static linking, and I have not enabled them as I do not need them otherwise.

On the other hand, static linking of some libraries is a good thing for wider distribution of the binaries, so it makes sense in bitcoin by default.
sr. member
Activity: 308
Merit: 258
I know I've seen this topic a half-dozen times (can't compile), but after spending hours hunting down source and compiling every piece of software listed in the build-unix.txt, correcting path errors in the build files, etc.  I still can't get the program compiled on my Mandriva 2010.0 box, LOL.

The error it hangs at is:
Code:
/usr/bin/ld: cannot find -lboost_system
collect2: ld returned 1 exit status
make: *** [bitcoin] Error 1

The program is there, but I'm not familiar enough with how the boost software works to fix the error. If anyone has any feedback or ideas it would be greatly appreciated. I would like to catch up with everyone else on the Linux client front, but I won't be able to use the new version until the next release that supports Linux builds not using bleeding edge software  Grin
Jump to: