libheif
libheif copied to clipboard
Failed to make with pie
./configure CXXFLAGS='-fopenmp -g -O2 -Wl,-z,relro,-z,now -fPIC -fPIE -pie -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2' --enable-shared --disable-static
The -pie option has been added, and the compilation will fail.
The error msg is:
/usr/lib64/libc_nonshared.a(elf-init.oS): In function __libc_csu_init': (.text+0x14): undefined reference to
__init_array_start'
/usr/bin/ld: /usr/lib64/libc_nonshared.a(elf-init.oS): relocation R_X86_64_PC32 against undefined hidden symbol `__init_array_start' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libheif.la] Error 1
Has anyone encountered?
The autoconf / configure approach is no longer supported. I just tried adding -pie
and -fPIE -pie
as build options via CMAKE_CXX_FLAGS
and it compiled OK and the tests run.
Does that meet your needs?