ethereum / aleth

Aleth – Ethereum C++ client, tools and libraries
GNU General Public License v3.0
3.97k stars 2.17k forks source link

cryptopp-project error on build on xcode #3622

Open fernandoamorim opened 7 years ago

fernandoamorim commented 7 years ago

Hello!

I have an error on build the project:

screen shot 2017-03-07 at 03 30 23
chfast commented 7 years ago

The issue is CMake cannot find CMake :) Do you have the cmake executable hidden somewhere?

I think I know how to fix it, will include required change in https://github.com/ethereum/cpp-ethereum/pull/3610, but it may take some time to be merged in.

As a workaround, can you add cmake executable to the PATH environment variable?

fernandoamorim commented 7 years ago

chfast,

I have CMake.app in my Applications folder (like img). And when i execute make os cmake in terminar working.

What i need make to fix it?

screen shot 2017-03-07 at 09 47 06
chfast commented 7 years ago

In file deps/cryptopp.cmake (https://github.com/ethereum/cpp-dependencies/blob/ffb582905800966cf15471a852b8842bafde0aa7/cryptopp.cmake#L24) change in line 24: cmake -E to ${CMAKE_COMMAND} -E.

If that will move you further let me know.

fernandoamorim commented 7 years ago

I change line 24. But still not working (same problem).

screen shot 2017-03-07 at 10 20 20

I need create a project again?

mkdir build_xc cd build_xc cmake -G Xcode ..

chfast commented 7 years ago

It might be enough to just reload cmake doing cmake . in build_xc dir.

fernandoamorim commented 7 years ago

I try cmake -G Xcode .. again, but still not wotking.. :(

screen shot 2017-03-07 at 10 36 00
chfast commented 7 years ago

You have removed remove command after -E. Must be ${CMAKE_COMMAND} -E remove.

fernandoamorim commented 7 years ago

Progress!!!

But i have same error in jsoncpp-project-stamp :(

screen shot 2017-03-07 at 10 51 00
chfast commented 7 years ago

Yes, there are other raw cmake used on other places in form of cmake --build <BINARY_DIR>. That also has to be changed to ${CMAKE_COMMAND} --build <BINARY_DIR>.

They are in jsoncpp.cmake, jsonrpc.cmake and cryptopp.cmake files. That should be all.

fernandoamorim commented 7 years ago

I change in 2 files:

jsonrpc.cmake BUILD_COMMAND ${CMAKE_COMMAND} --build --config Release INSTALL_COMMAND ${CMAKE_COMMAND} --build --config Release --target install

jsoncpp.cmake BUILD_COMMAND ${CMAKE_COMMAND} --build --config Release INSTALL_COMMAND ${CMAKE_COMMAND} --build --config Release --target install

But still same error, but now in jsonrpc (not in jsoncpp)

chfast commented 7 years ago

Try to reload cmake project as before. If that does not help, delete build_xc/deps directory.

fernandoamorim commented 7 years ago

I remove the build_xc folder and make "cmake -G Xcode .." again.

But, still not working! Fu..! :(

chfast commented 7 years ago

Can you send me error message?

fernandoamorim commented 7 years ago

Ops. Progress!

But, new error :p

screen shot 2017-03-07 at 11 23 47
chfast commented 7 years ago

I'm not sure what this one is about...

fernandoamorim commented 7 years ago

I follw this article:

http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/building-from-source/macos.html

I will remove all cpp folder and instal via brew: brew install cpp-ethereum

chfast commented 7 years ago

Have you tried if compilation with make works? I have no experience with Xcode to be honest.

fernandoamorim commented 7 years ago

Or i remove all cpp folder and install again...

fernandoamorim commented 7 years ago

I remove and create all again.. but same error

screen shot 2017-03-07 at 12 25 25
chfast commented 7 years ago

@pirapira can you help here? Do you use XCode like in this issue?

@fernandoamorim I suggested to try not to use XCode, just pure make to compile it (instructions are on the same page in documentation you referenced).

fernandoamorim commented 7 years ago

make install? i execute this.

chfast commented 7 years ago

@fernandoamorim I mean: don't generate Xcode project and open Xcode at all. Just cmake .. and make.

fernandoamorim commented 7 years ago

But how i start mining?

I`m new in this things, sorry!

pirapira commented 7 years ago

@fernandoamorim you have Terminal?

fernandoamorim commented 7 years ago

Yes @pirapira

fernandoamorim commented 7 years ago

I follow this steps in terminal:

http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/building-from-source/macos.html

But when i build app, have the erros...

pirapira commented 7 years ago

Then, cd into the directory where you cloned cpp-ethereum, and then

mkdir -p build
cd build
cmake ..
make

should compile something.

fernandoamorim commented 7 years ago

@pirapira Already exists an build folder into cpp-ethereum. I remove and create again?

screen shot 2017-03-07 at 17 29 58
pirapira commented 7 years ago

Any new directory should work.

fernandoamorim commented 7 years ago

@pirapira : running make.

After make command. What i need do?

pirapira commented 7 years ago

Previous errors on this thread do not seem like produced in the Terminal app. What kind of errors do you get in Terminal?

pirapira commented 7 years ago

If make finishes successfully, you can type make install if you'd like to.

fernandoamorim commented 7 years ago

[ 70%] Building CXX object eth/CMakeFiles/eth.dir/main.cpp.o make[2]: No rule to make target ../deps/boost/stage/lib/libboost_thread.a', needed byeth/eth'. Stop. make[1]: [eth/CMakeFiles/eth.dir/all] Error 2 make: *** [all] Error 2

And stop in 70%

pirapira commented 7 years ago

OK. I made a mistake. Go back to .. and type

git submodule init
git submodule update

and then go back to build (or your new directory) and make again.

fernandoamorim commented 7 years ago

@pirapira running

fernandoamorim commented 7 years ago

Same error:

[ 70%] Building CXX object eth/CMakeFiles/eth.dir/main.cpp.o make[2]: No rule to make target ../deps/boost/stage/lib/libboost_thread.a', needed byeth/eth'. Stop. make[1]: [eth/CMakeFiles/eth.dir/all] Error 2 make: *** [all] Error 2

pirapira commented 7 years ago

What happens with ls ../deps?

What does git show | head -n 4 say?

fernandoamorim commented 7 years ago
screen shot 2017-03-07 at 18 46 19 screen shot 2017-03-07 at 18 47 04
pirapira commented 7 years ago

I'll try on my machine.

One thing you can try meanwhile is to follow the script Travis runs on every pull-request: https://github.com/ethereum/cpp-ethereum/blob/develop/.travis.yml#L107

fernandoamorim commented 7 years ago

You said execute this script? ./scripts/install_deps.sh

i execute and return -bash: ./scripts/install_deps.sh: No such file or directory

pirapira commented 7 years ago

No, but you can try to do the same thing as what Travis does on a Mac OS.

chfast commented 7 years ago

I don't want to break this fun, but @fernandoamorim you will not be able to do GPU mining with latest cpp-ethereum. You probably should checkout some community-driven solutions for mining. E.g. https://github.com/Genoil/cpp-ethereum.

fernandoamorim commented 7 years ago

I running this steps.. https://travis-ci.org/ethereum/cpp-ethereum/jobs/208527613

What the difference between two?

And how i execute https://github.com/Genoil/cpp-ethereum?

fernandoamorim commented 7 years ago

executing from JOB, > 70% and not erros .....

fernandoamorim commented 7 years ago

100% and no errors!!!

./scripts/build.sh $TRAVIS_BUILD_TYPE $TRAVIS_TESTS

screen shot 2017-03-07 at 19 34 18
fernandoamorim commented 7 years ago

So when i execute cd $TRAVIS_BUILD_DIR/build && ../scripts/tests.sh $TRAVIS_TESTS return:

-bash: cd: /build: No such file or directory

pirapira commented 7 years ago

That's just because TRAVIS_BUILD_DIR is not defined.

By the way, I think @chfast is right about GPU mining.

vandabond commented 7 years ago

Hello guys I don't know if anybody here has any idea on how ethereum propose to help someone with ideas to decentralize the currency in his or way. I have an idea I would love some developers in the house to join me execute in my country with the help of ethereum thou.

pirapira commented 7 years ago

@vandabond your comment is out of topic here in this issue.