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

Build-related upstream patches 1 #88

Merged
merged 51 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c1fa67b
Dockerfile: replace monero with aeon
stoffu Dec 17, 2018
619eb89
docker: update to new versions of dependencies /monero#4094
homdx Jul 3, 2018
4d6cfe9
Changed URLs to HTTPS /monero#4045
NullPiotrException Jun 23, 2018
e82f9e0
gtest: use -fPIC with CLANG too /monero#4073
moneromooo-monero Jun 28, 2018
2f30e06
README: remove mentions of external miniupnpc dependency /monero#4098
moneromooo-monero Jul 4, 2018
d256bb9
Docker: updated cmake version /monero#4214
homdx Aug 2, 2018
cdd5eba
Updating Qt download link /monero#4234
Jkat Aug 7, 2018
0ff4d63
Added Codefresh.yml pipeline /monero#4235
homdx Aug 7, 2018
a2547d9
README: add dependency on libpgm-dev /monero#4243
stoffu Aug 10, 2018
6701a45
Translations: handle cross compiling /monero#4294
MoroccanMalinois Aug 21, 2018
e2641c6
Build: Fix target release-static-android /monero#4294
MoroccanMalinois Aug 21, 2018
2fbd6dd
Docker: Fix android build /monero#4294
MoroccanMalinois Aug 22, 2018
c6d1b3f
Windows: don't preset CMAKE_SYSTEM_NAME /monero#4342
iDunk5400 Sep 6, 2018
f8244ed
CMakeLists.txt: detect -fcf-protection=full and -fstack-clash-protect…
moneromooo-monero Jul 26, 2018
e83dec9
CMakeLists.txt: add -mmitigate-rop to security flags if found /monero…
moneromooo-monero Aug 7, 2018
a4d4e69
One build directory per branch/arch. /monero#4286
cslashm Aug 20, 2018
5d6dd88
NetBSD support /monero#4326
thomasvaughan Sep 2, 2018
5f975be
Docker: Updated dependencies cmake 3.12.1 and boost 1.68 /monero#4322
homdx Sep 1, 2018
d59e8fa
README: bump cmake requirement to 3.5, as required by miniupnpc /mone…
moneromooo-monero Sep 9, 2018
adfb78b
Docker android: use common prefix /monero#4356
MoroccanMalinois Sep 10, 2018
d8f1191
Docker android: add libsodium /monero#4356
MoroccanMalinois Sep 10, 2018
0244aa5
README: fill in libsodium package name for Arch /monero#4401
phloatingman Dec 30, 2017
b490ed6
README: Compile boost with cxxflags=-fPIC cflags=-fPIC /monero#4401
italocoin-project Mar 25, 2018
364348c
disable AES on s390x architecture /monero#4401
tmh1999 May 1, 2018
d7cefa0
Fixes Dockerfile build problem #4396 /monero#4397
opsxcq Sep 17, 2018
ece8e23
Dockerfile: use single build dir /monero#4419
MoroccanMalinois Sep 24, 2018
944e676
README: mention ASAN usage alongside valgrind /monero#4434
moneromooo-monero Sep 25, 2018
b7adbd1
build: set ARCH_FLAG before compiler/linker flag checks /monero#4457
xiphon Sep 27, 2018
ebdc53f
Add check if submodules need to be updated /monero#4501
TheCharlatan Oct 4, 2018
2554cf8
CMakeLists.txt: Fix typo /monero#4529
erciccione Oct 8, 2018
51871bc
Utils: Add Dockerfile for android 64-bit build /monero#4517
glemercier Oct 7, 2018
66707b0
Dockerfile: init and update submodules /monero#4591
EmbeddedAndroid Oct 13, 2018
84a261b
Fix Windows build after epee dependency change /monero#4572
iDunk5400 Oct 12, 2018
bc5b2e1
Makefile: fix building without a git tree /monero#4715
moneromooo-monero Oct 24, 2018
1a3bebb
README: mention max_usb_current setting on Raspberry Pi /monero#4553
moneromooo-monero Oct 10, 2018
1d9a6e1
CMakeLists.txt: detect and use -pthread compiler flag /monero#4580
moneromooo-monero Oct 13, 2018
63035d3
README: add libnorm to the dependency list /monero#4597
moneromooo-monero Oct 15, 2018
0135edb
build: fixed submodule check /monero#4620
xiphon Oct 16, 2018
504462b
CMakeLists.txt: only use libatomic when found /monero#4679
moneromooo-monero Oct 20, 2018
fc0d642
Updating Monero GUI repo link in README.i18n.md /monero#4676
Jkat Oct 4, 2018
ccc75c2
build: older git versions don't have '-C' flag /monero#4760
xiphon Oct 30, 2018
c85d47e
cmake: fix readline detection when the readline library is not found …
moneromooo-monero Oct 26, 2018
3c4bd04
cmake: move Boost_LOCALE_LIBRARY out of ICU_LIBRARIES /monero#4847
stoffu Nov 14, 2018
fd060eb
libwallet_api_tests: add missing dependency on Boost Locale and ICU /…
stoffu Nov 14, 2018
95fec3e
Dockerfile: add udev, libusb and hidapi build /monero#4751
MoroccanMalinois Oct 29, 2018
aa12a3f
README.md: increase swap size on Raspberry Pi /monero#4756
Neofito89 Oct 29, 2018
1db5e3b
CMakeLists.txt: add -ftemplate-depth=900 /monero#4842
moneromooo-monero Nov 12, 2018
0b46944
build: ubuntu 16 ppc build fixes /monero#4796
jtgrassie Nov 1, 2018
4fac968
Updated dependencies Cmake 3.13, CPPZMQ 4.3.0, OPENSSL 1.1.0j /monero…
homdx Nov 22, 2018
00a9aa9
crypto: remove unused unsafe random scalar generator /monero#4074
moneromooo-monero Jun 28, 2018
2eab773
README: remove TODO tag from Docker build section
stoffu Dec 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 96 additions & 39 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,16 @@ if(ARCH_ID STREQUAL "powerpc64" OR ARCH_ID STREQUAL "ppc64")
set(PPC 0)
endif()

if(ARCH_ID STREQUAL "powerpc")
if(ARCH_ID STREQUAL "powerpc" OR ARCH_ID STREQUAL "ppc")
set(PPC64LE 0)
set(PPC64 0)
set(PPC 1)
endif()

if(ARCH_ID STREQUAL "s390x")
set(S390X 1)
endif()

if(WIN32 OR ARM OR PPC64LE OR PPC64 OR PPC)
set(OPT_FLAGS_RELEASE "-O2")
else()
Expand All @@ -168,6 +172,27 @@ else()
message(STATUS "Building without build tag")
endif()

if(NOT MANUAL_SUBMODULES)
find_package(Git)
if(GIT_FOUND)
function (check_submodule relative_path)
execute_process(COMMAND git rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${relative_path} OUTPUT_VARIABLE localHead)
execute_process(COMMAND git rev-parse "HEAD:${relative_path}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE checkedHead)
string(COMPARE EQUAL "${localHead}" "${checkedHead}" upToDate)
if (upToDate)
message(STATUS "Submodule '${relative_path}' is up-to-date")
else()
message(FATAL_ERROR "Submodule '${relative_path}' is not up-to-date. Please update with\ngit submodule update --init --force ${relative_path}\nor run cmake with -DMANUAL_SUBMODULES=1")
endif()
endfunction ()

message(STATUS "Checking submodules")
check_submodule(external/miniupnp)
check_submodule(external/unbound)
check_submodule(external/rapidjson)
endif()
endif()

set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}")

Expand Down Expand Up @@ -402,6 +427,8 @@ if (UNIX AND NOT APPLE)
# Note that at the time of this writing the -Wstrict-prototypes flag added below will make this fail
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
add_c_flag_if_supported(-pthread CMAKE_C_FLAGS)
add_cxx_flag_if_supported(-pthread CMAKE_CXX_FLAGS)
endif()

# Handle OpenSSL, used for sha256sum on binary updates and light wallet ssl http
Expand Down Expand Up @@ -436,11 +463,7 @@ add_definition_if_function_found(strptime HAVE_STRPTIME)
add_definitions(-DAUTO_INITIALIZE_EASYLOGGINGPP)

# Generate header for embedded translations
include(ExternalProject)
ExternalProject_Add(generate_translations_header
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
INSTALL_COMMAND cmake -E echo "")
add_subdirectory(translations)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")

add_subdirectory(external)
Expand Down Expand Up @@ -502,7 +525,52 @@ else()
set(ARCH_FLAG "-march=armv8")
else()
set(ARCH_FLAG "-march=${ARCH}")
if(ARCH STREQUAL "native")
check_c_compiler_flag(-march=native CC_SUPPORTS_MARCH_NATIVE)
if (NOT CC_SUPPORTS_MARCH_NATIVE)
check_c_compiler_flag(-mtune=native CC_SUPPORTS_MTUNE_NATIVE)
if (CC_SUPPORTS_MTUNE_NATIVE)
set(ARCH_FLAG "-mtune=${ARCH}")
else()
set(ARCH_FLAG "")
endif()
endif()
endif()
endif()

option(NO_AES "Explicitly disable AES support" ${NO_AES})

if(NO_AES)
message(STATUS "AES support explicitly disabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES")
elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT S390X)
message(STATUS "AES support enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
elseif(PPC64LE OR PPC64 OR PPC)
message(STATUS "AES support not available on POWER")
elseif(S390X)
message(STATUS "AES support not available on s390x")
elseif(ARM6)
message(STATUS "AES support not available on ARMv6")
elseif(ARM7)
message(STATUS "AES support not available on ARMv7")
elseif(ARM8)
CHECK_CXX_ACCEPTS_FLAG("-march=${ARCH}+crypto" ARCH_PLUS_CRYPTO)
if(ARCH_PLUS_CRYPTO)
message(STATUS "Crypto extensions enabled for ARMv8")
set(ARCH_FLAG "-march=${ARCH}+crypto")
else()
message(STATUS "Crypto extensions unavailable on your ARMv8 device")
endif()
else()
message(STATUS "AES support disabled")
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_FLAG}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}")

set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized")
if(NOT MINGW)
set(WARNINGS_AS_ERRORS_FLAG "-Werror")
Expand Down Expand Up @@ -574,6 +642,17 @@ else()
add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS)
endif()

# New in GCC 8.2
if (NOT WIN32)
add_c_flag_if_supported(-fcf-protection=full C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-fcf-protection=full CXX_SECURITY_FLAGS)
add_c_flag_if_supported(-fstack-clash-protection C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-fstack-clash-protection CXX_SECURITY_FLAGS)
endif()

add_c_flag_if_supported(-mmitigate-rop C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-mmitigate-rop CXX_SECURITY_FLAGS)

# linker
if (NOT WIN32)
# Windows binaries die on startup with PIE
Expand Down Expand Up @@ -602,36 +681,8 @@ else()
message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}")
message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")

option(NO_AES "Explicitly disable AES support" ${NO_AES})

if(NO_AES)
message(STATUS "AES support explicitly disabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES")
elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC)
message(STATUS "AES support enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
elseif(PPC64LE OR PPC64 OR PPC)
message(STATUS "AES support not available on POWER")
elseif(ARM6)
message(STATUS "AES support not available on ARMv6")
elseif(ARM7)
message(STATUS "AES support not available on ARMv7")
elseif(ARM8)
CHECK_CXX_ACCEPTS_FLAG("-march=${ARCH}+crypto" ARCH_PLUS_CRYPTO)
if(ARCH_PLUS_CRYPTO)
message(STATUS "Crypto extensions enabled for ARMv8")
set(ARCH_FLAG "-march=${ARCH}+crypto")
else()
message(STATUS "Crypto extensions unavailable on your ARMv8 device")
endif()
else()
message(STATUS "AES support disabled")
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} ${COVERAGE_FLAGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} ${COVERAGE_FLAGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${COVERAGE_FLAGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${COVERAGE_FLAGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS}")

# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
Expand Down Expand Up @@ -736,6 +787,9 @@ else()
set(DEBUG_FLAGS "${DEBUG_FLAGS} -O0 ")
endif()

# At least some CLANGs default to not enough for monero
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=900")

if(NOT DEFINED USE_LTO_DEFAULT)
set(USE_LTO_DEFAULT false)
endif()
Expand Down Expand Up @@ -816,8 +870,8 @@ endif()
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
if(MINGW)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32)
set(ICU_LIBRARIES ${Boost_LOCALE_LIBRARY} icuio icuin icuuc icudt icutu iconv)
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
elseif(APPLE OR OPENBSD OR ANDROID)
set(EXTRA_LIBRARIES "")
elseif(FREEBSD)
Expand Down Expand Up @@ -849,10 +903,13 @@ endif()

if(ANDROID)
set(ATOMIC libatomic.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=user-defined-warnings")
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AND NOT FREEBSD)
find_library(ATOMIC atomic)
list(APPEND EXTRA_LIBRARIES ${ATOMIC})
if (ATOMIC_FOUND)
list(APPEND EXTRA_LIBRARIES ${ATOMIC})
endif()
endif()

find_path(ZMQ_INCLUDE_PATH zmq.hpp)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing to Monero

A good way to help is to test, and report bugs. See
[How to Report Bugs Effectively (by Simon Tatham)](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html)
[How to Report Bugs Effectively (by Simon Tatham)](https://www.chiark.greenend.org.uk/~sgtatham/bugs.html)
if you want to help that way. Testing is invaluable in making a piece
of software solid and usable.

Expand Down
88 changes: 72 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,30 @@ RUN set -ex && \
curl \
libtool-bin \
autoconf \
automake
automake \
bzip2 \
xsltproc \
gperf

WORKDIR /usr/local

#Cmake
ARG CMAKE_VERSION=3.13.0
ARG CMAKE_VERSION_DOT=v3.13
ARG CMAKE_HASH=4058b2f1a53c026564e8936698d56c3b352d90df067b195cb749a97a3d273c90
RUN set -ex \
&& curl -s -O https://cmake.org/files/${CMAKE_VERSION_DOT}/cmake-${CMAKE_VERSION}.tar.gz \
&& echo "${CMAKE_HASH} cmake-${CMAKE_VERSION}.tar.gz" | sha256sum -c \
&& tar -xzf cmake-${CMAKE_VERSION}.tar.gz \
&& cd cmake-${CMAKE_VERSION} \
&& ./configure \
&& make \
&& make install

## Boost
ARG BOOST_VERSION=1_66_0
ARG BOOST_VERSION_DOT=1.66.0
ARG BOOST_HASH=5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9
ARG BOOST_VERSION=1_68_0
ARG BOOST_VERSION_DOT=1.68.0
ARG BOOST_HASH=7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7
RUN set -ex \
&& curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \
&& echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \
Expand All @@ -35,21 +51,22 @@ RUN set -ex \
ENV BOOST_ROOT /usr/local/boost_${BOOST_VERSION}

# OpenSSL
ARG OPENSSL_VERSION=1.0.2n
ARG OPENSSL_HASH=370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe
ARG OPENSSL_VERSION=1.1.0j
ARG OPENSSL_HASH=31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246
RUN set -ex \
&& curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
&& echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \
&& tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \
&& cd openssl-${OPENSSL_VERSION} \
&& ./Configure linux-x86_64 no-shared --static -fPIC \
&& make build_crypto build_ssl \
&& make build_generated \
&& make libcrypto.a \
&& make install
ENV OPENSSL_ROOT_DIR=/usr/local/openssl-${OPENSSL_VERSION}

# ZMQ
ARG ZMQ_VERSION=v4.2.3
ARG ZMQ_HASH=3226b8ebddd9c6c738ba42986822c26418a49afb
ARG ZMQ_VERSION=v4.2.5
ARG ZMQ_HASH=d062edd8c142384792955796329baf1e5a3377cd
RUN set -ex \
&& git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \
&& cd libzmq \
Expand All @@ -61,9 +78,10 @@ RUN set -ex \
&& ldconfig

# zmq.hpp
ARG CPPZMQ_HASH=6aa3ab686e916cb0e62df7fa7d12e0b13ae9fae6
ARG CPPZMQ_VERSION=v4.3.0
ARG CPPZMQ_HASH=213da0b04ae3b4d846c9abc46bab87f86bfb9cf4
RUN set -ex \
&& git clone https://github.com/zeromq/cppzmq.git -b ${ZMQ_VERSION} \
&& git clone https://github.com/zeromq/cppzmq.git -b ${CPPZMQ_VERSION} \
&& cd cppzmq \
&& test `git rev-parse HEAD` = ${CPPZMQ_HASH} || exit 1 \
&& mv *.hpp /usr/local/include
Expand Down Expand Up @@ -93,11 +111,49 @@ RUN set -ex \
&& make check \
&& make install

# Udev
ARG UDEV_VERSION=v3.2.6
ARG UDEV_HASH=0c35b136c08d64064efa55087c54364608e65ed6
RUN set -ex \
&& git clone https://github.com/gentoo/eudev -b ${UDEV_VERSION} \
&& cd eudev \
&& test `git rev-parse HEAD` = ${UDEV_HASH} || exit 1 \
&& ./autogen.sh \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared \
&& make \
&& make install

# Libusb
ARG USB_VERSION=v1.0.22
ARG USB_HASH=0034b2afdcdb1614e78edaa2a9e22d5936aeae5d
RUN set -ex \
&& git clone https://github.com/libusb/libusb.git -b ${USB_VERSION} \
&& cd libusb \
&& test `git rev-parse HEAD` = ${USB_HASH} || exit 1 \
&& ./autogen.sh \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --disable-shared \
&& make \
&& make install

# Hidapi
ARG HIDAPI_VERSION=hidapi-0.8.0-rc1
ARG HIDAPI_HASH=40cf516139b5b61e30d9403a48db23d8f915f52c
RUN set -ex \
&& git clone https://github.com/signal11/hidapi -b ${HIDAPI_VERSION} \
&& cd hidapi \
&& test `git rev-parse HEAD` = ${HIDAPI_HASH} || exit 1 \
&& ./bootstrap \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --enable-static --disable-shared \
&& make \
&& make install

WORKDIR /src
COPY . .

ENV USE_SINGLE_BUILDDIR=1
ARG NPROC
RUN set -ex && \
git submodule init && git submodule update && \
rm -rf build && \
if [ -z "$NPROC" ] ; \
then make -j$(nproc) release-static ; \
Expand All @@ -112,18 +168,18 @@ RUN set -ex && \
apt-get --no-install-recommends --yes install ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt

COPY --from=builder /src/build/release/bin/* /usr/local/bin/
COPY --from=builder /src/build/release/bin /usr/local/bin/

# Contains the blockchain
VOLUME /root/.bitmonero
VOLUME /root/.aeon

# Generate your wallet via accessing the container and run:
# cd /wallet
# monero-wallet-cli
# aeon-wallet-cli
VOLUME /wallet

EXPOSE 11180
EXPOSE 11181

ENTRYPOINT ["monerod", "--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=11180", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=11181", "--non-interactive", "--confirm-external-bind"]
ENTRYPOINT ["aeond", "--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=11180", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=11181", "--non-interactive", "--confirm-external-bind"]

Loading