Hi All,
FYI: I had to make 1 change to the CMakeLists.txt file for huskylib to be able
to compile htick on my new system:
===========================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index df5c00e..b0fbe1e 100644
-+- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,7 @@ if (MSVC)
ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
else ()
ADD_DEFINITIONS(-Wall -DUNIX)
+ ADD_DEFINITIONS(-fPIC)
endif (MSVC)
message("-------------------------")
===========================================================================
Otherwise I get linker errors when compiling smapi (and probably the other
modules too):
===========================================================================
...
[ 87%] Building C object CMakeFiles/smapi.dir/src/sq_write.c.o
[ 93%] Building C object CMakeFiles/smapi.dir/src/structrw.c.o
[100%] Linking C shared library libsmapi.so
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/local/lib64/libhusky.a(cvtdate.c.o): relocation R_X86_64_32S against
symbol `months_ab' can not be used when making a shared object; recompile with
-fPIC
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/local/lib64/libhusky.a(memory.c.o): relocation R_X86_64_32 against
`.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/local/lib64/libhusky.a(strext.c.o): relocation R_X86_64_32 against
`.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/local/lib64/libhusky.a(log.c.o): relocation R_X86_64_32 against `.rodata'
can not be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/local/lib64/libhusky.a(xstr.c.o): relocation R_X86_64_32 against `.rodata'
can not be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/local/lib64/libhusky.a(ftnaddr.c.o): warning: relocation against
`free@@GLIBC_2.2.5' in read-only section `.text'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/smapi.dir/build.make:312: libsmapi.so.2.5.0] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:93: CMakeFiles/smapi.dir/all] Error 2
gmake: *** [Makefile:169: all] Error 2
===========================================================================
Bye, Wilfred.
--- FMail-lnx64 2.1.0.18-B20170815
* Origin: FMail development HQ (2:280/464)
|