Skip to content

Commit

Permalink
Build jsoncpp from source using jsoncpp.cmake script
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast authored and axic committed Oct 20, 2016
1 parent 5875890 commit 4bde0a2
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 112 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ cache:
- cryptopp
- boost_1_57_0
- build
- jsoncpp

install:
- test $TRAVIS_INSTALL_DEPS != On || ./scripts/install_deps.sh
Expand All @@ -164,7 +163,7 @@ script:
# in Solidity's RPC setup and some will be in 'eth'. It seems unlikely that Solidity
# itself is broken from the failure messages which we are seeing.
#
# More details on known issues at https://github.com/ethereum/solidity/issues/769
# More details on known issues at https://github.com/ethereum/solidity/issues/769
- test $TRAVIS_TESTS != On || (cd $TRAVIS_BUILD_DIR && (./scripts/tests.sh || ./scripts/tests.sh || ./scripts/tests.sh) )
env:
global:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ project(solidity VERSION ${PROJECT_VERSION})

# Let's find our dependencies
include(EthDependencies)
include(deps/jsoncpp.cmake)

# Figure out what compiler and system are we using
include(EthCompilerSettings)
Expand Down
50 changes: 0 additions & 50 deletions cmake/FindJsoncpp.cmake

This file was deleted.

10 changes: 0 additions & 10 deletions cmake/UseJsoncpp.cmake

This file was deleted.

3 changes: 1 addition & 2 deletions cmake/UseSolidity.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ function(eth_apply TARGET REQUIRED SUBMODULE)
target_include_directories(${TARGET} PUBLIC ${Solidity_INCLUDE_DIRS})

if (${SUBMODULE} STREQUAL "solevmasm")
eth_use(${TARGET} ${REQUIRED} Jsoncpp)
target_link_libraries(${TARGET} ${Solidity_SOLEVMASM_LIBRARIES})
target_link_libraries(${TARGET} ${Solidity_SOLEVMASM_LIBRARIES} jsoncpp)
endif()

if (${SUBMODULE} STREQUAL "lll")
Expand Down
2 changes: 1 addition & 1 deletion deps
Submodule deps updated 3 files
+0 −3 install_deps.cmake
+26 −0 jsoncpp.cmake
+89 −0 jsonrpc.cmake
3 changes: 2 additions & 1 deletion libevmasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ file(GLOB HEADERS "*.h")

include_directories(BEFORE ..)
add_library(${EXECUTABLE} ${SRC_LIST} ${HEADERS})
eth_use(${EXECUTABLE} REQUIRED Jsoncpp Dev::soldevcore)
eth_use(${EXECUTABLE} REQUIRED Dev::soldevcore)
target_link_libraries(${EXECUTABLE} jsoncpp)

install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
3 changes: 0 additions & 3 deletions liblll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

aux_source_directory(. SRC_LIST)

#include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS})
#include_directories(${Boost_INCLUDE_DIRS})

set(EXECUTABLE lll)

file(GLOB HEADERS "*.h")
Expand Down
10 changes: 2 additions & 8 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ case $(uname -s) in

brew install boost
brew install cmake
brew install jsoncpp

# We should really 'brew install' our eth client here, but at the time of writing
# the bottle is known broken, so we will just cheat and use a hardcoded ZIP for
Expand Down Expand Up @@ -164,7 +163,7 @@ case $(uname -s) in
# See https://pkgs.alpinelinux.org/

apk update
apk add boost-dev build-base cmake jsoncpp-dev
apk add boost-dev build-base cmake

;;

Expand Down Expand Up @@ -219,7 +218,6 @@ case $(uname -s) in
gcc \
git \
libboost-all-dev \
libjsoncpp-dev \
unzip

;;
Expand Down Expand Up @@ -321,8 +319,7 @@ case $(uname -s) in
build-essential \
cmake \
git \
libboost-all-dev \
libjsoncpp-dev
libboost-all-dev

# Install 'eth', for use in the Solidity Tests-over-IPC.
sudo add-apt-repository -y ppa:ethereum/ethereum
Expand Down Expand Up @@ -363,9 +360,6 @@ case $(uname -s) in
sudo yum -y remove boost-devel
sudo wget http://repo.enetres.net/enetres.repo -O /etc/yum.repos.d/enetres.repo
sudo yum install boost-devel

# And finally jsoncpp
sudo yum -y install jsoncpp-devel
else
echo "Aborted CentOS Solidity Dependency Installation";
exit 1
Expand Down
20 changes: 2 additions & 18 deletions scripts/release_ppa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,6 @@ cp /tmp/${packagename}_${debversion}.orig.tar.gz ../

# Create debian package information

case $distribution in
trusty)
jsoncpplib=libjsoncpp0
;;
vivid)
jsoncpplib=libjsoncpp0
;;
wily)
jsoncpplib=libjsoncpp0v5
;;
*)
jsoncpplib=libjsoncpp1
;;
esac

mkdir debian
echo 9 > debian/compat
cat <<EOF > debian/control
Expand All @@ -107,8 +92,7 @@ Build-Depends: debhelper (>= 9.0.0),
libboost-all-dev,
automake,
libtool,
scons,
libjsoncpp-dev
scons
Standards-Version: 3.9.5
Homepage: https://ethereum.org
Vcs-Git: git://github.com/ethereum/solidity.git
Expand All @@ -117,7 +101,7 @@ Vcs-Browser: https://github.com/ethereum/solidity
Package: solc
Architecture: any-i386 any-amd64
Multi-Arch: same
Depends: \${shlibs:Depends}, \${misc:Depends}, $jsoncpplib
Depends: \${shlibs:Depends}, \${misc:Depends}
Replaces: lllc (<< 1:0.3.6)
Conflicts: libethereum (<= 1.2.9)
Description: Solidity compiler.
Expand Down
16 changes: 0 additions & 16 deletions scripts/travis-emscripten/build_emscripten.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ rm -rf .git
)
echo -en 'travis_fold:end:compiling_cryptopp\\r'

# Json-CPP
echo -en 'travis_fold:start:compiling_jsoncpp\\r'
cd "$WORKSPACE/jsoncpp"
# if .git exists, it is a fresh checkout, otherwise it comes from the cache
# and is already compiled
test -e .git && (
emcmake cmake -DJSONCPP_LIB_BUILD_STATIC=ON -DJSONCPP_LIB_BUILD_SHARED=OFF \
-DJSONCPP_WITH_TESTS=OFF -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
-G "Unix Makefiles" .
emmake make -j 4
rm -rf .git
)
echo -en 'travis_fold:end:compiling_jsoncpp\\r'

# Boost
echo -en 'travis_fold:start:compiling_boost\\r'
cd "$WORKSPACE"/boost_1_57_0
Expand Down Expand Up @@ -112,8 +98,6 @@ emcmake cmake \
-DBoost_THREAD_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_thread.a \
-DBoost_UNIT_TEST_FRAMEWORK_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_unit_test_framework.a \
-DBoost_UNIT_TEST_FRAMEWORK_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_unit_test_framework.a \
-DJSONCPP_LIBRARY="$WORKSPACE"/jsoncpp/src/lib_json/libjsoncpp.a \
-DJSONCPP_INCLUDE_DIR="$WORKSPACE"/jsoncpp/include/ \
-DCRYPTOPP_LIBRARY="$WORKSPACE"/cryptopp/src/libcryptlib.a \
-DCRYPTOPP_INCLUDE_DIR="$WORKSPACE"/cryptopp/src/ \
-DDev_DEVCORE_LIBRARY="$WORKSPACE"/solidity/build/libdevcore/libsoldevcore.a \
Expand Down
1 change: 0 additions & 1 deletion scripts/travis-emscripten/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ set -ev

echo -en 'travis_fold:start:installing_dependencies\\r'
test -e cryptopp -a -e cryptopp/src || git clone https://github.com/mmoss/cryptopp.git
test -e jsoncpp -a -e jsoncpp/include || git clone https://github.com/open-source-parsers/jsoncpp.git
test -e boost_1_57_0 -a -e boost_1_57_0/boost || (
wget 'http://downloads.sourceforge.net/project/boost/boost/'\
'1.57.0/boost_1_57_0.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2F'\
Expand Down

0 comments on commit 4bde0a2

Please sign in to comment.