Subj : Compiling htick To : Wilfred van Velzen From : Michael Dukelsky Date : Sat Dec 05 2020 21:47:38 Hello Wilfred, Thursday December 03 2020, Wilfred van Velzen wrote to Developers: WV> FYI: I had to make 1 change to the CMakeLists.txt file for huskylib to WV> be able to compile htick on my new system: WV> ====================================================================== WV> ===== diff --git a/CMakeLists.txt b/CMakeLists.txt index WV> df5c00e..b0fbe1e 100644 -+- a/CMakeLists.txt WV> +++ b/CMakeLists.txt WV> @@ -36,6 +36,7 @@ if (MSVC) WV> ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CONSOLE WV> -D_CRT_SECURE_NO_WARNINGS) else () WV> ADD_DEFINITIONS(-Wall -DUNIX) WV> + ADD_DEFINITIONS(-fPIC) WV> endif (MSVC) WV> message("-------------------------") WV> ====================================================================== WV> ===== WV> Otherwise I get linker errors when compiling smapi (and probably the WV> other modules too): WV> ====================================================================== WV> ===== WV> ... WV> [ 87%] Building C object CMakeFiles/smapi.dir/src/sq_write.c.o WV> [ 93%] Building C object CMakeFiles/smapi.dir/src/structrw.c.o WV> [100%] Linking C shared library libsmapi.so ^^^^^^^^^^^ WV> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/l WV> d: /usr/local/lib64/libhusky.a(cvtdate.c.o): relocation R_X86_64_32S ^^^^^^^^^^ I forwarded your message to Alexander Skovpen who wrote CMakeLists.txt for htick. He answered that you tried to link shared (i.e. dynamic) library libsmapi.so to the static library libhusky.a. This was incorrect. Either you build everything statically or you build everything dynamically. Michael .... node (at) f1042 (dot) ru --- GoldED+/LNX 1.1.5-b20170303 * Origin: Moscow, Russia (2:5020/1042) .