Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
tested on Arch Linux RISC-V.
|
|
|
|
|
|
|
|
|
|
|
|
It's 2021, we can easily switch to C++14 without any troubles.
|
|
Co-authored-by: Jason Rhinelander <jason@imaginary.ca>
|
|
|
|
|
|
|
|
|
|
|
|
Co-authored-by: perfect-daemon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add monero_enable_coverage() for reuse in case C/CXX_FLAGS are overwritten.
|
|
|
|
|
|
|
|
There are quite a few variables in the code that are no longer
(or perhaps never were) in use. These were discovered by enabling
compiler warnings for unused variables and cleaning them up.
In most cases where the unused variables were the result
of a function call the call was left but the variable
assignment removed, unless it was obvious that it was
a simple getter with no side effects.
|
|
|
|
The cmake executable name can vary across platforms.
|
|
|
|
|
|
Can be called from the source directory with:
utils/health/clang-tidy-run.sh
|
|
monero_add_executable/monero_add_library where possible (mj-xmr)
Add monero_add_minimal_executable and use in tests
This is done in order not to have to relink targets, when just an .so changed, but not its interface.
|
|
|
|
|
|
Add two new options, MONERO_PARALLEL_COMPILE_JOBS and
MONERO_PARALLEL_LINK_JOBS to try and prevent running out of memory when
building everything.
Requires >= cmake 3.0.0, and the use of the Ninja generator.
Useful links:
* https://cmake.org/cmake/help/latest/prop_gbl/JOB_POOLS.html
* https://reviews.llvm.org/D6304
|
|
|
|
|
|
|
|
|
|
Binaries built with both crash on startup with maybe 25% probability
|
|
|
|
Update copyright year to 2020
|
|
|
|
|
|
|
|
Also, enable other hardening options that work on Windows with GCC 9.x
|
|
Support RandomX PoW algorithm
|
|
Usually it's unset, but depends toolchain files set it explicitly
for cross-compiling. Don't override preset values. But make sure
it's set for all x86 / x86_64 builds, not just Linux.
Also make sure -std=c++11 is set for Darwin builds, not all
submodules were getting it consistently before.
|
|
This reverts commit 9a95827ea72574c3e861aa3167c0b96b9bae64b3.
|
|
|
|
|
|
Needed for Ubuntu 19.04:
https://ubuntu.pkgs.org/19.04/ubuntu-universe-amd64/libnorm-dev_1.5.8+dfsg2-1_amd64.deb.html
|
|
Make readline actually compile, and make ncurses use existing terminfo data (if available).
|
|
With this change, building the iwyu target will provide information
on unused headers, which can be removed to reduce compilation times.
|
|
|
|
Based on a patch from @mrme0w (#5569). Fixes #5770
|
|
|
|
find_package(PythonInterp) needs to be called before the tests.
|
|
It was removed, but it still accepted by the compiler, which warns
for every file
|
|
Everything works better without cmake.
|
|
If you use a ; separated set of include and lib directories,
it'll detect the headers in /usr/include and the libraries
where this points to.
|
|
|
|
|
|
Boost got upgraded to 1.70.0 in MSYS2. As a result, cmake (v3.13.4 as of this commit) can not configure boost properly, and cmake configuration fails as a result. This is a workaround as per https://gitlab.kitware.com/cmake/cmake/issues/18865
|
|
|
|
Its version looks like 1.70.1 rather than 107000, so detect range
to know which type we're seeing
|
|
|
|
|
|
Enabled by setting the MONERO_USE_CNV4_JIT env var to 1
|
|
Further speedups to icu compilation, it is faster to run the
pre-generated configure scripts.
Ensure that the native protobuf installation only generates the required
libraries and binaries.
Disable qt compilation when running travis on windows. Qt is used for
lrelease, the travis recipe instead usese the a local installation of
lrelease.
Remove various packages and options from the travis recipe.
Update Readline to version 8.0. The previously used url 404'd sometimes,
use the official gnu ftp server instead.
Remove unused cmake config.
|
|
Building with docker is arguably easier and more familiar to most people
than either kvm, or lxc.
This commit also relaxes the back compat requirement a bit. 32 bit linux
now uses glibc version 2.0. Also, the docker shell could not handle gcc arguments
containing spaces, so the explicit '-DFELT_TYPE' declaration was dropped.
Lastly, this removes some packages from the osx descriptor.
|
|
To ensure that the binaries compiled by gitian run across many linux
distributions, enforce 2.17 as the minimum libc version supported.
|
|
- webusb transport based on libusb added. Provides direct access to Trezor via USB, no need for Trezor bridge.
- trezor protocol message handler improved, no recursion used. Ready for upcoming integration tests.
- libusb (for docker) bumped from v1.0.9 to v1.0.22, newer version required for webusb transport, for device enumeration.
- cmake improvements and fixes. Cmake Trezor checks are moved to a dedicated CheckTrezor.cmake file. In case of a problem Trezor is excluded from build.
- ifdefs made consistent to Ledger.
- UDP Transport enumeration disabled by default in release mode
|
|
It is an annoying piece of garbage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The cmake thread detection just ain't enough to always work
|
|
|
|
This reverts commit 79d46c4d551a9b1261801960095bf4d24967211a, reversing
changes made to c9fc61dbb56cca442c775faa2554a7460879b637.
|
|
|
|
Adds CMake check that pulls from the different git remotes and checks if
there is any output.
|
|
|
|
85318e78 build: set ARCH_FLAG before compiler/linker flag checks (xiphon)
|
|
6a781408 Make depends use self built clang for darwin (TheCharlatan)
|
|
69da14e1 fixes make debug compilation on OSX (Dusan Klinec)
|
|
The configure script in hidapi and libsodium tried to find clang in /usr/bin,
even though the correct prefix was passed in. This sets the correct CC flag.
This was previously undetected, because clang and the sdk where
installed in the global environment.
This also fixes a subsequent error, where IOKIT and CoreFoundation are
not found, again for the reason stated above.
|
|
|
|
Remove PCSC dependencies which is a bit hard (not user friendly) to install on linux and Mac
Split Ledger logic and device IO
|
|
Add a Travis build script for Monero. This was blatantly copied from
Bitcoin. It spawns jobs in docker containers running an ubuntu bionic
image.
This commit also a fixes a problem where librt was still linked, even
when compiling statically.
|
|
rebased by moneromooo
|
|
Set the architecture in the toolchain file correctly
|
|
icu tex support is not required, so just disable it.
Re-add mistakingly removed crypt32 lib.
|
|
Fixup arm toolchain file.
|
|
|
|
|
|
This includes a minimal qt build without gui
|
|
Fix builds for native linux and windows
The architecture flag was set incorrectly.
It needs to be set only when compiling arm6.
|
|
Add pcsc-lite to linux builds
Fixup windows icu4c linking with depends, the static libraries have an 's' appended to them
Compiling depends arm-linux-gnueabihf will allow you to compile armv6zk monero binaries
|
|
|
|
Introduced with GCC 8.2
|
|
|
|
|
|
|
|
Current GCC produces broken binaries with these options
|
|
This is GCC/x86/x86_64 only
|
|
|
|
Includes ~2 years worth of fixes including security and build.
Note: this pulls directly from master, not a release branch/tag. See
https://github.com/Tencent/rapidjson/issues/1265
|
|
PR3843 based on release-v0.12 => rebased on master
|
|
to little endian logic."
|
|
(cherry picked from commit a7366b5feeffaeb65b217b2d6f138e0ab1c90192)
|
|
In package mingw-w64-x86_64-icu, version 58.2-3, the names of static
library files were changed, which leads to changes in CMakeLists.txt as
needed for compiling for Windows.
|
|
|
|
The basic approach it to delegate all sensitive data (master key, secret
ephemeral key, key derivation, ....) and related operations to the device.
As device has low memory, it does not keep itself the values
(except for view/spend keys) but once computed there are encrypted (with AES
are equivalent) and return back to monero-wallet-cli. When they need to be
manipulated by the device, they are decrypted on receive.
Moreover, using the client for storing the value in encrypted form limits
the modification in the client code. Those values are transfered from one
C-structure to another one as previously.
The code modification has been done with the wishes to be open to any
other hardware wallet. To achieve that a C++ class hw::Device has been
introduced. Two initial implementations are provided: the "default", which
remaps all calls to initial Monero code, and the "Ledger", which delegates
all calls to Ledger device.
|
|
|
|
since there's no config.h here
|
|
|
|
|
|
Define generate_translations_header as an external project to be able
to use the compilation toolchain for the host instead of the toolchain
for the target.
|
|
See https://wiki.debian.org/Hardening#User_Space
|
|
|
|
|
|
If a translation file exists in a "translations" directory located in
the same directory as the binary, it is used in priority (this can be
useful when working on translations as you don't have to recompile the
whole program all the time), and if no such file is found the embedded
translation file is used (if it exists).
|
|
It's meant to avoid being optimized out
memory_cleanse lifted from bitcoin
|
|
|
|
|
|
|
|
f3e09f36 hooked a dependency on libatomic on 32 bit machines if Clang is
used because compilation failed with:
`std::__atomic_base<unsigned long long>::load(std::memory_order) const':
/usr/bin/../lib/gcc/i686-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/bits/atomic_base.h:396:
undefined reference to `__atomic_load_8'
But that does not happen on FreeBSD. The problem is likely that on Linux
Clang tries to use GCC-provided C++11 library. Further,
__atomic_load_8() (for 8-byte integers) is not readily available on 32
bit machines. From https://gcc.gnu.org/wiki/Atomic/GCCMM: "When lock
free instructions are not available (either through hardware or OS
support) atomic operations are left as function calls to be resolved by
a library."
|
|
|
|
Also, move cmake source files into cmake/ to keep them together.
|
|
Fixes compile error when building with OpenSSL v1.1:
contrib/epee/include/net/net_helper.h: In member function ‘void epee::net_utils::blocked_mode_client::shutdown_ssl()’:
contrib/epee/include/net/net_helper.h:579:106: error: ‘SSL_R_SHORT_READ’ was not declared in this scope
if (ec.category() == boost::asio::error::get_ssl_category() && ec.value() != ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ))
^
contrib/epee/include/net/net_helper.h:579:106: note: suggested alternative: ‘SSL_F_SSL_READ’
See boost/asio/ssl/error.hpp.
Boost handles differences between OpenSSL versions.
cmake: fail if Boost is too old for OpenSSL v1.1
|
|
|
|
|
|
Keep -Werror for src, contrib and do not pass it for tests/
|
|
To avoid the suprize of stack tracing being enabled
but libunwind not being linked in.
|
|
|
|
Warning issued on older boost and/or OS:
In file included from /usr/include/boost/asio/detail/socket_types.hpp:61:0,
from /usr/include/boost/asio/detail/epoll_reactor.hpp:30,
from /usr/include/boost/asio/detail/reactor.hpp:21,
from /usr/include/boost/asio/detail/impl/task_io_service.ipp:24,
from /usr/include/boost/asio/detail/task_io_service.hpp:198,
from /usr/include/boost/asio/impl/io_service.hpp:71,
from /usr/include/boost/asio/io_service.hpp:767,
from /usr/include/boost/asio/basic_io_object.hpp:19,
from /usr/include/boost/asio/basic_socket.hpp:20,
from /usr/include/boost/asio/basic_datagram_socket.hpp:20,
from /usr/include/boost/asio.hpp:21,
from /home/vagrant/slave/monero-static-alpine-3_5-x86_64/build/src/common/download.cpp:32:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
#warning redirecting incorrect #include <sys/poll.h> to <poll.h>
|
|
Setting COMPILE_FLAGS (or COMPILE_OPTIONS) property directly does not
end up on the command line (even though it should because
add_compile_options does just that).
Also, set -Werror for tests as well, because no warnings now.
Not set for 'external' only because simply moving add_compile_options
above add_subdirectory(external) doesn't do it, and moving add_usbdirectory
down is too big of a change (it will pick up new flags).
-Werror set only for GCC on Linux, since warnings not yet
cleared for other compilers/systems.
|
|
|
|
|
|
|
|
- Add some RPC commands (and touch up a couple others)
- some bounds checking
- some better pointer management
- const correctness and error handling
-- Thanks @vtnerd for type help with serialization and CMake changes
|
|
Structured {de-,}serialization methods for (many new) types
which are used for requests or responses in the RPC.
New types include RPC requests and responses, and structs which compose
types within those.
# Conflicts:
# src/cryptonote_core/blockchain.cpp
|
|
|
|
Fix wrong flags for ppc64le:
-maes - not avaiable
-march - changed by -mcpu that does the same for powerpc
|
|
This PR adds readline support to the daemon and monero-wallet-cli. Only
GNU readline is supported (e.g. not libedit) and there are cmake checks
to ensure this.
There is a cmake variable, Readline_ROOT_DIR that can specify a
directory to find readline, otherwise some default paths are searched.
There is also a cmake option, USE_READLINE, that defaults to ON. If set
to ON, if readline is not found, the build continues but without
readline support.
One negative side effect of using readline is that the color prompt in
the wallet-cli now has no color and just uses terminal default. I know
how to fix this but it's quite a big change so will tackle another time.
|
|
|
|
The actual arch flag the compiler recognizes is "armv8-a".
This is true for both gcc and clang.
|
|
|
|
|
|
|
|
Solution: updated the comments to reflect the current situation in terms of LMDB implementation and no longer recommend 'memory' for blockchain storage in production use.
|
|
|
|
|
|
It just checks and prints a message if there is a new version
for now.
|
|
freebsd also needs -lexecinfo for backtrace()
|
|
|
|
|
|
This avoids using libunwind, which often causes trouble.
|
|
This replaces the epee and data_loggers logging systems with
a single one, and also adds filename:line and explicit severity
levels. Categories may be defined, and logging severity set
by category (or set of categories). epee style 0-4 log level
maps to a sensible severity configuration. Log files now also
rotate when reaching 100 MB.
To select which logs to output, use the MONERO_LOGS environment
variable, with a comma separated list of categories (globs are
supported), with their requested severity level after a colon.
If a log matches more than one such setting, the last one in
the configuration string applies. A few examples:
This one is (mostly) silent, only outputting fatal errors:
MONERO_LOGS=*:FATAL
This one is very verbose:
MONERO_LOGS=*:TRACE
This one is totally silent (logwise):
MONERO_LOGS=""
This one outputs all errors and warnings, except for the
"verify" category, which prints just fatal errors (the verify
category is used for logs about incoming transactions and
blocks, and it is expected that some/many will fail to verify,
hence we don't want the spam):
MONERO_LOGS=*:WARNING,verify:FATAL
Log levels are, in decreasing order of priority:
FATAL, ERROR, WARNING, INFO, DEBUG, TRACE
Subcategories may be added using prefixes and globs. This
example will output net.p2p logs at the TRACE level, but all
other net* logs only at INFO:
MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE
Logs which are intended for the user (which Monero was using
a lot through epee, but really isn't a nice way to go things)
should use the "global" category. There are a few helper macros
for using this category, eg: MGINFO("this shows up by default")
or MGINFO_RED("this is red"), to try to keep a similar look
and feel for now.
Existing epee log macros still exist, and map to the new log
levels, but since they're used as a "user facing" UI element
as much as a logging system, they often don't map well to log
severities (ie, a log level 0 log may be an error, or may be
something we want the user to see, such as an important info).
In those cases, I tried to use the new macros. In other cases,
I left the existing macros in. When modifying logs, it is
probably best to switch to the new macros with explicit levels.
The --log-level options and set_log commands now also accept
category settings, in addition to the epee style log levels.
|
|
|
|
|
|
|
|
See: https://cmake.org/cmake/help/v3.0/policy/CMP0042.html
|
|
- It builds but no further testing has been done.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Support building internal libraries as shared. This reduces
development time by eliminating the need to re-link all
binaries every time non-interface code in the library changes.
Instead, can hack on libxyz, then `make libxyz`, and re-run
monerod.
By default BUILD_SHARED_LIBS is OFF in release build type,
and ON in debug build type, but can be overriden with -D.
|
|
|
|
|
|
|
|
It's only blank only if somebody running cmake in MSYS/MinGW (Windows)
manually forgets to add -D ARCH, but when it is blank, without quotes
those lines are invalid cmake syntax.
|
|
Those are always set, no point in checking. #1065
|
|
|
|
|
|
The split is to make this software more packageable. 'make install'
is used by the package building scripts, and should not be installing
vendored dependencies onto the system.
|
|
|
|
|
|
Issue #1026
|
|
Adds 64-bit ARMv8 handling to CMakeLists.txt and implements GCC flags for two errata on the Cortex-A53 present on every chip in revision 0:
https://developer.arm.com/docs/epm048406/latest/arm-processor-cortex-a53-mpcore-product-revision-r0-software-developers-errata-notice
835769 affects 64-bit multiply accumulate
843419 affects internal page addressing
Rewritten to build on @radfish's changes
Updated to address @radfish's points
|
|
Lets 'cmake .. && make' be sufficient to build.
|
|
|
|
This is refactoring only. No behavior change.
|