[Bug 286911] databases/redis: not WITH_PIE safe

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 18 May 2025 17:26:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286911

            Bug ID: 286911
           Summary: databases/redis: not WITH_PIE safe
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: yasu@freebsd.org
          Reporter: netchild@FreeBSD.org
             Flags: maintainer-feedback?(yasu@freebsd.org)
          Assignee: yasu@freebsd.org

8.0.1 does not build when "WITH_PIE=yes" is used in make.conf. Excluding it
(WITHOUT_PIE_PORTS=databases/redis) makes it build.

Something inside the redis does not pick-up the necessary CFLAGS it seems (I
see the used in a lot of places, but at least the fastfloat part seems to have
issues):
cc  -lpthread -lm -lexecinfo  -Wl,-znow -pie -Wl,-zrelro
-fstack-protector-strong  -pthread  -o redis-benchmark ae.o anet.o
redis-benchmark.o adlist.o dict.o zmalloc.o redisassert.o release.o crcspeed.o
crccombine.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o
strl.o ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a
../deps/jemalloc/lib/libjemalloc.a -lm -lstdc++
../deps/hiredis/libhiredis_ssl.a -lssl -lcrypto 
cc  -lpthread -lm -lexecinfo  -Wl,-znow -pie -Wl,-zrelro
-fstack-protector-strong  -pthread  -o redis-server threads_mngr.o adlist.o
quicklist.o ae.o anet.o dict.o ebuckets.o eventnotifier.o iothread.o mstr.o
kvstore.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o
ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o
t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o
debug.o sort.o intset.o syncio.o cluster.o cluster_legacy.o crc16.o
endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o
crcspeed.o crccombine.o crc64.o bitops.o sentinel.o notify.o setproctitle.o
blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o
redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o
geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o
localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o socket.o tls.o
sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o
call_reply.o script_lua.o script.o functions.o function_lua.o commands.o strl.o
connection.o unix.o logreqres.o hnsw.o vset.o ../deps/hiredis/libhiredis.a
../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a
../deps/fpconv/libfpconv.a ../deps/fast_float/libfast_float.a
../deps/jemalloc/lib/libjemalloc.a -lm -lstdc++
../deps/hiredis/libhiredis_ssl.a -lssl -lcrypto
ld: error: relocation R_X86_64_32S cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::detail::parse_infnan<double, char>(char const*, char const*, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::detail::parse_infnan<double, char>(char const*, char const*, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32 cannot be used against symbol
'fast_float::binary_format_lookup_tables<double, void>::powers_of_ten';
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(.eh_frame+0x3A2B9) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against symbol
'fast_float::binary_format_lookup_tables<double, void>::max_mantissa';
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(.eh_frame+0x3A2ED) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against symbol
'fast_float::powers_template<void>::power_of_five_128'; recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(.eh_frame+0x3A31D) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against symbol
'fast_float::powers_template<void>::power_of_five_128'; recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against symbol
'fast_float::powers_template<void>::power_of_five_128'; recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against symbol
'fast_float::powers_template<void>::power_of_five_128'; recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against symbol
'fast_float::powers_template<void>::power_of_five_128'; recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against symbol
'fast_float::powers_template<void>::power_of_five_128'; recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against symbol
'fast_float::binary_format_lookup_tables<double, void>::powers_of_ten';
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(fast_float::from_chars_result_t<char> fast_float::from_chars_advanced<double, char>(fast_float::parsed_number_string_t<char>&, double&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(void fast_float::parse_mantissa<char>(fast_float::bigint&, fast_float::parsed_number_string_t<char>&, unsigned long, unsigned long&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(void fast_float::parse_mantissa<char>(fast_float::bigint&, fast_float::parsed_number_string_t<char>&, unsigned long, unsigned long&)) in archive ../deps/fast_float/libfast_float.a

ld: error: relocation R_X86_64_32S cannot be used against local symbol;
recompile with -fPIC
>>> defined in ../deps/fast_float/libfast_float.a(fast_float_strtod.o)
>>> referenced by fast_float_strtod.cpp
>>>               fast_float_strtod.o:(void fast_float::parse_mantissa<char>(fast_float::bigint&, fast_float::parsed_number_string_t<char>&, unsigned long, unsigned long&)) in archive ../deps/fast_float/libfast_float.a

ld: error: too many errors emitted, stopping now (use --error-limit=0 to see
all errors)
cc: error: linker command failed with exit code 1 (use -v to see invocation)

-- 
You are receiving this mail because:
You are the assignee for the bug.