Open riot-pmaconi opened 5 months ago
I assume the above warnings could be related to how we build sentry-native
library which is included in the plugin yet this issue requires some additional investigation to tell for sure.
@tustanivsky I believe this is new for us in 0.15.1 and we were previously on 0.13 in case that helps!
Hey @riot-pmaconi, when is this happening for you or how are you running into this? Are you using a source-built version of the engine?
Hi @bitsandfoxes - this shows up in our build logs when compiling the engine from source.
@Swatinem, @supervacuus could you help us out here: Is there something missing from the way we build sentry-native
here that would cause warnings like 12>sentry.lib(sentry_alloc.obj): Warning LNK4204 : '' is missing debugging information for referencing module; linking object as if no debug info
There can be many reasons why this warning appears. Off the top of my head, the most apparent aspects:
The logs show that the quotes are empty. They should contain a path to a PDB
. This could mean that the PDB
is missing from the package you distribute or the translation unit has no PDB
associated with it.
The latter seems plausible since you set SENTRY_BUILD_SHARED_LIBS
in the build script you referenced to OFF
. This means you are building a static library, and a PDB
doesn't make sense in that context because it is the product of the linker, which is not involved in producing a static library only later when the library is linked in either an executable or dynamic library.
Nonetheless, it is possible to include debug information in a static library (which will increase in size), which the linker will later use to generate the PDB
.
You can create a static_debug_info.cmake
(name is irrelevant) that contains the following lines:
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/Z7 /O2 /Ob1 /DNDEBUG" CACHE STRING "C Flags for RelWithDebInfo" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Z7 /O2 /Ob1 /DNDEBUG" CACHE STRING "CXX Flags for RelWithDebInfo" FORCE)
Then apply it during the CMake configuration phase like this:
cmake -B "build"
-DSENTRY_BACKEND=crashpad
-DSENTRY_SDK_NAME=sentry.native.unreal
-DSENTRY_BUILD_SHARED_LIBS=OFF
-C static_debug_info.cmake
Can you reproduce the warnings locally to test against this change @tustanivsky and @bitsandfoxes?
Environment
How do you use Sentry? Sentry SaaS
Which version of the SDK? 0.15.1
How did you install the package? (Git-URL, Assetstore) git
Which version of Unreal? 5.3
Is this happening in Unreal (editor) or on a player like Android, iOS, Windows? This is happening during build instead of at runtime
Steps to Reproduce
Expected Result
Sentry does not introduce new warnings into the build
Actual Result
A significant number of linking warnings are generated
Any logs or screenshots