hahaXD / psdd

7 stars 7 forks source link

-no-pie for linux #1

Closed wenzhe-li closed 4 years ago

wenzhe-li commented 4 years ago

When I am building the project, there will be some error messages such as: psdd/lib/linux/libsdd.a(interface.c.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC Please consider to add set(CMAKE_CXX_FLAGS "-no-pie") to fix this : )

hahaXD commented 4 years ago

Thanks for the advice! Before manually adding this flag in the CMakeList.txt, I was wondering whether the line set(CMAKE_POSITION_INDEPENDENT_CODE FALSE) will equivalently add the flag -no-pie ?

wenzhe-li commented 4 years ago

I have a try and it seems not work for my system.

hahaXD commented 4 years ago

I see. I have updated the CMakeList.txt as you have suggested. Thank you so much for trying the library and suggesting the fix! :-)