Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Feb 2021 20:10:58 +0900
From:      =?UTF-8?B?SGlyb28gT25vICjlsI/ph47lr5vnlJ8p?= <hiroo.ono+freebsd@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   dns/libbind not compiled with -fPIC
Message-ID:  <CANtk6SiuYPrv9Z1eSgkC6WVAJ3PrFJ4%2BSrmWWeX1n1u=VpiA6g@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

I am planning to update mail/enma. When I try to link dns/libbind
instead of dns/ldns,
it emits following error:
libtool: link: cc -shared  -fPIC -DPIC  -Wl,--whole-archive base/.libs/libsauth_
base.a resolver/.libs/libsauth_resolver.a spf/.libs/libsauth_spf.a dkim/.libs/li
bsauth_dkim.a dmarc/.libs/libsauth_dmarc.a -Wl,--no-whole-archive  -L/usr/lib -L
/usr/local/lib -lpthread -lmilter -lbind -lcrypto  -O2
-fstack-protector-strong -Wl,-rpath -Wl,/usr/lib:/usr/local/lib
-fstack-protector-strong   -Wl,-soname -Wl,libsauth.so.0 -o
.libs/libsauth.so.0.0.0
ld: error: relocation R_X86_64_PC32 cannot be used against symbol
__stack_chk_guard; recompile with -fPIC
>>> defined in /lib/libc.so.7
>>> referenced by inet_addr.c
>>>               inet_addr.o:(__inet_addr) in archive /usr/local/lib/libbind.a

ld: error: relocation R_X86_64_PC32 cannot be used against symbol
__stack_chk_guard; recompile with -fPIC

Adding CFLAGS+= -fPIC to dns/libbind/Makefile seems to make libbind linkable,
but is this change reasonable?  Is the relocation R_X86_64_PC32 intended or not?

By the way, enma seems to be renamed to yenma: https://github.com/iij/yenma/
Should the port also be renamed?
----
Hiroo Ono



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANtk6SiuYPrv9Z1eSgkC6WVAJ3PrFJ4%2BSrmWWeX1n1u=VpiA6g>