Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FreeBSD] Build failed: ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC: defined in cmake-proxies/pffft/libpffft.a(pffft.c.o) #6327

Closed
VVD opened this issue Apr 22, 2024 · 0 comments · Fixed by #6331
Labels
bug An error, undesired behaviour, or missed functionality

Comments

@VVD
Copy link

VVD commented Apr 22, 2024

Bug description

Build error last release 3.5.0 on FreeBSD 13.3-p1 amd64.

Steps to reproduce

  1. Build from sources

Expected behavior

  1. Build without errors

Actual behavior

Build failed with error:

FAILED: Release/lib/audacity/lib-time-and-pitch.so
: && /usr/bin/c++ -fPIC -O2 -pipe -march=core2 -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -march=core2 -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG  -fstack-protector-strong -shared -Wl,-soname,lib-time-and-pitch.so -o Release/lib/audacity/lib-time-and-pitch.so libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/StaffPad/FourierTransform_pffft.cpp.o libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/StaffPad/TimeAndPitch.cpp.o libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/AudioContainer.cpp.o libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/DummyFormantShifterLogger.cpp.o libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/FormantShifter.cpp.o libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/FormantShifterLogger.cpp.o libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/StaffPadTimeAndPitch.cpp.o libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/TimeAndPitchExperimentalSettings.cpp.o libraries/lib-time-and-pitch/CMakeFiles/lib-time-and-pitch.dir/TimeAndPitchInterface.cpp.o  -Wl,-rpath,"\$ORIGIN:/tmp/work/usr/ports/audio/audacity/work/.build/Release/lib/audacity:/usr/local/lib:"  Release/lib/audacity/lib-files.so  cmake-proxies/pffft/libpffft.a  Release/lib/audacity/lib-exceptions.so  Release/lib/audacity/lib-preferences.so  Release/lib/audacity/lib-basic-ui.so  Release/lib/audacity/lib-components.so  Release/lib/audacity/lib-utility.so  Release/lib/audacity/lib-strings.so  -L/usr/local/lib  -pthread  /usr/local/lib/libwx_baseu-3.2.so  /usr/local/lib/libwx_gtk3u_core-3.2.so  /usr/local/lib/libwx_gtk3u_html-3.2.so  /usr/local/lib/libwx_gtk3u_qa-3.2.so  /usr/local/lib/libwx_baseu_xml-3.2.so  /usr/local/lib/libwx_baseu_net-3.2.so  -lz  -lpthread && cd /tmp/work/usr/ports/audio/audacity/work/.build/libraries/lib-time-and-pitch && strip -x /tmp/work/usr/ports/audio/audacity/work/.build/Release/lib/audacity/lib-time-and-pitch.so
ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(validate_pffft_simd) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32S cannot be used against symbol 'cffti1_ps.ntryh'; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(cffti1_ps) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(cfftf1_ps) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32S cannot be used against symbol 'rffti1_ps.ntryh'; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(pffft_new_setup) in archive cmake-proxies/pffft/libpffft.a

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 pffft.c
>>>               pffft.c.o:(pffft_transform_internal) in archive cmake-proxies/pffft/libpffft.a

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 pffft.c
>>>               pffft.c.o:(pffft_transform_internal) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(rfftf1_ps) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(rfftb1_ps) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(.rodata+0x0) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(.rodata+0x8) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(.rodata+0x10) in archive cmake-proxies/pffft/libpffft.a

ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC
>>> defined in cmake-proxies/pffft/libpffft.a(pffft.c.o)
>>> referenced by pffft.c
>>>               pffft.c.o:(.rodata+0x18) in archive cmake-proxies/pffft/libpffft.a

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

Audacity Version

other

Operating system

Other

Additional context

Patch:

--- cmake-proxies/pffft/CMakeLists.txt.orig     2024-04-22 10:09:55 UTC
+++ cmake-proxies/pffft/CMakeLists.txt
@@ -13,3 +13,4 @@ set(INCLUDES
 set_target_properties( ${TARGET} PROPERTIES FOLDER "lib-src" )
 target_sources( ${TARGET} PRIVATE ${SOURCES} )
 target_include_directories( ${TARGET} PUBLIC ${INCLUDES} )
+set_property(TARGET ${TARGET} PROPERTY POSITION_INDEPENDENT_CODE ON)
@VVD VVD added the bug An error, undesired behaviour, or missed functionality label Apr 22, 2024
@VVD VVD changed the title [FreeBSD] Build failed: [FreeBSD] Build failed: ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC: defined in cmake-proxies/pffft/libpffft.a(pffft.c.o) Apr 22, 2024
crsib added a commit to crsib/audacity that referenced this issue Apr 23, 2024
@crsib crsib mentioned this issue Apr 23, 2024
6 tasks
@crsib crsib linked a pull request Apr 23, 2024 that will close this issue
6 tasks
crsib added a commit that referenced this issue Apr 23, 2024
Based on patches provided in #6326, #6327, #6328, #6329
@VVD VVD closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error, undesired behaviour, or missed functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant