summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-09-23 10:00:18 +0200
committerCarl Hetherington <cth@carlh.net>2022-09-23 10:51:51 +0200
commite389f9980249f51ed98564ffff208b67c3bcfbe2 (patch)
tree1acfddc3caab72bba80931a45476e0c227932800
parent95bee93b21a23a79733b14b1f48c8ab3aca708ab (diff)
Work around strange build error on Ubuntu 18.04
tmp/cc4JuI65.s: Assembler messages: /tmp/cc4JuI65.s:174: Error: symbol `_ZNSt14_Function_base13_Base_managerIUlNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE_E10_M_managerERSt9_Any_dataRKS9_St18_Manager_operation' is already defined
-rw-r--r--src/lib/create_cli.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/create_cli.cc b/src/lib/create_cli.cc
index a6e13c8bc..107311d59 100644
--- a/src/lib/create_cli.cc
+++ b/src/lib/create_cli.cc
@@ -176,6 +176,10 @@ CreateCLI::CreateCLI (int argc, char* argv[])
claimed = true;
}
+ std::function<optional<string> (string s)> string_to_string = [](string s) {
+ return s;
+ };
+
std::function<optional<boost::filesystem::path> (string s)> string_to_path = [](string s) {
return boost::filesystem::path(s);
};
@@ -212,7 +216,10 @@ CreateCLI::CreateCLI (int argc, char* argv[])
argument_option(i, argc, argv, "", "--channel", &claimed, &error, &channel, convert_channel);
argument_option(i, argc, argv, "", "--gain", &claimed, &error, &gain);
argument_option(i, argc, argv, "", "--kdm", &claimed, &error, &kdm, string_to_path);
- argument_option(i, argc, argv, "", "--cpl", &claimed, &error, &cpl);
+ /* It shouldn't be necessary to use this string_to_string here, but using the other argument_option()
+ * causes an odd compile error on Ubuntu 18.04.
+ */
+ argument_option(i, argc, argv, "", "--cpl", &claimed, &error, &cpl, string_to_string);
if (!claimed) {
if (a.length() > 2 && a.substr(0, 2) == "--") {