From 5d25eee4718dc1cbace87d6a1a496679a7700088 Mon Sep 17 00:00:00 2001 From: Chenna Keshava B S Date: Thu, 7 Jul 2022 13:58:11 -0700 Subject: [PATCH 1/3] - Update installation instructions in README file. - Describe the soci error (cause, fix) --- Builds/linux/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Builds/linux/README.md b/Builds/linux/README.md index bb5bc761827..ec910fbd181 100644 --- a/Builds/linux/README.md +++ b/Builds/linux/README.md @@ -239,3 +239,24 @@ change the `/opt/local` module path above to match your chosen installation pref `rippled` builds a set of unit tests into the server executable. To run these unit tests after building, pass the `--unittest` option to the compiled `rippled` executable. The executable will exit with summary info after running the unit tests. + +## Known Installation Issues + +*Compilation Errors pertaining to soci:* Certain compilation errors have been observed with Apple Clang 13.1.6+ and soci v4.x. soci compiles with -Werror flag which causes certain warnings to be reported as errors. These warings pertain to style and not that of correctness. Since these errors are more than 20 in number, it causes fatal termination of the cmake process. + +Please apply the below patch (courtesy of Scott Determan) to remove these errors. `.nih_c/unix_makefiles/AppleClang_13.1.6.13160021/Debug/src/soci/cmake/SociConfig.cmake` file needs to be edited. This file is an example for Mac OS and it might be slightly different for other OS/Architectures. + +``` +diff --git a/cmake/SociConfig.cmake b/cmake/SociConfig.cmake +index 97d907e4..11bcd1f3 100644 +--- a/cmake/SociConfig.cmake ++++ b/cmake/SociConfig.cmake +@@ -58,8 +58,8 @@ if (MSVC) + + else() + +- set(SOCI_GCC_CLANG_COMMON_FLAGS +- "-pedantic -Werror -Wno-error=parentheses -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Woverloaded-virtual -Wredundant-decls -Wno-long-long") ++ set(SOCI_GCC_CLANG_COMMON_FLAGS "") ++ # "-pedantic -Werror -Wno-error=parentheses -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Woverloaded-virtual -Wredundant-decls -Wno-long-long") +``` From bd31467d3b25354964f1aab70d7c889497a20c3c Mon Sep 17 00:00:00 2001 From: Chenna Keshava B S Date: Fri, 8 Jul 2022 11:36:00 -0700 Subject: [PATCH 2/3] Update Builds/linux/README.md Co-authored-by: Elliot Lee --- Builds/linux/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Builds/linux/README.md b/Builds/linux/README.md index ec910fbd181..c995da50621 100644 --- a/Builds/linux/README.md +++ b/Builds/linux/README.md @@ -240,7 +240,7 @@ change the `/opt/local` module path above to match your chosen installation pref tests after building, pass the `--unittest` option to the compiled `rippled` executable. The executable will exit with summary info after running the unit tests. -## Known Installation Issues +## Workaround for a compile error in soci *Compilation Errors pertaining to soci:* Certain compilation errors have been observed with Apple Clang 13.1.6+ and soci v4.x. soci compiles with -Werror flag which causes certain warnings to be reported as errors. These warings pertain to style and not that of correctness. Since these errors are more than 20 in number, it causes fatal termination of the cmake process. From eeb3dbb5f5c29c80979d1c3a1fb9998ef8e5d5f8 Mon Sep 17 00:00:00 2001 From: Chenna Keshava B S Date: Fri, 8 Jul 2022 11:36:21 -0700 Subject: [PATCH 3/3] include suggestions from elliot lee Co-authored-by: Elliot Lee --- Builds/linux/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Builds/linux/README.md b/Builds/linux/README.md index c995da50621..001a3705c73 100644 --- a/Builds/linux/README.md +++ b/Builds/linux/README.md @@ -242,7 +242,15 @@ executable. The executable will exit with summary info after running the unit te ## Workaround for a compile error in soci -*Compilation Errors pertaining to soci:* Certain compilation errors have been observed with Apple Clang 13.1.6+ and soci v4.x. soci compiles with -Werror flag which causes certain warnings to be reported as errors. These warings pertain to style and not that of correctness. Since these errors are more than 20 in number, it causes fatal termination of the cmake process. +Compilation errors have been observed with Apple Clang 13.1.6+ and soci v4.x. soci compiles with the `-Werror` flag which causes warnings to be treated as errors. These warnings pertain to style (not correctness). However, they cause the cmake process to fail. + +Here's an example of how this looks: +``` +.../rippled/.nih_c/unix_makefiles/AppleClang_13.1.6.13160021/Debug/src/soci/src/core/session.cpp:450:66: note: in instantiation of function template specialization 'soci::use' requested here + return prepare << backEnd_->get_column_descriptions_query(), use(table_name, "t"); + ^ +1 error generated. +``` Please apply the below patch (courtesy of Scott Determan) to remove these errors. `.nih_c/unix_makefiles/AppleClang_13.1.6.13160021/Debug/src/soci/cmake/SociConfig.cmake` file needs to be edited. This file is an example for Mac OS and it might be slightly different for other OS/Architectures.