Build jsoncpp from source using CMake's ExternalProject #3348
Conversation
Is this the same pattern as you used for LLVM, @chfast? What do you see as the merits of downloading the ZIP versus using git sub-modules? |
It is the same pattern. It is just the ExternalProject is very nice combo. It will download the source code for you, unpack it, timestamp it (it is never rebuilt), build it, "install" it. You just don't have to think if you should use git submodule, or copy the source directly, etc. |
Build error:
Apart from this: Wonderful! Another advantage of this: The automatically attached source tarball for releases should work with this way of using dependencies in contrast to using git submodules. |
I know that. I think I forgot to update dependencies of ethminer (probably I'm not building it). @chriseth @bobsummerwill questions for you about jsoncpp.cmake script:
|
@chfast agree on both. |
Actually now I think this will severely break packages (debian/ubuntu, for example), unless we link statically. The makefile will install libjsoncpp into a general directory and that clashes with existing packages for libjsoncpp. Can that be solved somehow? If not, then I am fine with using docker-only "binaries" for now with the medium-term goal of static binaries. Note that our ubuntu ppa system is currently broken anyway. |
jsoncpp is linked statically. I think I will spend a bit more time on this to get json-rpc-cpp the same way and to force it to use the jsoncpp from the cmake script. Otherwise it make no sense. |
@chfast ah ok, but I saw some "install" rules, those should probably be removed. |
Good stuff, @chfast. All good with me, as long as we don't break things horribly in the transition. |
9cd8fca
to
ea593d6
Compare
@@ -36,4 +36,4 @@ else | |||
cmake .. -DCMAKE_BUILD_TYPE=$1 -DTESTS=$2 | |||
fi | |||
|
|||
make -j2 | |||
make -j2 VERBOSE=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this again?
After the review I will move the
jsoncpp.cmake
script to deps repo and apply the same changes in the solidity to resolve ethereum/solidity#789.