Closed twoertwein closed 4 years ago
Hello,
I tried building again libselinux
on an up-to-date Arch Linux system and it worked. So I need more information in order to reproduce and debug your issue.
CFLAGS="-march=native -O2 -pipe -fstack-protector-strong -fno-plt -pie -I../include
Option -pie
seems to be the one wreaking havoc here. It would likely explain this precise error:
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
... because if I remember correctly, -pie
is an option specific to executable programs (shared libraries are compiled with -shared -fPIC
but not -pie
). Did you change your makepkg
configuration in order to include this option? Does removing it from your configuration fix the issue?
Thanks
oh yes, I added -pie
in the makepkg configuration. I'm sorry, I forgot about that.
makepkg fails to build libselinux