PopcornFX / O3DEPopcornFXPlugin

PopcornFX plugin for O3DE
https://www.popcornfx.com/
Other
13 stars 12 forks source link

Linux linking errors in debug config #55

Closed SelfishOlex closed 1 year ago

SelfishOlex commented 1 year ago

Note: profile builds are good but debug builds are not.

cmake --build build --target AssetBundlerBatch --config debug

Results in the following linking errors in debug builds:

/usr/bin/ld: /home/olex/.o3de/3rdParty/packages/PopcornFX-2.15.4-O3DE-linux/PopcornFX/Runtime/bin/O3DE/gmake_linux_x64/libPK-Runtime_d.a(callstack_symbol_unix.o): in function `PopcornFX::CBFD::CBFD()':
/data/data0/popcorn-buildbot/worker/worker/builddir/full-rebuild/source_tree/projects/O3DE_linux/../../Runtime/pk_kernel/layer_0/kr_callstack/callstack_symbol_unix.cpp:126: undefined reference to `bfd_init'
/usr/bin/ld: /home/olex/.o3de/3rdParty/packages/PopcornFX-2.15.4-O3DE-linux/PopcornFX/Runtime/bin/O3DE/gmake_linux_x64/libPK-Runtime_d.a(callstack_symbol_unix.o): in function `PopcornFX::CBFD::Close()':
/data/data0/popcorn-buildbot/worker/worker/builddir/full-rebuild/source_tree/projects/O3DE_linux/../../Runtime/pk_kernel/layer_0/kr_callstack/callstack_symbol_unix.cpp:143: undefined reference to `bfd_close'
/usr/bin/ld: /home/olex/.o3de/3rdParty/packages/PopcornFX-2.15.4-O3DE-linux/PopcornFX/Runtime/bin/O3DE/gmake_linux_x64/libPK-Runtime_d.a(callstack_symbol_unix.o): in function `PopcornFX::CBFD::Open(char const*, void*)':
/data/data0/popcorn-buildbot/worker/worker/builddir/full-rebuild/source_tree/projects/O3DE_linux/../../Runtime/pk_kernel/layer_0/kr_callstack/callstack_symbol_unix.cpp:156: undefined reference to `bfd_openr'
/usr/bin/ld: /data/data0/popcorn-buildbot/worker/worker/builddir/full-rebuild/source_tree/projects/O3DE_linux/../../Runtime/pk_kernel/layer_0/kr_callstack/callstack_symbol_unix.cpp:164: undefined reference to `bfd_check_format'
/usr/bin/ld: /home/olex/.o3de/3rdParty/packages/PopcornFX-2.15.4-O3DE-linux/PopcornFX/Runtime/bin/O3DE/gmake_linux_x64/libPK-Runtime_d.a(callstack_symbol_unix.o): in function `PopcornFX::CBFD::TranslateAddressFile(void*, char*, unsigned int, unsigned int&)':
/data/data0/popcorn-buildbot/worker/worker/builddir/full-rebuild/source_tree/projects/O3DE_linux/../../Runtime/pk_kernel/layer_0/kr_callstack/callstack_symbol_unix.cpp:242: undefined reference to `bfd_map_over_sections'
/usr/bin/ld: /home/olex/.o3de/3rdParty/packages/PopcornFX-2.15.4-O3DE-linux/PopcornFX/Runtime/bin/O3DE/gmake_linux_x64/libPK-Runtime_d.a(callstack_symbol_unix.o): in function `PopcornFX::CBFD::TranslateAddressFunction(void*, char*, unsigned int)':
/data/data0/popcorn-buildbot/worker/worker/builddir/full-rebuild/source_tree/projects/O3DE_linux/../../Runtime/pk_kernel/layer_0/kr_callstack/callstack_symbol_unix.cpp:272: undefined reference to `bfd_map_over_sections'
SelfishOlex commented 1 year ago

I fixed locally by installing:

sudo apt install binutils-dev

And linking against bfd in BUILD_DEPENDENCIES of PopcornFX.Static.

ValPKFX commented 1 year ago

This is now fixed on the development branch and will be included in the next releases. Since this is a fix in the linux popcornfx package, the commit on the development branch will downloads preview packages of 2.16.6. But basically I fixed it like this: bfd_link This also includes the compilation error fixes you made in your PR.