From bf0bc08b6e6292c3c83a15ebefc5c2481b6ab579 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 26 Jun 2017 11:29:33 +0200 Subject: [PATCH] Remove -fPIE option. "PIE" option is for executable and we don't build a executable. Using a combination of "pie", "pic", shared and static libraries makes the compilation of `kiwix-lib` fails with a "undefined symbol main". Removing the pie option solve the problem. --- kiwix-build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiwix-build.py b/kiwix-build.py index 98e96d0..6068de8 100755 --- a/kiwix-build.py +++ b/kiwix-build.py @@ -708,7 +708,7 @@ class android_ndk(Toolchain): env['PKG_CONFIG_LIBDIR'] = pj(self.root_path, 'lib', 'pkgconfig') env['CFLAGS'] = '-fPIC -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 --sysroot={} '.format(self.root_path) + env['CFLAGS'] env['CXXFLAGS'] = '-fPIC -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 --sysroot={} '.format(self.root_path) + env['CXXFLAGS'] - env['LDFLAGS'] = ' -fPIE -pie --sysroot={} '.format(self.root_path) + env['LDFLAGS'] + env['LDFLAGS'] = '--sysroot={} '.format(self.root_path) + env['LDFLAGS'] #env['CFLAGS'] = ' -fPIC -D_FILE_OFFSET_BITS=64 -O3 '+env['CFLAGS'] #env['CXXFLAGS'] = (' -D__OPTIMIZE__ -fno-strict-aliasing ' # ' -DU_HAVE_NL_LANGINFO_CODESET=0 '