From 3dd55bdd2a0c6d837be2065800ba9b3eb9b72378 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 18 Jul 2018 19:11:36 +0000 Subject: [PATCH 1/2] setup.py updated with correct loading path of Linux (thanks, @atait) --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 27f163a28..2ba243d95 100644 --- a/setup.py +++ b/setup.py @@ -127,7 +127,11 @@ class Config(object): # build path and the loader will fail. args = [] args += ['-Wl,-soname,' + self.libname_of(mod)] - args += ['-Wl,-rpath,$ORIGIN'] + if not '_dbpi' in mod: + loader_path = '$ORIGIN' + else: + loader_path = '$ORIGIN/..' + args += ['-Wl,-rpath,' + loader_path] return args def macros(self): From aca209c0956dae1eb3695c702a12a3570c640886 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 18 Jul 2018 21:57:47 +0200 Subject: [PATCH 2/2] Using C.UTF-8 locale fallback for string tests for vanilla Linux installations. --- src/tl/unit_tests/tlString.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tl/unit_tests/tlString.cc b/src/tl/unit_tests/tlString.cc index 93c254a04..13e2f064b 100644 --- a/src/tl/unit_tests/tlString.cc +++ b/src/tl/unit_tests/tlString.cc @@ -484,9 +484,13 @@ TEST(14) // UTF-8 to wchar_t and local conversion TEST(15) { - // NOTE: we don't know the local setting, but translation back and forth should work. std::string locale = setlocale (LC_ALL, NULL); - setlocale (LC_ALL, "en_US.UTF-8"); + const char *lc = setlocale (LC_ALL, "en_US.UTF-8"); + if (! lc || std::string (lc) != "en_US.UTF-8") { + // use C.UTF-8 as fallback + setlocale (LC_ALL, "C.UTF-8"); + } + try { EXPECT_EQ (tl::to_string_from_local (tl::to_local ("Hällo\tWörld!").c_str ()), "Hällo\tWörld!"); setlocale (LC_ALL, locale.c_str ());