Bitcoin Forum

Economy => Services => Topic started by: CatsLikeToStretch on December 15, 2013, 04:21:34 AM



Title: [0.02BTC Bounty]Help installing g++ 4.8.1 on a google compute engine instance
Post by: CatsLikeToStretch on December 15, 2013, 04:21:34 AM
I have a little c++ hobby project I am working on in which I used the "thread" class that is part of c++11.  Apparently, GCC (G++) doesnt support these new features before version 4.8.1.  On google compute engine the disk image I like to use is the debian-7-weezy, and it uses a 4.7 version of GCC.  I spent and hour or two today trying to compile 4.8.1 from scratch, but to no avail. 

If you can walk me through how to get 4.8.1 compiled and installed on there I will send you 0.02BTC.  If you look at my previous posting history, it is almost exclusively me asking computer questions and then paying people for helping me.  I have paid 3 similar bountys in the past.  I will pay you if you successfully help me.



Title: Re: [0.02BTC Bounty]Help installing g++ 4.8.1 on a google compute engine instance
Post by: nickjer on December 15, 2013, 04:55:45 AM
I had similar problems compiling my c++11 code on government supercomputers that refused to update the GCC compilers because of the infamous red tape that anyone who works in the government knows all too well. So I had to compile the latest GCC in my local working directory and just set the proper environment variables before compiling my own code.

Good news is that it isn't too difficult, if no one can help you by tomorrow then I can definitely help you out since it is too late in the evening here.

EDIT:
--------------
Actually found some notes I left someone else for compiling GCC locally. Might be of some use...

Quote
You need:

gmp
mpc
mpfr

Just stick those unzipped directories in your gcc-source (in my case it was "gcc-svn", yours might be "gcc-4.8.1") directory.

Then go back a directory and make a directory called "gcc-build".

Go inside gcc-build and type the command below replacing it with your directory structure (note --- prefix will be the directory it installs all the goodies like bin and lib64):

-------------------------------------------------

../gcc-svn/./configure --prefix=/home/nickjer/gcc --with-mpfr-include=/home/nickjer/gcc-build/../gcc-svn/mpfr/src --with-mpfr-lib=/home/nickjer/gcc-build/mpfr/src/.libs --disable-multilib

-------------------------------------------------

Then type "gmake -j <# cpu cores>" and go eat dinner.

Then "gmake install".

I wrote that for gcc-4.7.2, so might need some tweaking. Also, you can remove the --prefix parameter if you want to install it globally. You will need to be root or use sudo for that when you make install it.


Title: Re: [0.02BTC Bounty]Help installing g++ 4.8.1 on a google compute engine instance
Post by: CatsLikeToStretch on December 17, 2013, 02:54:35 AM
nickjer:

Thanks for the help.  You aren't kidding about

Quote
Then type "gmake -j <# cpu cores>" and go eat dinner.

That takes a long time.  I had to do it three times, because the first time I did it, I passed the wrong path to configure, and the second time I did it, it nearly completed before determining that I didnt have zip installed.  Anyway, it works now.  Thanks a bunch.

Also, please verify that the BTC address in your sig is appropriate to send payment.  


Title: Re: [0.02BTC Bounty]Help installing g++ 4.8.1 on a google compute engine instance
Post by: nickjer on December 18, 2013, 12:36:37 AM
Glad to see it works. And hopefully you enjoy the amazing C++11, I certainly enjoy it.

Yep, the BTC address in my signature is my personal donation address. Glad I could be of help :)


Title: Re: [0.02BTC Bounty]Help installing g++ 4.8.1 on a google compute engine instance
Post by: CatsLikeToStretch on December 18, 2013, 12:58:04 AM
Just sent 0.02114743 BTC in the transaction that can be found at https://blockchain.info/tx/cd53d2e4712e4fc892a2f1fdc24730e63f5ab1566215956a9b3ed8bd78b937a6 (https://blockchain.info/tx/cd53d2e4712e4fc892a2f1fdc24730e63f5ab1566215956a9b3ed8bd78b937a6)

Thanks again, and enjoy the coins.


Title: Re: [0.02BTC Bounty]Help installing g++ 4.8.1 on a google compute engine instance
Post by: nickjer on December 18, 2013, 01:21:53 AM
Thanks!