Commit graph

345 commits

Author SHA1 Message Date
TheCharlatan
ecaf5b3feb Add libsodium to the packages, the arm build was complaining about it.
Fixup arm toolchain file.
2018-09-17 16:09:50 +02:00
Riccardo Spagni
9f24e57dc2
Merge pull request #4326
bcda7adc NetBSD support (thomasvaughan)
2018-09-14 13:02:58 +02:00
Riccardo Spagni
466f079586
Merge pull request #4232
9e6c7784 CMakeLists.txt: add -mmitigate-rop to security flags if found (moneromooo-monero)
2018-09-14 12:39:17 +02:00
thomasvaughan
bcda7adcd4 NetBSD support 2018-09-11 14:32:33 +00:00
TheCharlatan
cbbf4d241b Adapt translations to upstream changes 2018-09-10 22:18:18 +02:00
TheCharlatan
f0ba19fde5 Add lrelease to the depends
This includes a minimal qt build without gui
2018-09-10 22:08:05 +02:00
TheCharlatan
5f7da005a3 Unbound is now a submodule. Adapt depends for this.
Fix builds for native linux and windows

The architecture flag was set incorrectly.
It needs to be set only when compiling arm6.
2018-09-10 22:05:37 +02:00
TheCharlatan
56b6e41ea7 Add support for apple and arm building
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
2018-09-10 22:05:36 +02:00
TheCharlatan
29311fd140 Disable stack unwinding for mingw32 depends build. 2018-09-10 22:03:42 +02:00
moneromooo-monero
347bba9dd1
CMakeLists.txt: detect -fcf-protection=full and -fstack-clash-protection
Introduced with GCC 8.2
2018-09-09 11:53:42 +00:00
luigi1111
fad88e18a9
Merge pull request #4290
2bc977b CMakeLists.txt: disable -fstack-protector* on windows
2018-09-04 18:12:52 -05:00
luigi1111
6cc1ed8dc1
Merge pull request #4295
ce63d56 Windows: fix undefined references after unbound submodule update (iDunk5400)
2018-09-04 13:28:52 -05:00
iDunk5400
ce63d5634e
Windows: fix undefined references after unbound submodule update 2018-08-23 11:17:42 +02:00
MoroccanMalinois
fa814af969
Build: Fix target release-static-android 2018-08-21 23:25:14 +00:00
MoroccanMalinois
620105ecaf
Translations: handle cross compiling 2018-08-21 23:22:33 +00:00
iDunk5400
2bc977bab9
CMakeLists.txt: disable -fstack-protector* on windows
Current GCC produces broken binaries with these options
2018-08-21 22:41:35 +00:00
moneromooo-monero
9e6c7784ea
CMakeLists.txt: add -mmitigate-rop to security flags if found
This is GCC/x86/x86_64 only
2018-08-07 13:05:52 +00:00
luigi1111
61f3916b4a
Merge pull request #3844
bdf5a3a Fix PCSC compilation under windows (cslashm)
f17383a Fix CMAKE config for PCSC in order to avoid msys DLL dependencies (cslashm)
2018-06-19 12:49:30 -05:00
luigi1111
1db8cf0db9
Merge pull request #3835
d44d19c Fixed for compilation in big endian PPC. (nioroso-x3)
2018-06-19 12:46:39 -05:00
luigi1111
112f3678bc
Merge pull request #3887
14f0d38 Incorporate Window debug build targets (philkode)
2018-06-08 14:34:01 -05:00
philkode
14f0d38cd6
Incorporate Window debug build targets 2018-05-31 10:49:24 +01:00
anonimal
8a6c081df7
rapidjson: remove outdated in-tree, use submodule
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
2018-05-25 04:50:20 +00:00
cslashm
bdf5a3ad3f Fix PCSC compilation under windows
PR3843 based on release-v0.12 => rebased on master
2018-05-23 10:22:55 +02:00
Judemir Ribeiro
d44d19ca79 Fixed for compilation in big endian PPC. "Everything is broken thought due to little endian logic." 2018-05-19 18:03:59 -04:00
anonimal
6b85398031
Build: update CMake and p2p for in-tree miniupnp
(cherry picked from commit a7366b5feeffaeb65b217b2d6f138e0ab1c90192)
2018-04-21 09:43:23 +00:00
rbrunner7
733deab249 Adjust to the MSYS2/MinGW static ICU library file renaming
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.
2018-03-08 19:10:44 +01:00
Riccardo Spagni
237f0179b7
Merge pull request #3313
43026822 Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows (rbrunner7)
2018-03-05 19:15:54 +02:00
Edward Betts
fbcc91c2a4 Correct spelling mistakes. 2018-03-05 17:00:40 +00:00
cslashm
e745c1e38d Code modifications to integrate Ledger HW device into monero-wallet-cli.
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.
2018-03-04 12:54:53 +01:00
rbrunner7
430268224d Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows 2018-02-25 12:57:58 +01:00
Riccardo Spagni
172b7824d1
Merge pull request #3195
9017084a cmake: add -DHAVE_ defines to the command line (moneromooo-monero)
2018-02-16 14:20:46 +01:00
moneromooo-monero
9017084a7b
cmake: add -DHAVE_ defines to the command line
since there's no config.h here
2018-01-28 08:57:51 +00:00
xmr-eric
18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero
b7e5a70bb1
epee: detect strptime, use std::get_time as fallback 2018-01-11 21:41:07 +00:00
Riccardo Spagni
d5dad4f0a2
Merge pull request #3062
f035478d Fix translations header generation when cross-compilating (Guillaume LE VAILLANT)
2018-01-10 11:55:46 +01:00
Riccardo Spagni
397a9f0656
Merge pull request #3007
0281f634 cmake: fix boost version detection (moneromooo-monero)
2018-01-10 11:55:00 +01:00
Riccardo Spagni
d08aee7a7e
Merge pull request #2993
776b44f1 Add misc hardening flags to the cmake machinery (moneromooo-monero)
2018-01-10 11:53:26 +01:00
Guillaume LE VAILLANT
f035478d35 Fix translations header generation when cross-compilating
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.
2018-01-04 11:36:29 +01:00
Riccardo Spagni
dd11bfb89c
Merge pull request #2934
db2bc965 Embed the translation files in the binary (Guillaume LE VAILLANT)
2018-01-02 00:28:45 +02:00
moneromooo-monero
776b44f17b
Add misc hardening flags to the cmake machinery
See https://wiki.debian.org/Hardening#User_Space
2017-12-31 14:26:12 +00:00
moneromooo-monero
0281f63486
cmake: fix boost version detection 2017-12-26 12:09:54 +00:00
moneromooo-monero
1a379ef656
fuzz_testing: build with ASAN (assumed to be available) 2017-12-23 11:27:34 +00:00
Guillaume LE VAILLANT
db2bc96512 Embed the translation files in the binary
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).
2017-12-15 18:44:01 +01:00
moneromooo-monero
000666ff78
add a memwipe function
It's meant to avoid being optimized out

memory_cleanse lifted from bitcoin
2017-11-27 22:15:34 +00:00
Riccardo Spagni
7ae7e5ef93
Merge pull request #2793
3501ed1f Do not require libatomic on FreeBSD (Vasil Dimov)
2017-11-25 19:48:12 +02:00
Riccardo Spagni
edebe4e3b6
Merge pull request #2736
0d9c0db9 Do not build against epee_readline if it was not built (Howard Chu)
178014c9 split off readline code into epee_readline (moneromooo-monero)
a9e14a19 link against readline only for monerod and wallet-wallet-{rpc,cli} (moneromooo-monero)
437421ce wallet: move some scoped_message_writer calls from the libs (moneromooo-monero)
e89994e9 wallet: rejig to avoid prompting in wallet2 (moneromooo-monero)
ec5135e5 move input_line from command_line to simplewallet (moneromooo-monero)
082db75f move cryptonote command line options to cryptonote_core (moneromooo-monero)
2017-11-14 21:31:51 +02:00
Howard Chu
0d9c0db996
Do not build against epee_readline if it was not built 2017-11-14 17:06:37 +00:00
moneromooo-monero
a9e14a19dc
link against readline only for monerod and wallet-wallet-{rpc,cli} 2017-11-14 17:06:32 +00:00
Pavel Maryanov
a17efcb039
make this build on SunOS/Solaris 2017-11-14 17:03:48 +00:00
Vasil Dimov
3501ed1fdf
Do not require libatomic on FreeBSD
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."
2017-11-11 15:29:42 +02:00
Riccardo Spagni
af448d3883
Merge pull request #2694
11e0deef cmake: add dep of version lib on version.cpp (redfish)
35340259 .gitignore: do not ignore cmake source files (redfish)
2017-11-09 18:22:25 +02:00
Riccardo Spagni
ef3c77117a
Merge pull request #2689
6a90506a Link against libpgm/libnorm if found, optional libzmq ldependencies (moneromooo-monero)
2017-11-01 11:26:22 +02:00
moneromooo-monero
6a90506a8d
Link against libpgm/libnorm if found, optional libzmq ldependencies 2017-10-21 08:39:52 +01:00
redfish
11e0deef31 cmake: add dep of version lib on version.cpp
Also, move cmake source files into cmake/ to keep them together.
2017-10-20 22:07:34 -04:00
redfish
29497f7920 epee: use boost type for SSL error code
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
2017-10-17 16:12:58 -04:00
Riccardo Spagni
845afb5191
Merge pull request #2613
2051f89f cmake: build tests last (redfish)
2017-10-15 18:58:31 +02:00
Riccardo Spagni
62d2a55719
Merge pull request #2600
885c773a cmake: print which stack trace lib is used (redfish)
2017-10-15 18:49:11 +02:00
Riccardo Spagni
1740f0a13e
Merge pull request #2583
27fdaaa4 Fix building with -DARCH=default -DNO_AES=ON (moneromooo-monero)
2017-10-15 18:37:14 +02:00
Jaquee
1cf940f2a1 epee http_client SSL support 2017-10-15 17:29:04 +02:00
Jaquee
eec1013785 CMakeLists.txt - Add openssl include dir 2017-10-15 17:25:26 +02:00
redfish
2051f89fbe cmake: build tests last
Keep -Werror for src, contrib and do not pass it for tests/
2017-10-08 20:47:50 -04:00
redfish
885c773af3 cmake: print which stack trace lib is used
To avoid the suprize of stack tracing being enabled
but libunwind not being linked in.
2017-10-07 12:13:31 -04:00
moneromooo-monero
27fdaaa409
Fix building with -DARCH=default -DNO_AES=ON 2017-10-06 08:47:03 +01:00
Riccardo Spagni
031f486e12
Merge pull request #2486
8b1acc9a Fix OpenSSL 1.1 detection for static builds (hyc)
2017-09-25 20:25:29 +02:00
Riccardo Spagni
7b8398eed7
Merge pull request #2485
a3691ae3 daemon: fix static building with libzmq (iDunk5400)
2017-09-25 20:25:10 +02:00
Riccardo Spagni
b911130a46
Merge pull request #2442
e29282d2 build: auto update version info without manually deleting version.h (stoffu)
2017-09-25 16:50:35 +02:00
redfish
504311128d cmake: make warning about headers not fatal
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>
2017-09-24 11:25:16 -04:00
redfish
0a70ba2c01 cmake: fix setting of -Werror
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.
2017-09-24 11:25:11 -04:00
iDunk5400
a3691ae31c
daemon: fix static building with libzmq 2017-09-23 12:34:02 +02:00
stoffu
e29282d208
build: auto update version info without manually deleting version.h 2017-09-21 07:47:37 +09:00
hyc
8b1acc9a86 Fix OpenSSL 1.1 detection for static builds 2017-09-20 01:38:43 +01:00
Thomas Winget
0299cb77ca
Fix various oversights/bugs in ZMQ RPC server code
- 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
2017-09-05 12:20:40 -04:00
Thomas Winget
77986023c3
json serialization for rpc-relevant monero types
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
2017-09-05 12:20:27 -04:00
Jaquee
f233c01c8f CMakeLists.txt - ios/xcode fix 2017-08-05 19:21:10 +02:00
Roberto Oliveira
44bfe6048b enable monero build on ppc64le architecture
Fix wrong flags for ppc64le:
-maes - not avaiable
-march - changed by -mcpu that does the same for powerpc
2017-06-27 17:06:19 +00:00
jethro
e1f3dfccc8 Add readline support to cli
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.
2017-06-18 10:08:37 -04:00
stoffu
dd8e3266b2
shared libs build (i.e. make debug) 2017-05-17 10:17:08 +09:00
hyc
e65d66fe04 Fix ARM64 identification
The actual arch flag the compiler recognizes is "armv8-a".
This is true for both gcc and clang.
2017-04-12 23:54:33 +01:00
Riccardo Spagni
e9ca165b1a
Merge pull request #1950
f5bd3465 IOS CMAKE build settings (Jaquee)
d8a88d05 add IOS CMAKE toolchain (Jaquee)
2017-04-11 00:26:15 +02:00
moneromooo-monero
a8ac4f0a70
update easylogging++ to latest upstream 2017-04-10 21:05:02 +01:00
Jaquee
f5bd346573
IOS CMAKE build settings 2017-04-03 18:38:50 +02:00
Christoph Schnerch
33f3cfdec0 set USE_LTO_DEFAULT to false 2017-03-20 13:24:30 +01:00
Gareth
088930facc Problem: misleading information about LMDB storage
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.
2017-03-08 21:29:08 +08:00
Riccardo Spagni
c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
Riccardo Spagni
058eed369b
cmakify openssl 2017-02-21 17:11:12 +02:00
moneromooo-monero
f640512c53
Optionally query moneropulse DNS records to check for updates
It just checks and prints a message if there is a new version
for now.
2017-02-20 22:58:16 +00:00
Riccardo Spagni
c64e10c2d7
Merge pull request #1700
73785263 backtrace_symbols() requires -lexecinfo on dragonflybsd (Dan Miller)
2017-02-12 23:20:27 +02:00
Dan Miller
7378526393 backtrace_symbols() requires -lexecinfo on dragonflybsd
freebsd also needs -lexecinfo for backtrace()
2017-02-09 11:22:12 -08:00
kenshi84
8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
MoroccanMalinois
c833a39a4d cmake set atomic for android 2017-02-05 04:33:33 +01:00
moneromooo-monero
cd34fc655d
Use easylogging++'s stack trace facility where possible
This avoids using libunwind, which often causes trouble.
2017-02-04 12:33:03 +00:00
moneromooo-monero
5833d66f65
Change logging to easylogging++
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.
2017-01-16 00:25:46 +00:00
Riccardo Spagni
ec323d8c3f
Merge pull request #1561
d561f4ad enable clang checks that were disabled (Chris Vickio)
0aefb2f6 remove std::move from return statements (pessimizing-move warning) (Chris Vickio)
629d5b76 change counter from bool to int (deprecated-increment-bool warning) (Chris Vickio)
fb76d439 add extra braces around subobjects (missing-braces warning) (Chris Vickio)
3b6d5f25 make struct/class declarations consistent (mismatched-tags warning) (Chris Vickio)
fcf66925 remove unused fields from network_throttle (unused-private-field warning) (Chris Vickio)
296f8c16 inline unused function (for unused-function warning) (Chris Vickio)
2017-01-15 19:01:08 -05:00
Chris Vickio
d561f4ad92 enable clang checks that were disabled 2017-01-15 19:23:33 +03:00
NanoAkron
e68ea86cc4
Change logic of testing for libunwind on OSX and ARM 2017-01-09 16:39:44 +00:00
Riccardo Spagni
2a996f492f
Merge pull request #1510
80abc3bc Build wallet with Android NDK (MoroccanMalinois)
2017-01-08 16:40:02 -08:00
MoroccanMalinois
80abc3bc4a Build wallet with Android NDK 2017-01-05 01:11:05 +00:00
Randi Joseph
52db01ea6d Silence CMake policy warning on macos.
See: https://cmake.org/cmake/help/v3.0/policy/CMP0042.html
2016-12-23 02:54:34 -05:00
Antonio Huete Jimenez
b00da61eab Preliminary support for DragonFly BSD
- It builds but no further testing has been done.
2016-12-15 02:27:53 -08:00
NanoAkron
b9c5f29d1d
Revert forcing -fPIC for all ARMv8 builds 2016-12-09 12:01:16 +00:00