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

Ubunty Trusty - json-rpc-cpp paths vary? #617

Closed
romanman opened this issue Dec 14, 2014 · 44 comments

Comments

Projects
None yet
@romanman
Copy link

commented Dec 14, 2014

cmake .. -DCMAKE_BUILD_TYPE=Debug -DVMTRACE=1 -DPARANOIA=1
 - LevelDB lib: /usr/lib/x86_64-linux-gnu/libleveldb.so
-- Could NOT find JSONCPP (missing:  JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
 - Jsoncpp header:
 - Jsoncpp lib   :
-- Could NOT find json_rpc_cpp (missing:  JSON_RPC_CPP_COMMON_LIBRARY JSON_RPC_CPP_SERVER_LIBRARY JSON_RPC_CPP_CLIENT_LIBRARY JSON_RPC_CPP_INCLUDE_DIR)
CMake Error at cmake/EthDependencies.cmake:43 (message):
  JSONRPC 0.3.2.  not found
Call Stack (most recent call first):
  CMakeLists.txt:105 (include)


-- Configuring incomplete, errors occurred!
See also "/root/cpp-poc-7/cpp-ethereum/build/CMakeFiles/CMakeOutput.log".
@tglauner

This comment has been minimized.

Copy link

commented Dec 14, 2014

You can resolve your specific issue by installing jsonrpc 0.3.2. To do this execute:
git clone https://github.com/cinemast/libjson-rpc-cpp
cd libjson-rpc-cpp
git checkout tags/v0.3.2
mkdir -p build
cd build
cmake .. && make
sudo make install
sudo ldconfig

It still fails later on for me though around 81% build completion. Can you let me know after you do the above if your build succeeds.

@romanman

This comment has been minimized.

Copy link
Author

commented Dec 14, 2014

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at cmake/FindJSONCPP.cmake:35 (MESSAGE):
  Could not find JSONCPP library include: JSONCPP_INCLUDE_DIRS-NOTFOUND, lib:
  JSONCPP_LIBRARIES-NOTFOUND
Call Stack (most recent call first):
  src/jsonrpccpp/CMakeLists.txt:1 (find_package)

@tglauner : it's for building this branch :(

@slashbinslashnoname

This comment has been minimized.

Copy link

commented Dec 14, 2014

@romanman I think a solution has been posted here for the jsoncpp library #606

@romanman

This comment has been minimized.

Copy link
Author

commented Dec 14, 2014

@slashbinslashnoname so I don't see that anybody
has that cmake problem as I have ;(

@tglauner

This comment has been minimized.

Copy link

commented Dec 15, 2014

@romanman can you post your command prompt and then all the output. I will then try and look at it and compare to my now successful build.

@sveneh

This comment has been minimized.

Copy link

commented Dec 15, 2014

@romanman I see you have added options to your cmake scripts

cmake .. -DCMAKE_BUILD_TYPE=Debug -DVMTRACE=1 -DPARANOIA=1

can you first try to build it with a plain cmake .. and see if this works?

There might be regressions with some options which we haven't checked yet.

@sveneh sveneh self-assigned this Dec 15, 2014

@romanman

This comment has been minimized.

Copy link
Author

commented Dec 15, 2014

@sveneh : so the cmake also fails on JSONRPC 0.3.2. not found
@tglauner : so I amtrying to build jsonrpc 0.3.2 exactly by you orders and get this

root@ip-10-167-187-237:~/libjson-rpc-cpp# mkdir -p build
root@ip-10-167-187-237:~/libjson-rpc-cpp# cd build
root@ip-10-167-187-237:~/libjson-rpc-cpp/build# cmake ..
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at cmake/FindJSONCPP.cmake:35 (MESSAGE):
  Could not find JSONCPP library include: JSONCPP_INCLUDE_DIRS-NOTFOUND, lib:
  JSONCPP_LIBRARIES-NOTFOUND
Call Stack (most recent call first):
  src/jsonrpccpp/CMakeLists.txt:1 (find_package)


-- Configuring incomplete, errors occurred!
See also "/root/libjson-rpc-cpp/build/CMakeFiles/CMakeOutput.log".
@sveneh

This comment has been minimized.

Copy link

commented Dec 15, 2014

I found your issue.I assume you didn't do this step from the Ubuntu instructions:

sudo apt-get install libjsoncpp-dev libargtable2-dev

Does this solve it?

(json-rpc-cpp and jsoncpp are different packages)

@romanman

This comment has been minimized.

Copy link
Author

commented Dec 15, 2014

@sveneh : it helped !!! I have installed the json rpc.
now the question is: I see there is no headless build option any more ,
any way to build it with no qt ?

I used to build it usually on the headless linux
because all I need is eth peer.

@sveneh sveneh closed this Dec 16, 2014

@int03h

This comment has been minimized.

Copy link

commented Jun 9, 2016

cmake -DGUI=off .. turns off all the QT requirements ..

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2016

Did you see the date on this issue, @int03h? :-)

If you've got some energy for answering questions, please could I suggest that you check out this?

https://www.reddit.com/r/ethereum/comments/4ms4jp/check_out_some_outstanding_unanswered_questi

Lots of active questions there, and you can gain Stack Exchange "reputation" into the bargain.

@int03h

This comment has been minimized.

Copy link

commented Jun 9, 2016

oh .. wow! WTF Github - it's even CLOSED on 12/16/2014 !? Thought this was just something new :) yeah I can take a look tomorrow and see if I can do something on reddit. Can't promise much .. but I will do what I can ;) !

@ameensol

This comment has been minimized.

Copy link

commented Jul 19, 2016

Two years later, this still seems to be a problem. I'm running OSX El Capitan 10.11.5.

Any help is greatly appreciated. I attempted to build jsoncpp separately in a different repo but that had no effect. I may not have linked it correctly though.

➜  webthree-umbrella git:(develop) ✗ ./webthree-helpers/scripts/ethbuild.sh --no-git --project solidity --cores 4 -DEVMJIT=0 -DETHASHCL=0

ETHBUILD - INFO: Starting build of webthree-helpers/utils for requested project solidity.

-- The C compiler identification is AppleClang 7.3.0.7030031
-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- boost headers: /usr/local/include
-- boost lib   : /usr/local/lib/libboost_thread-mt.a;/usr/local/lib/libboost_date_time-mt.a;/usr/local/lib/libboost_system-mt.a;/usr/local/lib/libboost_regex-mt.a;/usr/local/lib/libboost_chrono-mt.a;/usr/local/lib/libboost_filesystem-mt.a;/usr/local/lib/libboost_unit_test_framework-mt.a;/usr/local/lib/libboost_program_options-mt.a;/usr/local/lib/libboost_random-mt.a;/usr/local/lib/libboost_atomic-mt.a
-- Found gmp: /usr/local/lib/libgmp.dylib
-- Gmp headers: /usr/local/include
-- Gmp lib   : /usr/local/lib/libgmp.dylib
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    ETHASHCL
    EVMJIT


-- Build files have been written to: /Users/nh2/webthree-umbrella/webthree-helpers/utils/build
[ 58%] Built target secp256k1
[100%] Built target scrypt

ETHBUILD - INFO: Starting build of libweb3core for requested project solidity.

-- The C compiler identification is AppleClang 7.3.0.7030031
-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- boost headers: /usr/local/include
-- boost lib   : /usr/local/lib/libboost_thread-mt.a;/usr/local/lib/libboost_date_time-mt.a;/usr/local/lib/libboost_system-mt.a;/usr/local/lib/libboost_regex-mt.a;/usr/local/lib/libboost_chrono-mt.a;/usr/local/lib/libboost_filesystem-mt.a;/usr/local/lib/libboost_unit_test_framework-mt.a;/usr/local/lib/libboost_program_options-mt.a;/usr/local/lib/libboost_random-mt.a;/usr/local/lib/libboost_atomic-mt.a

------------------------------------------------------------------------
-- Configuring dev
------------------------------------------------------------------------
--                  CMake Version                            3.6.0
-- CMAKE_BUILD_TYPE Build type                               RelWithDebInfo
-- TARGET_PLATFORM  Target platform                          Darwin
--------------------------------------------------------------- features
-- PROFILING        Profiling support                        OFF
-- PARANOID         -                                        OFF
-- MINIUPNPC        -                                        ON
------------------------------------------------------------- components
-- TESTS            Build tests                              ON
-- TOOLS            Build tools                              ON
------------------------------------------------------------------------

-- Could NOT find jsoncpp (missing:  JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
-- JsonCpp headers: JSONCPP_INCLUDE_DIR-NOTFOUND
-- JsonCpp lib   : JSONCPP_LIBRARY-NOTFOUND
CMake Error at /Users/nh2/webthree-umbrella/webthree-helpers/cmake/UseJsoncpp.cmake:8 (message):
  Jsoncpp library not found
Call Stack (most recent call first):
  /Users/nh2/webthree-umbrella/webthree-helpers/cmake/EthDependencies.cmake:147 (eth_apply)
  libdevcore/CMakeLists.txt:11 (eth_use)


-- Configuring incomplete, errors occurred!
See also "/Users/nh2/webthree-umbrella/libweb3core/build/CMakeFiles/CMakeOutput.log".
ETHBUILD - ERROR: cmake configure phase for repository "libweb3core" failed.
@ameensol

This comment has been minimized.

Copy link

commented Jul 19, 2016

Looks like it was fixed by installing jsoncpp with brew:

brew tap cuber/homebrew-jsoncpp
brew install jsoncpp

source: https://github.com/cuber/homebrew-jsoncpp

@ameensol

This comment has been minimized.

Copy link

commented Jul 19, 2016

Also was missing json-rpc-cpp, also installed with brew:

brew install libjson-rpc-cpp

source: https://github.com/cinemast/libjson-rpc-cpp

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2016

Please use these building-from-source instructions:
http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/building-from-source/osx.html

Not ethbuild.sh

And this is going to get way easier again in the next couple of days.

Where did you see the instructions referring to that script, please? I know the Solidity build instructions need updating. Just wondering which instructions you were following? Thanks!

If you feel brave, use https://github.com/bobsummerwill/cpp-ethereum, and just do:

git clone --recursive https://github.com/bobsummerwill/cpp-ethereum
cd cpp-ethereum
./scripts/install-deps.sh
mkdir build
cd build
cmake ..
make
@ameensol

This comment has been minimized.

Copy link

commented Jul 19, 2016

Hi Bob, thanks for responding.

I typed in mac solc install into google, which lead me to the Installing Solidity page.

I think the problem is that those instructions don't have me install jsoncpp before libjson-rpc-cpp.

I was able to solve the problem :)

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2016

OK - glad you are up-and-running, @ameensol.

Yeah - those Solidity instructions are very out-of-date and unhelpful. The good news is that I will be completely rewriting them imminently. Best wishes!

@leroy627

This comment has been minimized.

Copy link

commented Jul 30, 2016

Erm, did the above steps, hoping it was the LAST step to compiling genoil's cuda miner and got this:

CMake Error at cmake/Findjson_rpc_cpp.cmake:105 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  cmake/EthDependencies.cmake:60 (find_package)
  CMakeLists.txt:246 (include)


CMake Error at cmake/Findjson_rpc_cpp.cmake:106 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  cmake/EthDependencies.cmake:60 (find_package)
  CMakeLists.txt:246 (include)


CMake Error at cmake/Findjson_rpc_cpp.cmake:107 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  cmake/EthDependencies.cmake:60 (find_package)
  CMakeLists.txt:246 (include)


CMake Error at cmake/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find json_rpc_cpp: Found unsuitable version "**..**", but required is
  at least "0.4" (found /usr/local/include)
Call Stack (most recent call first):
  cmake/FindPackageHandleStandardArgs.cmake:372 (_FPHSA_FAILURE_MESSAGE)
  cmake/Findjson_rpc_cpp.cmake:116 (find_package_handle_standard_args)
  cmake/EthDependencies.cmake:60 (find_package)
  CMakeLists.txt:246 (include)


-- Configuring incomplete, errors occurred!
See also "/root/cpp-ethereum/build/CMakeFiles/CMakeOutput.log".


version.h file of json-rpc-cpp says this:

/*************************************************************************
 * libjson-rpc-cpp
 *************************************************************************
 * @file    version.h.in
 * @date    12.05.2013
 * @author  Peter Spiess-Knafl <peter.knafl@gmail.com>
 * @license See attached LICENSE.txt
 ************************************************************************/

#ifndef VERSION_H_
#define VERSION_H_

#define JSON_RPC_CPP_MAJOR_VERSION 0
#define JSON_RPC_CPP_MINOR_VERSION 3
#define JSON_RPC_CPP_PATCH_VERSION 2

#endif /* VERSION_H_ */

So... any thoughts?

Sidenote:
@bobsummerwill Make the Install_deps.sh script more obvious... took me 20+mins to find(Only to find it in the code of this...Line77)

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Aug 1, 2016

Hey @leroy627,

If you are building Genoil's ethminer then your build instructions will be completely different because the code has been forked for months. You'll need to lean on @Genoil for help there.

I'm planning on trying to upstream ...

RE: "Make the Install_deps.sh script more obvious" ...

It's detailed in http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/building-from-source/index.html#building-from-source.

And I'll be rewriting the Solidity building from source instructions imminently. install_deps.sh just dropped into the Solidity mainline tonight.

This stuff is churning right now but will be much happier very soon. Sorry you got tripped up.

@leroy627

This comment has been minimized.

Copy link

commented Aug 1, 2016

Actually got it working, turns out Live Ubuntu doesn't do apt-get(s) properly, might wanna make a note of that on the guides. @bobsummerwill @Genoil

P/S I started reading from this part, which said to clone your old rep, messing me up(Went to look for install_deps.sh there)

http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/building-from-source/linux.html#clone-the-repository

@int03h

This comment has been minimized.

Copy link

commented Aug 2, 2016

Also .. make sure you stay on a distro that uses fglrx but is also relatively up to date so that it fulfils the version requirements. I used 15.10 successfully. 16.04 and 16.10 are actually better for getting all the deps, BUT then you are are in AMDGPU-PRO territory ( ie. flgrx goes away ).. IF you are doing this for CUDA then 16.10 is actually the easiest. in my experience. Obviously all of this is Ubuntu. I've been keen to get back onto Debian Stretch since I hate Ubuntu, but just haven't had the "guts" to do it. AMDGPU is VERY temperamental. I wasted like 2 days trying to make debian work with Genminer. AMDGPU was breaking in DKMS, so close yet so far. ;)

@Lldenaurois

This comment has been minimized.

Copy link

commented Sep 8, 2016

Hi @leroy627,

When I try to build cpp-ethereum, I get the exact same error as you posted above.

guest2@pc-10700:~/cpp-ethereum/build$ cmake -DBUNDLE=miner ..
-- ctest path: /usr/bin/ctest

  • CryptoPP header: /usr/include
  • CryptoPP lib : /usr/lib/libcryptopp.so
  • LevelDB header: /usr/include
  • LevelDB lib: /usr/lib/x86_64-linux-gnu/libleveldb.so
  • Jsoncpp header: /usr/include/jsoncpp
  • Jsoncpp lib : /usr/lib/x86_64-linux-gnu/libjsoncpp.so
    jsonrpccpp include dir:
    CMake Error at cmake/Findjson_rpc_cpp.cmake:107 (string):
    string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
    command.
    Call Stack (most recent call first):
    cmake/EthDependencies.cmake:60 (find_package)
    CMakeLists.txt:246 (include)

CMake Error at cmake/Findjson_rpc_cpp.cmake:108 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
Call Stack (most recent call first):
cmake/EthDependencies.cmake:60 (find_package)
CMakeLists.txt:246 (include)

CMake Error at cmake/Findjson_rpc_cpp.cmake:109 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
Call Stack (most recent call first):
cmake/EthDependencies.cmake:60 (find_package)
CMakeLists.txt:246 (include)

CMake Error at cmake/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find json_rpc_cpp: Found unsuitable version "..", but required is
at least "0.4" (found /usr/local/include)
Call Stack (most recent call first):
cmake/FindPackageHandleStandardArgs.cmake:372 (_FPHSA_FAILURE_MESSAGE)
cmake/Findjson_rpc_cpp.cmake:118 (find_package_handle_standard_args)
cmake/EthDependencies.cmake:60 (find_package)
CMakeLists.txt:246 (include)

-- Configuring incomplete, errors occurred!
See also "/home/yuwang/guest2/cpp-ethereum/build/CMakeFiles/CMakeOutput.log".

When I change directory into jsonrpccpp, I find the version.h file as you posted above:

guest2@pc-10700:~/cpp-ethereum/build$ cd /usr/local/include
guest2@pc-10700:/usr/local/include$ ls
jsonrpccpp
guest2@pc-10700:/usr/local/include$ cd jsonrpccpp
guest2@pc-10700:/usr/local/include/jsonrpccpp$ ls
client client.h common server server.h version.h
guest2@pc-10700:/usr/local/include/jsonrpccpp$ nano version.h

With the version.h file:
GNU nano 2.5.3 File: version.h

/*************************************************************************

#ifndef VERSION_H_
#define VERSION_H_

#define JSON_RPC_CPP_MAJOR_VERSION 0
#define JSON_RPC_CPP_MINOR_VERSION 3
#define JSON_RPC_CPP_PATCH_VERSION 2

#endif /* VERSION_H_ */

Could you let me know how you fixed this issue? You said that it has something to do with the Live Ubuntu apt-gets? Could you provide some insight.

Since you posted this recently, I hope that you can provide some guidance. I tried installing jsonrpccpp using apt-get and building it from source. When I install it through apt-get, the headers are included in /usr/include as oppose to /usr/local/include. When I build jsonrpccpp from source, the headers are included in /usr/local/include.

Any support is greatly appreciated. Thanks in advance.

@leroy627

This comment has been minimized.

Copy link

commented Sep 8, 2016

@Lldenaurois If you're using Live Ubuntu, some apt-gets won't work, no clue why, but it just doesn't work.
You can install Ubuntu onto a flash drive and follow the instructions on genoil's Git, they'll work except you need to change one command for cudaminer, forgot which, will check tomorrow( Think there's a 'miner' in the last few lines that needs to be changed to 'cudaminer')

@Lldenaurois

This comment has been minimized.

Copy link

commented Sep 8, 2016

Hi @leroy627,

Thanks for the quick response. Followed the instructions, but still get the same error. I wonder if it's because I'm on Ubuntu 16.04.

If you could check how exactly you got it to work, that would be great. I tried modifying the Findjson-rpc-cpp.cmake file to point a different directory, but that didn't work either.

Would really be interested on how you solved this issue.

@leroy627

This comment has been minimized.

Copy link

commented Sep 9, 2016

@Lldenauroi I'm using 14.04 LTS Desktop, so your version might be the problem. Just re-read your post, i don't really know how to install cpp-ethereum, just genoil's miner, imo just use genoil.

Also, if you're making a cuda miner, change DBUNDLE = miner into cudaminer, if you're mining on an Nvidia card.
You don't need to change the DBUNDLE if you're using an AMD card.

Instructions here https://github.com/Genoil/cpp-ethereum at the bottom.

If it still doesn't work, perhaps head over to the webthree-umbrella repo (official ethereum repo) and find the install_deps.sh and run it.

@leroy627

This comment has been minimized.

Copy link

commented Sep 9, 2016

@Lldenaurois Spelt it wrong :P

@Lldenaurois

This comment has been minimized.

Copy link

commented Sep 9, 2016

Thanks,

I was able to fix the issue. For anyone building Genoil's cpp-ethereum receiving the same error message when using "cmake - DBUNDLE=cudaminer", the issue lies with the ../cmake/Findjson_rpc_cpp.cmake file. Open that file with your favorite text editor and point the variables to the exact path of your jsonrpccpp folders.

For me, the headers were in

/usr/include

And the lib files were in

/usr/lib/x86_64-linux-gnu/

The proper lib files are called

libjsonrpccpp-common.so.0.6.0
libjsonrpccpp-client.so.0.6.0
libjsonrpccpp-server.so.0.6.0

Hope this helps. I was able to build cpp-ethereum, and am now trying to mine using ./ethminer, but get a separate issue, which is also related to the JSON-RPC. Let's hope I can start mining soon enough.

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2016

Hey @Lldenaurois, @leroy627,

So other than the confusion over trying to use "official" build instructions for the cpp-ethereum code-base, I don't know that there is any TODO here for this repo.

json-rpc-cpp is build from source as part of scripts/install_deps.sh so, I think goes to a location which the Find will find, even if installing it via apt-get would send it to the wrong place.

That particular package DOES need to be 0.6.0, which is not available on all Ubuntu versions.

I'm still planning to upstream @Genoil's changes (see #3125), but until then I think that the build issues you are seeing are specific to the Genoil downstream.

Unless you are telling me that this sequence doesn't work on an Ubuntu Live 16.04 image?

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2016

If that official sequence is broken for Ubuntu Live then yes, we will need to fix that. Thanks!

CMake is a bit weird that way. You have these Find scripts, but they are often passed around in a cargo-cult way on the Internet rather than there being a comprehensive official set of them. CMake does ship with them for very major packages, but for anything else you just have to write your own or cut-and-paste one. I can completely believe that if json-rpc-cpp does anything weird with install paths then the script we have might not cope with that. Looks like it has never changed since it was first added.

@Lldenaurois

This comment has been minimized.

Copy link

commented Sep 9, 2016

Hello @bobsummerwill,

I just tried the sequence you provided on Ubuntu 16.04 (different machine this time). The ./scripts/install_deps.sh is not sufficient for cmake. When I run cmake .., I get the following error

user@nb-10689:~/cpp-ethereum/build$ cmake ..
-- The C compiler identification is GNU 5.2.1
-- The CXX compiler identification is GNU 5.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done


-- Configuring cpp-ethereum

-- CMake Version 3.2.2
-- CMAKE_BUILD_TYPE Build type RelWithDebInfo
-- TARGET_PLATFORM Target platform Linux
--------------------------------------------------------------- features
-- Hardware identification support
-- HTTP Request support
-- VMTRACE VM execution tracing OFF
-- PROFILING Profiling support OFF
-- FATDB Full database exploring ON
-- ROCKSDB Prefer rocksdb to leveldb OFF
-- PARANOID - OFF
-- MINIUPNPC - ON
------------------------------------------------------------- components
-- TESTS Build tests ON
-- ETHASHCL Build OpenCL components ON

-- EVMJIT Build LLVM-based JIT EVM OFF

-- Could NOT find jsoncpp (missing: JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
-- JsonCpp headers: JSONCPP_INCLUDE_DIR-NOTFOUND
-- JsonCpp lib : JSONCPP_LIBRARY-NOTFOUND
CMake Error at cmake/UseJsoncpp.cmake:8 (message):
Jsoncpp library not found
Call Stack (most recent call first):
cmake/EthDependencies.cmake:203 (eth_apply)
cmake/UseJsonRpc.cmake:3 (eth_use)
cmake/EthDependencies.cmake:203 (eth_apply)
eth/CMakeLists.txt:7 (eth_use)

-- Configuring incomplete, errors occurred!
See also "/home/user/cpp-ethereum/build/CMakeFiles/CMakeOutput.log".

After I install jsoncpp using sudo apt-get install libjsoncpp-dev, I run cmake .. again and get the following error:

user@nb-10689:~/cpp-ethereum/build$ cmake ..


-- Configuring cpp-ethereum

-- CMake Version 3.2.2
-- CMAKE_BUILD_TYPE Build type RelWithDebInfo
-- TARGET_PLATFORM Target platform Linux
--------------------------------------------------------------- features
-- Hardware identification support
-- HTTP Request support
-- VMTRACE VM execution tracing OFF
-- PROFILING Profiling support OFF
-- FATDB Full database exploring ON
-- ROCKSDB Prefer rocksdb to leveldb OFF
-- PARANOID - OFF
-- MINIUPNPC - ON
------------------------------------------------------------- components
-- TESTS Build tests ON
-- ETHASHCL Build OpenCL components ON

-- EVMJIT Build LLVM-based JIT EVM OFF

-- Found jsoncpp: /usr/lib/x86_64-linux-gnu/libjsoncpp.so
-- JsonCpp headers: /usr/include/jsoncpp
-- JsonCpp lib : /usr/lib/x86_64-linux-gnu/libjsoncpp.so
-- Could NOT find json_rpc_cpp (missing: JSON_RPC_CPP_INCLUDE_DIR JSON_RPC_CPP_COMMON_LIBRARY JSON_RPC_CPP_SERVER_LIBRARY JSON_RPC_CPP_CLIENT_LIBRARY) (Required is at least version "0.4")
-- json-rpc-cpp headers: JSON_RPC_CPP_INCLUDE_DIR-NOTFOUND
-- json-rpc-cpp lib : JSON_RPC_CPP_COMMON_LIBRARY-NOTFOUND;JSON_RPC_CPP_SERVER_LIBRARY-NOTFOUND;JSON_RPC_CPP_CLIENT_LIBRARY-NOTFOUND
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
-- curl headers: CURL_INCLUDE_DIR-NOTFOUND
-- curl lib : CURL_LIBRARY-NOTFOUND
CMake Error at cmake/UseCURL.cmake:17 (message):
Curl library not found
Call Stack (most recent call first):
cmake/EthDependencies.cmake:203 (eth_apply)
cmake/UseJsonRpc.cmake:25 (eth_use)
cmake/EthDependencies.cmake:203 (eth_apply)
eth/CMakeLists.txt:7 (eth_use)

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/user/cpp-ethereum/eth/JSON_RPC_CPP_INCLUDE_DIR
used as include directory in directory /home/user/cpp-ethereum/eth
JSON_RPC_CPP_CLIENT_LIBRARY (ADVANCED)
linked by target "eth" in directory /home/user/cpp-ethereum/eth
JSON_RPC_CPP_COMMON_LIBRARY (ADVANCED)
linked by target "eth" in directory /home/user/cpp-ethereum/eth

-- Configuring incomplete, errors occurred!
See also "/home/user/cpp-ethereum/build/CMakeFiles/CMakeOutput.log".

I would have to install jsonrpccpp to get this to work. So, as far as I can tell, the sequence you provided does not work on Ubuntu 16.04.

@Lldenaurois

This comment has been minimized.

Copy link

commented Sep 9, 2016

@bobsummerwill I'd be happy to help by the way. Let me know if you need a hand on handling this.

@bobsummerwill bobsummerwill reopened this Sep 9, 2016

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2016

Thanks for the details, @Lldenaurois.

To be clear, is that on a "normal" Ubuntu Trusty install? Or on an Ubuntu Live Trusty?

The reason I ask is because we are using that scripts/install_deps.sh flow continuously on a Trusty machine within TravisCI ...

https://github.com/ethereum/cpp-ethereum/blob/develop/.travis.yml#L105

So there must be some difference between that setup, and your setup. Just trying to zero in on what that is.

I don't think installing json-rpc-cpp with apt-get is the right answer.

Where did the build-from-source within scripts/install_deps.sh install to on your machine?

Same as described in #617 (comment) on the new machine?

@bobsummerwill bobsummerwill changed the title cmake fails :( Ubunty Trust - json-rpc-cpp paths vary? Sep 9, 2016

@bobsummerwill bobsummerwill assigned bobsummerwill and unassigned sveneh Sep 9, 2016

@bobsummerwill bobsummerwill changed the title Ubunty Trust - json-rpc-cpp paths vary? Ubunty Trusty - json-rpc-cpp paths vary? Sep 9, 2016

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2016

Hmm. Interesting. See:

That first one is actually within the mainline repo for the package itself, so is pretty official.

The second one explicitly includes one hardcoded system paths, which looks like they might correlate with what you are seeing. I just need to read up on the semantics of find_path(). Maybe those extra explicit paths are exactly what we need to resolve this issue? I assume those are non-default paths in addition to whatever CMake itself provides as defaults on any given distro.

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2016

@Lldenaurois Please could you confirm that you are seeing your install going to /usr/include and /usr/lib? And your exact distro?

It looks like the fix will be to add ...

PATHS /usr/include

or ...

PATHS /usr/lib

To each of those find_path() and find_library() calls, but I really want to understand what is exact scenario which is not working, and needs that tweak. Thanks!

@Lldenaurois

This comment has been minimized.

Copy link

commented Sep 12, 2016

Hi @bobsummerwill,

The install is going into /usr/include and /usr/lib. To be specific, the library ends up in
/usr/lib/x86_64-linux-gnu.

I think that your fix will work. The find_path() call was previously looking in /usr/local/include, as oppose to /usr/include

@deri82

This comment has been minimized.

Copy link

commented Sep 17, 2016

The following packages have unmet dependencies:
libmicrohttpd-dev : Depends: libgnutls28-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Sep 29, 2016

Hey @Lldenaurois,
Again - please could you confirm your EXACT distro? Is this an Ubuntu Live?

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Sep 29, 2016

@deri82 What is the EXACT distro you are seeing this on, please?
And please can you confirm this happens when running scripts/install_deps.sh at HEAD? Thanks!

@deri82

This comment has been minimized.

Copy link

commented Oct 11, 2016

Linux mint 18

@deri82

This comment has been minimized.

Copy link

commented Oct 11, 2016

The following packages have unmet dependencies:
libmicrohttpd-dev : Depends: libgnutls28-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The following packages have unmet dependencies:
libgnutls28-dev : Depends: libgnutls-dev (= 3.4.10-4ubuntu1.1) but it is not going to be installed

@deri82

This comment has been minimized.

Copy link

commented Oct 11, 2016

sudo apt-get install libgnutls-dev
The following packages have unmet dependencies:
libgnutls-dev : Depends: libidn11-dev (>= 1.31) but it is not going to be installed

@bobsummerwill

This comment has been minimized.

Copy link
Contributor

commented Oct 11, 2016

Thanks for the info, @deri82. Not sure what to suggest.

@chfast chfast self-assigned this Oct 16, 2016

@chfast

This comment has been minimized.

Copy link
Collaborator

commented Oct 18, 2016

json-rpc-cpp and jsoncpp are built from source now.
Fixed by #3348.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.