aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-06-18Add readline support to clijethro1-0/+13
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-05-17shared libs build (i.e. make debug)stoffu1-0/+2
2017-04-12Fix ARM64 identificationhyc1-1/+2
The actual arch flag the compiler recognizes is "armv8-a". This is true for both gcc and clang.
2017-04-11Merge pull request #1950Riccardo Spagni1-6/+10
f5bd3465 IOS CMAKE build settings (Jaquee) d8a88d05 add IOS CMAKE toolchain (Jaquee)
2017-04-10update easylogging++ to latest upstreammoneromooo-monero1-2/+3
2017-04-03IOS CMAKE build settingsJaquee1-6/+10
2017-03-20set USE_LTO_DEFAULT to falseChristoph Schnerch1-1/+1
2017-03-08Problem: misleading information about LMDB storageGareth1-2/+2
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-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-21cmakify opensslRiccardo Spagni1-0/+17
2017-02-20Optionally query moneropulse DNS records to check for updatesmoneromooo-monero1-0/+8
It just checks and prints a message if there is a new version for now.
2017-02-12Merge pull request #1700Riccardo Spagni1-2/+4
73785263 backtrace_symbols() requires -lexecinfo on dragonflybsd (Dan Miller)
2017-02-09backtrace_symbols() requires -lexecinfo on dragonflybsdDan Miller1-2/+4
freebsd also needs -lexecinfo for backtrace()
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-0/+1
2017-02-05cmake set atomic for androidMoroccanMalinois1-0/+3
2017-02-04Use easylogging++'s stack trace facility where possiblemoneromooo-monero1-7/+13
This avoids using libunwind, which often causes trouble.
2017-01-16Change logging to easylogging++moneromooo-monero1-1/+1
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-15Merge pull request #1561Riccardo Spagni1-1/+0
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-15enable clang checks that were disabledChris Vickio1-1/+0
2017-01-09Change logic of testing for libunwind on OSX and ARMNanoAkron1-4/+9
2017-01-08Merge pull request #1510Riccardo Spagni1-2/+16
80abc3bc Build wallet with Android NDK (MoroccanMalinois)
2017-01-05Build wallet with Android NDKMoroccanMalinois1-2/+16
2016-12-23Silence CMake policy warning on macos.Randi Joseph1-0/+3
See: https://cmake.org/cmake/help/v3.0/policy/CMP0042.html
2016-12-15Preliminary support for DragonFly BSDAntonio Huete Jimenez1-5/+11
- It builds but no further testing has been done.
2016-12-09Revert forcing -fPIC for all ARMv8 buildsNanoAkron1-1/+0
2016-11-12Always compile Position Independent Code on 64-bit ARMv8 systemsNanoAkron1-7/+6
2016-10-27Report Boost library version during compilationNanoAkron1-0/+2
2016-09-26Merge pull request #1105Riccardo Spagni1-5/+0
344e96c remove check for certain clang versions (Dan Miller) b73bed2 Don't define stdc++ on FreeBSD (Dan Miller)
2016-09-21remove check for certain clang versionsDan Miller1-5/+0
2016-09-19Don't define stdc++ on FreeBSDDan Miller1-1/+1
2016-09-18Fix test for 'ARM_ID' as caught by @radfish in #1088NanoAkron1-3/+3
2016-09-18fix conflictRiccardo Spagni1-4/+22
2016-09-18Merge pull request #1094Riccardo Spagni1-2/+14
06bb692 cmake: support BUILD_SHARED_LIBS built-in option (redfish) e1c7af3 cmake: transitive deps and remove deprecated LINK_* (redfish) 54010b9 crypto: armv7: slow-hash: remove redundant source include (redfish)
2016-09-18cmake: support BUILD_SHARED_LIBS built-in optionredfish1-2/+14
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.
2016-09-18+crypto for ARMv8 now tests and modifies ${ARCH$NanoAkron1-12/+3
2016-09-18Updated +crypto option for ARMv8 to modify ${ARCH} insteadNanoAkron1-11/+26
2016-09-17Add +crypto flag for ARMv8-aNanoAkron1-2/+6
2016-09-17cmake: quotes around ARCH_ID stringredfish1-3/+3
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.
2016-09-17cmake: remove redundant checks around CMAKE_{AR,RANLIB}redfish1-10/+4
Those are always set, no point in checking. #1065
2016-09-10Attempt to fix broken compilation on some systems caused by #1074iDunk54001-6/+9
2016-09-10Merge pull request #1047Riccardo Spagni1-2/+12
0f94f61 cmake: handle dists which prefix gcc binaries wth arch triplet (redfish)
2016-09-10Merge pull request #1040Riccardo Spagni1-1/+5
77fa663 cmake: split BUILD_GUI_DEPS option into two (redfish)
2016-09-03change CMake project nameRiccardo Spagni1-1/+1
2016-09-03cmake: split BUILD_GUI_DEPS option into tworedfish1-1/+5
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.
2016-09-03gui/libwallet_merged: libunbound is one more dependencyIlya Kitaev1-0/+4
2016-09-01cmake: option+target for profiling for coverageredfish1-4/+13
2016-08-31cmake: handle dists which prefix gcc binaries wth arch tripletredfish1-2/+12
Issue #1026
2016-08-30Add ARMv8 Handling to CMakeLists.txt - version 2NanoAkron1-11/+82
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
2016-08-28cmake: define a default build typeredfish1-0/+5
Lets 'cmake .. && make' be sufficient to build.
2016-08-28Merge pull request #997Riccardo Spagni1-36/+32
1c7d3b0 cmake: define ARM var for all ARM arch variants (redfish) 6fe543d cmake: ARM: exclude libunwind in static build (redfish) 397b720 make: remove NO_AES from arm targets (redfish) 57ca3f3 make: make the ARM release targets statically linked (redfish) 43c07a1 readme: editted install/build instructions for clarity (redfish) a0d4058 Revert "makefile: remove unnecessary ARM-specific targets" (redfish) c2bc34b Revert "Interpret x86_64 as x86-64 for architecture" (redfish) c54b9a1 cmake: don't set ARCH from CMAKE_SYSTEM_PROCESSOR (redfish)
2016-08-28Merge pull request #995Riccardo Spagni1-2/+12
94de4b0 cmake: pass -static when STATIC=ON on Windows (redfish)
2016-08-28Merge pull request #992Riccardo Spagni1-2/+2
f1ba51c remove -Wall from coverage arguments (Jacob Torrey) f017fec Build the core_tests under Travis (Jacob Torrey) e0bf02a Streamline release-test target (Jacob Torrey) baf4574 Update badge to point to monero's coveralls (Jacob Torrey) d1dc2c3 Re-enable Travis IRC notifications (Jacob Torrey) 9c71b9e Silence coveralls to prevent 4MB logs (Jacob Torrey) 65041fb Disabled libwallet_api_test until Issue #895 resolved (Jacob Torrey) a450138 Disable core_tests on Travis-CI (Jacob Torrey) 650afac Added -j2 to Makefile and clean up matrix (Jacob Torrey) 256dec0 Streamline test building target (Jacob Torrey) 14915c2 Ensure tests are built prior to testing (Jacob Torrey) fe4992b Added coverage g++ commands (Jacob Torrey) 497b24f Update .travis.yml (Jacob Torrey) 678467d Update for the current make environment (Jacob Torrey) abcac26 Fixed tab/space issue on YAML (Jacob Torrey) 7351a11 Converted to a build matrix for testing and release (Jacob Torrey) 342dbfb Prep for coveralls (Jacob Torrey)
2016-08-28remove original Cryptonote blockchain_storage blockchain formatmoneromooo-monero1-4/+0
2016-08-28cmake: define ARM var for all ARM arch variantsredfish1-12/+16
This is refactoring only. No behavior change.
2016-08-28cmake: ARM: exclude libunwind in static buildredfish1-1/+2
Else error in build with STATIC=ON: cd /home/redfish/bitmonero/build/release/src/miner && /usr/bin/cmake -E cmake_link_script CMakeFiles/simpleminer.dir/link.txt --verbose=1 /usr/bin/c++ -std=c++11 -D_GNU_SOURCE -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 -Wlogical-op -Wno-error=maybe-uninitialized -Wno-reorder -Wno-missing-field-initializers -march=armv7-a -fno-strict-aliasing -mfloat-abi=hard -DNDEBUG -O2 -flto -ffat-lto-objects -static-libgcc -static-libstdc++ -Wl,--wrap=__cxa_throw CMakeFiles/simpleminer.dir/simpleminer.cpp.o -o ../../bin/simpleminer -rdynamic -Wl,-Bstatic -lrt -Wl,-Bdynamic -ldl ../cryptonote_core/libcryptonote_core.a ../common/libcommon.a -Wl,-Bstatic -lboost_filesystem -lboost_program_options -lboost_regex -lboost_chrono -lboost_system -lboost_thread -Wl,-Bdynamic -pthread -Wl,-Bstatic -lrt -Wl,-Bdynamic -ldl ../blockchain_db/libblockchain_db.a ../cryptonote_core/libcryptonote_core.a ../blockchain_db/libblockchain_db.a ../../contrib/otshell_utils/libotshell_utils.a ../blocks/libblocks.a ../common/libcommon.a ../../external/unbound/libunbound.a -lssl -lcrypto -lunwind -Wl,-Bstatic -lboost_program_options ../crypto/libcrypto.a -lboost_date_time -lboost_serialization -lboost_filesystem ../../external/db_drivers/liblmdb/liblmdb.a -Wl,-Bdynamic -pthread -Wl,-Bstatic -lboost_chrono -lboost_system -lboost_thread -lrt -Wl,-Bdynamic -ldl /usr/bin/ld: ../../bin/simpleminer: hidden symbol `__aeabi_unwind_cpp_pr0' in /usr/lib/gcc/armv7l-unknown-linux-gnueabihf/6.1.1/libgcc_eh.a(unwind-arm.o) is referenced by DSO /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status
2016-08-28Revert "Interpret x86_64 as x86-64 for architecture"redfish1-5/+1
This reverts commit 86234921506944dddab4e2f5edf96bf747be6c73. Let's restrict ARCH to values accepted by -march to keep things clear and consistent. ARCH is -march, with only one exception: a value of "default" indicates to not pass -march at all.
2016-08-28cmake: don't set ARCH from CMAKE_SYSTEM_PROCESSORredfish1-27/+22
It is not correct to do so, because ARCH should only take values supported by the -march argument, with the exception of 'default' which denotes not passing -march at all. ARCH defines the target architecture for builds that are intended to be portable to other machines.
2016-08-27cmake: pass -static when STATIC=ON on Windowsredfish1-2/+12
This gets rid of bitmonerod.exe's dependecy on libwindpthreads-1.dll in build on Windows on x86_64 (via MSYS2 default toolchain). With this patch all DLL dependencies are on DLLs in c:\windows\system32.
2016-08-27remove -Wall from coverage argumentsJacob Torrey1-2/+2
2016-08-26Added coverage g++ commandsJacob Torrey1-2/+2
Signed-off-by: Jacob Torrey <torreyj@ainfosec.com>
2016-08-22Merge pull request #964Riccardo Spagni1-6/+2
2a2b655 Build: make boost 1.58 minimum requirement. Fixes #956 (anonimal)
2016-08-16Build: make boost 1.58 minimum requirement. Fixes #956anonimal1-6/+2
2016-08-16Build: use libstdc++ with clang < 3.7anonimal1-2/+2
2016-08-01cmake: do not pass -O2 in debug build on ARMredfish1-7/+8
Also, minor cleanup of redundant flag-setting code.
2016-07-28cmake: libatomic only needed for 32-bit Clang buildsredfish1-5/+3
2016-07-28cmake: cleanup logic that sets flags per target/subdirredfish1-32/+24
The previous logic that used a COMMON_*_FLAGS intermediate variable and then re-assigned CMAKE_*_FLAGS before including each subdirectory was confusing and ugly. This PR is the right way to do it. This commit is purely refactoring: built binaries unchanged.
2016-07-27cmake,common: flag for stack traceredfish1-18/+24
By default the flag is enabled whenever libunwind is found on the system, with the exception of static build on OSX (for which we can't install the throw hook #932 due to lack of support for --wrap in OSX ld64 linker).
2016-07-26cmake: install throw hook in OSX build tooredfish1-0/+3
This is an attempt to fix build with STATIC=ON on OSX (#932): [ 95%] Linking CXX executable ../../bin/bitmonerod Undefined symbols for architecture x86_64: "___real___cxa_throw", referenced from: ___wrap___cxa_throw in libcommon.a(stack_trace.cpp.o) ld: symbol(s) not found for architecture x86_64
2016-07-26cmake: do not install hook on throw when building testsredfish1-6/+14
This fixes build of tests with STATIC=ON, which failed with: /tmp/cc8lNtqY.ltrans12.ltrans.o: In function `boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >::rethrow() const [clone .lto_priv.41]': cc8lNtqY.ltrans12.o:(.text+0x4e): undefined reference to `__wrap___cxa_throw' The hook is implemented in libcommon, which is not linked into some of the test binaries. An alternative solution is to link all tests against libcommon, but that seems worse because it introduces a false dependency (also, I tried that and for some of the test binaries the linker still failed to pick up the symol from libcommon, strangely.)
2016-07-22cmake: do not pass -Werror when building testsredfish1-15/+22
The tests currently issue a warning that "warning: -fassociative-math disabled; other options take precedence" The associative math optimization is turned on indirectly by -Ofast. Apparently, the optimization is forced to be disabled, while compiling test harnesses generated by Google Test framework. Unfortunately, there is no -Wno-error=* flag to disable this warning (see gcc --help=warnings). An alternative to this patch is to disable the optimization explicitly with -fno-associative-math, but that seems worse. Another alternative is to not pass -Ofast for tests build, but we want the tests to be built with exact same optimization flags as the code being tested, otherwise the value of the tests is diminished. Another alternative is to remove -Werror from the entire build, but it's good to include that flag to preclude people leaving warnings. A note regarding implementation of not passing -Werror for tests: I considered filtering out -Werror from CMAKE_{C,CXX}_FLAGS but that seems to be worse because it's surprizing behavior, to those reading the code that adds -Werror. It is better to add it for when it is used and not added otherwise. I also considered relying on order, adding -Werror after inluding 'tests' subdir, but before including the other subdirs, but that also seems cryptic to the reader. So, I settled with the current solution, of explicitly setting CMAKE_{C,CXX}_FLAGS to different values before including the respective subdir. Testing done: compared compiler invocation for non-tests source files using `make VERBOSE=1` with and without this commit: the only difference is the position of -Werror. So, this commit doesn't change the binary.
2016-07-20fix atomic library to only fire off for clangRiccardo Spagni1-3/+5
2016-07-20fix duplicate clang block in cmakeRiccardo Spagni1-4/+1
2016-07-20Merge pull request #904Riccardo Spagni1-5/+12
f07f120 cmake: don't try to link with atomic on Apple (redfish) 19349d7 cmake: ARM: clang: make warning non-fatal: inline asm (redfish) f3e09f3 cmake: link with -latomic for clang (redfish) f4b35ae cmake: include -ldl via cmake built-in var (redfish) fa85cd8 common: stack trace: make clang happy with func ptrs (redfish) 4dce26b cmake: do not pass -stdlib=c++ to clang >=3.7 (redfish)
2016-07-20Merge pull request #896Riccardo Spagni1-1/+1
1e89f4f cmake: do not ignore dangerous warnings with -Wno-error (redfish)
2016-07-12cmake: don't try to link with atomic on Appleredfish1-1/+1
-latomic is necessary with Clang on Linux, but apparently, on OSX it's not found.
2016-07-10cmake: ARM: clang: make warning non-fatal: inline asmredfish1-0/+3
Clang issues a warning for some inline asm in stack_trace.cpp. This patch ieaves the warning to be displayed as a reminder to fix the code.
2016-07-10cmake: link with -latomic for clangredfish1-0/+5
otherwise clang build fails with ../cryptonote_core/libcryptonote_core.a(miner.cpp.o): In function `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' This has no effect on the gcc build. The one strange thing is that test code like std::atomic<int> x; int main() { return x; } compiles and links without errors with clang, without -latomic. This alone would suggest that this patch is unnecessary, but that is not the case. It's not clear exactly why, though. The bitmonero code is including the same header, but it must be doing something more complex than in this test code snippet that causes the failure at link time pasted above. In any case, passing -latomic fixes the problem and seems safe. .
2016-07-10cmake: include -ldl via cmake built-in varredfish1-4/+1
This does two things: 1. fixes clang build, which otherwise errors with undefined symbol 'dlsym'. 2. simplifies the cmake script, delegating to cmake to figure out platform-specific flags for linking against the dl library.
2016-07-10cmake: do not pass -stdlib=c++ to clang >=3.7redfish1-2/+4
Tested on Linux (Arch) with clang 3.7 and 3.8 i686 and ARM: if -stdlib=c++ is passed to clang, then the build errors out with <string>,<iostrea>,etc. headers not found. Simply not passing the arg fixes the problem. **NOTE**: not tested on OSX.
2016-07-09cmake: do not ignore dangerous warnings with -Wno-errorredfish1-1/+1
Shorten the list of warnings that are reported, but which are forced to NOT generate an error, via -Wno-error. Unwhitelist these: strict-aliasing, sign-compare, type-limits For example, ignoring strict-aliasing warning caused lots of wasted time diagnosing Issue #847.
2016-07-08cmake: pass -fno-strict-aliasing to fix build with GCC 6.1.1redfish1-0/+5
This patch is a temprorary workaround until aliasing is fixed in the code (Issue #847).
2016-07-06Merge pull request #877Riccardo Spagni1-8/+16
ecd0f2d makefile: remove unnecessary ARM-specific targets (redfish) c650160 cmake: disable AES on ARM (redfish) 804b1bc cmake: initialize ARCH for native builds (redfish) bb39034 cmake: remove repetitive code in handling of NO_AES (redfish)
2016-07-06Merge pull request #873Riccardo Spagni1-1/+1
d718960 remove POSIX_C_SOURCE and remove dlfcn.h for static builds (luigi1111)
2016-06-23cmake: BUILD_TESTS as option explicitly; added missed dependencyIlya Kitaev1-0/+3
2016-06-21cmake: disable AES on ARMredfish1-1/+3
On ARM, gcc fails with 'unknown argument' if passed '-maes'.
2016-06-21cmake: initialize ARCH for native buildsredfish1-1/+6
We need ARCH, because it needs to be set for ARM7, ARM6 to be initialized. Strangely, on different machines (both ARMv7, Arch), ${ARCH} var is either empty or 'native'. Handle both cases.
2016-06-21cmake: remove repetitive code in handling of NO_AESredfish1-7/+8
Minor eefactor only. No behavior or interface change in this commit.
2016-06-21remove POSIX_C_SOURCE and remove dlfcn.h for static buildsluigi11111-1/+1
The former was a faulty "fix" for gmtime_r not existing on Windows. The latter is needed only for dynamic builds, and is not included with msys2, which ends up fine because Windows is only built static at this time.
2016-06-21Merge pull request #869Riccardo Spagni1-2/+2
03e545d More fixing for Windows (iDunk) e8baa57 CMakeLists.txt: fix build for mingw (iDunk)
2016-06-20More fixing for WindowsiDunk1-1/+1
2016-06-20CMakeLists.txt: fix build for mingwiDunk1-1/+1
Fix from iDunk from IRC.
2016-06-20CMakeLists: fix build without libunwindmoneromooo-monero1-0/+1
2016-04-28Print stack trace on exceptionsmoneromooo-monero1-0/+18
if libunwind is found. Useful for debugging logs.
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero1-12/+0
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-19Print stack trace upon exceptionsmoneromooo-monero1-0/+12
Useful for debugging users' logs
2016-03-12change to LMDB as default, even on 32-bit and ARMRiccardo Spagni1-28/+19
2016-02-12cmake: Include OpenSSL libraries in static linkingwarptangent1-2/+0
2016-02-12cmake: Remove unused variablewarptangent1-1/+1
DL is empty and unused elsewhere. The intention at one point may have been to use CMAKE_DL_LIBS, but that would more likely apply in some situations involving static linking.
2016-02-12cmake: Fix unbound config compile settingswarptangent1-0/+2
This allows the OpenSSL function checks to compile in unbound's CMake configuration. Otherwise, the functions SHA256() and EVP_sha512() won't be called from libunbound as possible algorithms. They had not been compiling because static OpenSSL libraries were being used, along with lack of -ldl. The static library preference is unnecessary for the checks, so use default suffixes ordering for CMAKE_FIND_LIBRARY_SUFFIXES when building unbound. Related files: configure_checks.cmake external/unbound/validator/val_secalgo.c secalgo_ds_digest(), setup_key_digest()
2016-02-01Add make option to disable BerkeleyDBwarptangent1-2/+11
Sample use: BERKELEY_DB=0 make debug This makes development with BlockchainLMDB easier when virtual methods have changed and don't match BlockchainBDB.
2016-01-22Last fixups in the Cmake stuff and better default build instructionme0wmix1-8/+1
2016-01-21Added/corrected OpenBSD build instructions.me0wmix1-2/+1
2016-01-21OpenBSD support for Monero.me0wmix1-5/+16
2016-01-11Tweak arm6 flagsHoward Chu1-1/+1
2016-01-03ARMv7 optimization flags are too aggressiveHoward Chu1-2/+2
2016-01-02Fix release flagsHoward Chu1-2/+6
flags were being accumulated instead of being set. Win32 was getting -O2 -DNDEBUG -Ofast -DNDEBUG etc... Also for Win32, stay compatible to WinXP
2015-12-31updated copyright yearRiccardo Spagni1-1/+1
2015-12-20Also set stacksize for Win32 not on MSVCHoward Chu1-0/+1
2015-12-15Replace tabs with two spaces for consistency with rest of codebasewarptangent1-48/+48
Remove trailing whitespace in same files.
2015-10-04build: default to Berkeley DB for 32 bit and ARMmoneromooo-monero1-0/+9
2015-07-17Fixed MINGW duplicate library errors when MSYS folder cannot be found.NoodleDoodleNoodleDoodleNoodleDoodleNoo1-5/+5
*Thanks to luigi1111 for reporting.
2015-07-16Use g++ flag "-pthread" instead of "-lpthread", where preferredwarptangent1-1/+2
CMake supports this through THREADS_PREFER_PTHREAD_FLAG. Remove inclusion of pthread library in EXTRA_LIBRARIES, as the individual CMakeLists.txt files which need pthread already require it with CMAKE_THREAD_LIBS_INIT.
2015-07-16fixed ARM arch test to prevent breaking on short arch stringsRiccardo Spagni1-12/+17
2015-07-15** CHANGES ARE EXPERIMENTAL (FOR TESTING ONLY)NoodleDoodleNoodleDoodleNoodleDoodleNoo1-7/+69
Bockchain: 1. Optim: Multi-thread long-hash computation when encountering groups of blocks. 2. Optim: Cache verified txs and return result from cache instead of re-checking whenever possible. 3. Optim: Preload output-keys when encoutering groups of blocks. Sort by amount and global-index before bulk querying database and multi-thread when possible. 4. Optim: Disable double spend check on block verification, double spend is already detected when trying to add blocks. 5. Optim: Multi-thread signature computation whenever possible. 6. Patch: Disable locking (recursive mutex) on called functions from check_tx_inputs which causes slowdowns (only seems to happen on ubuntu/VMs??? Reason: TBD) 7. Optim: Removed looped full-tx hash computation when retrieving transactions from pool (???). 8. Optim: Cache difficulty/timestamps (735 blocks) for next-difficulty calculations so that only 2 db reads per new block is needed when a new block arrives (instead of 1470 reads). Berkeley-DB: 1. Fix: 32-bit data errors causing wrong output global indices and failure to send blocks to peers (etc). 2. Fix: Unable to pop blocks on reorganize due to transaction errors. 3. Patch: Large number of transaction aborts when running multi-threaded bulk queries. 4. Patch: Insufficient locks error when running full sync. 5. Patch: Incorrect db stats when returning from an immediate exit from "pop block" operation. 6. Optim: Add bulk queries to get output global indices. 7. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3) 8. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key 9. Optim: Added thread-safe buffers used when multi-threading bulk queries. 10. Optim: Added support for nosync/write_nosync options for improved performance (*see --db-sync-mode option for details) 11. Mod: Added checkpoint thread and auto-remove-logs option. 12. *Now usable on 32-bit systems like RPI2. LMDB: 1. Optim: Added custom comparison for 256-bit key tables (minor speed-up, TBD: get actual effect) 2. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3) 3. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key 4. Optim: Added support for sync/writemap options for improved performance (*see --db-sync-mode option for details) 5. Mod: Auto resize to +1GB instead of multiplier x1.5 ETC: 1. Minor optimizations for slow-hash for ARM (RPI2). Incomplete. 2. Fix: 32-bit saturation bug when computing next difficulty on large blocks. [PENDING ISSUES] 1. Berkely db has a very slow "pop-block" operation. This is very noticeable on the RPI2 as it sometimes takes > 10 MINUTES to pop a block during reorganization. This does not happen very often however, most reorgs seem to take a few seconds but it possibly depends on the number of outputs present. TBD. 2. Berkeley db, possible bug "unable to allocate memory". TBD. [NEW OPTIONS] (*Currently all enabled for testing purposes) 1. --fast-block-sync arg=[0:1] (default: 1) a. 0 = Compute long hash per block (may take a while depending on CPU) b. 1 = Skip long-hash and verify blocks based on embedded known good block hashes (faster, minimal CPU dependence) 2. --db-sync-mode arg=[[safe|fast|fastest]:[sync|async]:[nblocks_per_sync]] (default: fastest:async:1000) a. safe = fdatasync/fsync (or equivalent) per stored block. Very slow, but safest option to protect against power-out/crash conditions. b. fast/fastest = Enables asynchronous fdatasync/fsync (or equivalent). Useful for battery operated devices or STABLE systems with UPS and/or systems with battery backed write cache/solid state cache. Fast - Write meta-data but defer data flush. Fastest - Defer meta-data and data flush. Sync - Flush data after nblocks_per_sync and wait. Async - Flush data after nblocks_per_sync but do not wait for the operation to finish. 3. --prep-blocks-threads arg=[n] (default: 4 or system max threads, whichever is lower) Max number of threads to use when computing long-hash in groups. 4. --show-time-stats arg=[0:1] (default: 1) Show benchmark related time stats. 5. --db-auto-remove-logs arg=[0:1] (default: 1) For berkeley-db only. Auto remove logs if enabled. **Note: lmdb and berkeley-db have changes to the tables and are not compatible with official git head version. At the moment, you need a full resync to use this optimized version. [PERFORMANCE COMPARISON] **Some figures are approximations only. Using a baseline machine of an i7-2600K+SSD+(with full pow computation): 1. The optimized lmdb/blockhain core can process blocks up to 585K for ~1.25 hours + download time, so it usually takes 2.5 hours to sync the full chain. 2. The current head with memory can process blocks up to 585K for ~4.2 hours + download time, so it usually takes 5.5 hours to sync the full chain. 3. The current head with lmdb can process blocks up to 585K for ~32 hours + download time and usually takes 36 hours to sync the full chain. Averate procesing times (with full pow computation): lmdb-optimized: 1. tx_ave = 2.5 ms / tx 2. block_ave = 5.87 ms / block memory-official-repo: 1. tx_ave = 8.85 ms / tx 2. block_ave = 19.68 ms / block lmdb-official-repo (0f4a036437fd41a5498ee5e74e2422ea6177aa3e) 1. tx_ave = 47.8 ms / tx 2. block_ave = 64.2 ms / block **Note: The following data denotes processing times only (does not include p2p download time) lmdb-optimized processing times (with full pow computation): 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 1.25 hours processing time (--db-sync-mode=fastest:async:1000). 2. Laptop, Dual-core / 4-threads U4200 (3Mb) - 4.90 hours processing time (--db-sync-mode=fastest:async:1000). 3. Embedded, Quad-core / 4-threads Z3735F (2x1Mb) - 12.0 hours processing time (--db-sync-mode=fastest:async:1000). lmdb-optimized processing times (with per-block-checkpoint) 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 10 minutes processing time (--db-sync-mode=fastest:async:1000). berkeley-db optimized processing times (with full pow computation) 1. Desktop, Quad-core / 8-threads 2600k (8Mb) - 1.8 hours processing time (--db-sync-mode=fastest:async:1000). 2. RPI2. Improved from estimated 3 months(???) into 2.5 days (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000). berkeley-db optimized processing times (with per-block-checkpoint) 1. RPI2. 12-15 hours (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).
2015-07-09Interpret x86_64 as x86-64 for architecturemoneromooo-monero1-1/+5
2015-05-31fixed static assert testRiccardo Spagni1-1/+1
2015-05-26explicitly include libc++ with clangRiccardo Spagni1-1/+6
2015-05-13Check for Clang before adding compiler flagwarptangent1-1/+4
See eb565a1ce208c543392808559ddea709eb1c935b
2015-05-06Merge branch 'clang_fixes' into clang_fixes-masterSergey Kazenyuk1-1/+1
2015-04-20Suppress 'register storage class is deprecated' warning in boost dependency ↵Sergey Kazenyuk1-2/+2
library
2015-04-07Merge BlockchainDB into upstreamThomas Winget1-7/+58
2015-04-07Merges PR #37Thomas Winget1-1/+9
New/updated Makefile targets
2015-04-07Only compile BerkeleyDB as an option in non-staticThomas Winget1-1/+3
2015-04-06add arm6 target and flagsRiccardo Spagni1-1/+9
2015-04-01remerged; commands JSON. logging upgrade. doxygenrfree2monero1-0/+40
2015-04-01Merge remote-tracking branch 'monero-official/master' into network-1.6-work1rfree2monero1-0/+6
2015-03-25update berkeleydb branch to blockchain branchThomas Winget1-0/+6
2015-03-25Merge upstream updates into blockchain branchThomas Winget1-0/+6
2015-03-22Fixed bug in static linking boost on MINGWThomas Winget1-0/+6
There was a workaround for linking to boost at all on MINGW, but unfortunately this workaround would not correctly link to boost statically. This workaround for that workaround works around the issue that that workaround had.
2015-03-17Pull blockchain changes into berkeleydb branchThomas Winget1-4/+19
2015-03-17Move db_drivers/ to external/Thomas Winget1-3/+0
Also change LMDB Cmake variables to CACHE rather than upgrading them through several parent scopes.
2015-03-17fixed BUILD_64 optionRiccardo Spagni1-1/+1
2015-03-17fixed arch_width optionRiccardo Spagni1-3/+9
2015-03-17fixed msys2 / mingw folders based on architecture, added license to unbound ↵Riccardo Spagni1-8/+8
CMakeList as that is not part of standard Unbound
2015-03-17moved 32-bit/64-bit detection into main CMakeListsRiccardo Spagni1-0/+9
2015-03-17Revert "Moved db_drivers/ into external/ for consistency"Thomas Winget1-0/+3
This reverts commit b21335642e75b35d3b178a754f4cdb2314989cd1.
2015-03-16CMake wiring, minor cleanup, minor test additionThomas Winget1-0/+3
Make Cmake things aware of BerkeleyDB and BlockchainBDB Make the BlockchainDB unit tests aware of BlockchainBDB
2015-03-09Moved db_drivers/ into external/ for consistencyThomas Winget1-3/+0
2015-02-202014 network limit 1.1 +utils +toc -doc -drmonerorfree2monero1-15/+8
Update of the PR with network limits works very well for all speeds (but remember that low download speed can stop upload because we then slow down downloading of blockchain requests too) more debug options fixed pedantic warnings in our code should work again on Mac OS X and FreeBSD fixed warning about size_t tested on Debian, Ubuntu, Windows(testing now) TCP options and ToS (QoS) flag FIXED peer number limit FIXED some spikes in ingress/download FIXED problems when other up and down limit
2015-02-202014 network limit 1.0a +utils +toc -doc -drmonerorfree2monero1-7/+15
commands and options for network limiting works very well e.g. for 50 KiB/sec up and down ToS (QoS) flag peer number limit TODO some spikes in ingress/download TODO problems when other up and down limit added "otshell utils" - simple logging (with colors, text files channels)
2015-02-02Add compile-time support for both db implementations: in-memory and LMDBwarptangent1-0/+21
Usage: default is lmdb for blockchain branch: $ make release same as: $ DATABASE=lmdb make release for original in-memory implementation: $ DATABASE=memory make release
2015-01-30Merge upstreamwarptangent1-2/+13
Merge branch 'monero-project/master' into blockchain
2015-01-27remove aes flag, detect no sse2Riccardo Spagni1-2/+2
2015-01-27fixed AES support flagRiccardo Spagni1-4/+4
2015-01-26allow for explicitly disabling AES-NIRiccardo Spagni1-2/+13
2015-01-18Add in-source lmdb to build processThomas Winget1-1/+4
Working on Linux, needs verified for other platforms but should be fine.
2015-01-04build: add liblmdb to the cmake autodetection systemmoneromooo-monero1-2/+2
update for rebase (warptangent 2015-01-04) src/cryptonote_core/CMakeLists.txt (edit) - replace LMDB_LIBRARIES with LMDB_LIBRARY set from autodetection
2015-01-04BlockchainDB unit tests, lmdb linker flagThomas Winget1-0/+3
Some BlockchainDB unit testing fleshed out (and working), rudimentary linker flag for lmdb in CMakeLists, but should probably be done "correctly" at some point (find it on whatever system you're building on and all that jazz). update for rebase (warptangent 2015-01-04) fix conflicts with upstream CMakeLists.txt files tests/CMakeLists.txt (remove edits from original commit)
2015-01-02year updated in licenseRiccardo Spagni1-2/+2
2014-12-01moved rapidjson to external folder, fixed CMakeRiccardo Spagni1-1/+3
2014-12-01Merge pull request #1Riccardo Spagni1-0/+1
f1eaf88 Prints seed after wallet upgrade. Removed iostream include. (Oran Juice) 70971be Doxygen comments (Oran Juice) 031ca23 Rewrites to old wallet file correctly (Oran Juice) 1f833dc Doxygen comments in (Oran Juice) 0bd88ff Writes seed language while generating wallet. Wallet open fix. (Oran Juice) 09a659e Stores seed language in wallet file. added rapidjson. Yet to test backward compatibility (Oran Juice)
2014-12-01don't build tests unless we're building all-* or *-test buildsRiccardo Spagni1-1/+4
2014-11-18cmake: work around a bug with implicit link directoriesBen Boeckel1-0/+8
Unfortunately, this is necessary because CMake doesn't detect whether mingw libraries are static or shared and doesn't put a -static flag around the -lfoo argument which then makes the shared library be linked to.
2014-11-17msys: don't use LTOBen Boeckel1-0/+2
This causes duplicate symbol errors on msys' mingw install.
2014-11-17msys: factor out -Werror on msysBen Boeckel1-1/+4
There are Windows-related warnings turned into errors here.
2014-11-17msys: look in msys' directory for filesBen Boeckel1-0/+5
This tells find_path and find_library to look under this directory first which is what we want on msys2.
2014-10-24cmake: support 2.8.7Ben Boeckel1-1/+1
Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer versions prefer PUBLIC and PRIVATE instead, but still support the LINK_ prefix.
2014-10-23cmake: clean up EXTRA_LIBRARIESBen Boeckel1-3/+1
pthread is handled by CMAKE_THREAD_LIBS_INIT while libdl isn't needed.
2014-10-23cmake: set the project nameBen Boeckel1-0/+2
2014-10-23cmake: prepend to CMAKE_MODULE_PATHBen Boeckel1-1/+2
2014-10-23unbound: import cmake build systemBen Boeckel1-0/+1
2014-10-23cmake: minor cleanups (indentation and typos)Ben Boeckel1-15/+15
2014-10-23cmake: use option() for STATICBen Boeckel1-1/+1
2014-10-23cmake: clean up if auto-dereferencingBen Boeckel1-3/+3
CMake will auto-dereference variable names in if statements, so there's no need to dereference them manually.
2014-10-23cmake: support git info in released tarballsBen Boeckel1-11/+1
2014-10-23cmake: fix up BOOST_IGNORE_SYSTEM_PATHSBen Boeckel1-2/+1
The option was set twice when it only needs to be set once. Also fix a bogus dereference and spurious whitespace.
2014-10-23cmake: remove configuration variablesBen Boeckel1-1/+0
CMAKE_BUILD_TYPE is meant for single-config build tools (e.g., make and ninja) while CMAKE_CONFIGURATION_TYPES is meant for multi-config build tools (e.g., Xcode and Visual Studio). They should not be mixed or manually set.
2014-10-23cmake: factor out error messagesBen Boeckel1-7/+14
Instead of using BoldRed and ColourReset everywhere, wrap it up in a function.
2014-10-18Stores seed language in wallet file. added rapidjson. Yet to test backward ↵Oran Juice1-0/+1
compatibility
2014-10-06mingw library tweaksRiccardo Spagni1-4/+1
2014-10-06fix for mingw not playing nicely with libunbound configure, fix for ↵Riccardo Spagni1-4/+9
correctly finding static libs on various operating systems
2014-10-06need to link with -ldl on Linux when building staticallyRiccardo Spagni1-0/+1
2014-10-06quieten CMake when it can't find packagesRiccardo Spagni1-1/+1
2014-10-06enforce static libraries when building staticallyRiccardo Spagni1-0/+8
2014-10-06build libunbound from external if no local libunbound or for static buildsRiccardo Spagni1-12/+11
2014-09-29dependencies enforced, send que error message log level movedRiccardo Spagni1-3/+16
2014-09-24never use the baked-in miniupnpc on FreeBSD because explosionsRiccardo Spagni1-2/+0
2014-09-24redo FindUnbound.cmakeRiccardo Spagni1-0/+4
2014-09-23Fixed artifacts from cherry-picking devel->masterThomas Winget1-1/+2
2014-09-23Fixed CMake search for libunboundThomas Winget1-5/+2
As it turns out, some of CMake's built-in modules for detecting headers and libraries don't work if you have certain compiler flags set, such as -Werror=old-style-definition, as they do "int main()" rather than "int main(void)". Having CMake search for libs before compiler flags are set alleviates this issue, and I believe the underlying issue will be fixed in future releases of CMake.
2014-09-23Updated CMake files -- added libunbound linker flagThomas Winget1-0/+5
CMake config file written, but was unable to test/get it working properly because of a bug in CMake with functions related to find_package. Simple "-lunbound" flag used in its stead for now. May not build on non-Linux systems, not sure yet.
2014-09-22moved msys2 toolchain, boost libs fixRiccardo Spagni1-0/+4
2014-09-22added mikezackles' missing boost function in CMakeListsRiccardo Spagni1-0/+15
2014-09-15turns out we do need -static-libgcc etc. on LinuxRiccardo Spagni1-1/+1
2014-09-15explicitly disable LTO for ClangRiccardo Spagni1-1/+5
2014-09-15Use LTO by defaultZachary Michaels1-1/+4
The mingw toolchains override this for now.
2014-09-15User setting to turn LTO on and offZachary Michaels1-9/+13
This isn't currently working on mingw
2014-09-15Remove unnecessary elseZachary Michaels1-2/+0
2014-09-15Hack to add pthread to link libraries on mingwZachary Michaels1-2/+2
This should link winpthreads. We really shouldn't be passing these this way, but that seems to be the existing solution, and it works for now.
2014-09-15Change to -static gcc flagZachary Michaels1-1/+1
2014-09-15Set the boost thread api for mingwZachary Michaels1-0/+1
2014-09-15Hack to allow toolchains to pass flags to mingwZachary Michaels1-1/+1
2014-09-15Ignore another warning to make mingw happyZachary Michaels1-1/+1
2014-09-15Remove unused CMake functionZachary Michaels1-6/+0
2014-09-15Default to static linking on both MSVC and MINGWZachary Michaels1-1/+6
2014-09-15FreeBSD static linking fixesRiccardo Spagni1-3/+3
2014-09-12versioning now includes the commit hash, or -final for tagged releasesRiccardo Spagni1-19/+7
2014-09-12always check git diffRiccardo Spagni1-6/+1
2014-09-11added license to CMakefluffypony1-0/+30
2014-09-11more CMake tweaks to allow detection on OS Xfluffypony1-8/+9