unzip redis-6.2.10.zip
cd redis-6.2.10
make 

When the “ make ”command is executed, it prompts,------------‘can not be used when making a PIE object; recompile with -fPIE ‘

Comment From: yossigo

@liang-hiwin Can you provide more information about your platform - OS type and version, compiler, etc?

Comment From: liang-hiwin

@liang-hiwin Can you provide more information about your platform - OS type and version, compiler, etc?

root@debian:~# cat /proc/version
Linux version 6.1.0-x64v1-xanmod1 (root@mascote) (gcc-12 (Debian 12.2.0-9) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39) #0~20221213.629e4bb9 SMP PREEMPT_DYNAMIC Tue Dec 13 11:05:44 UTC

root@debian:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

root@debian:~# gcc --version
gcc (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.


Comment From: slavak

FWIW I tried and failed to reproduce this using the gcc:12-bullseye container.

Of course this was with gcc 12.2.0 and kernel 5.15.0-60, so not an exact comparison.

Comment From: liang-hiwin

FWIW I tried and failed to reproduce this using the gcc:12-bullseye container.

Of course this was with gcc 12.2.0 and kernel 5.15.0-60, so not an exact comparison.

redis-7.0.11 still prompts this problem

Comment From: liang-hiwin

I modified the makefile and added -no-pie in front of -fsanitize to complete the compilation perfectly

Comment From: liang-hiwin

Makefile.zip