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

Build sentry from source #706

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Build sentry from source #706

wants to merge 24 commits into from

Conversation

PlasmaDev5
Copy link
Collaborator

WIP changes to build sentry-native from source.

Currently i have only tested/developed on windows and will not yet fully compile due to not linking libraries.
The changes here are based on UE4CMake with modification and cleanup to better function for the needs of sentry.
going forward further modification will be needed to add platform support for all our needs.
In addition we will need to load custom toolchains for some platforms.

TODO:

  • Link generated libraries
  • Android
  • IOS
  • Linux
  • Mac
  • Other Platforms

PlasmaDev5 added 2 commits December 6, 2024 22:20
only windows tested currently
Copy link
Contributor

github-actions bot commented Dec 6, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 6efda5c

@PlasmaDev5
Copy link
Collaborator Author

@tustanivsky Any insights on the build issues. from what i can tell something is referencing modules/sentry-native but i did checked everything and did a string search and nothing comes up. It should all have been moved to plugin-dev/sentry-native

@PlasmaDev5
Copy link
Collaborator Author

Only thing left before final review is add the ability to build for both crashpad and breakpad independently

@PlasmaDev5 PlasmaDev5 marked this pull request as ready for review December 19, 2024 15:22
@PlasmaDev5
Copy link
Collaborator Author

I have marked this as ready to review as all contents are ready. The is 1 thing missing related to building backtrace from CI and this looks to be a larger discussion

@bruno-garcia
Copy link
Member

image
@PlasmaDev5 quite a few CI steps are broken though

@PlasmaDev5
Copy link
Collaborator Author

Ah yeah when I looked at it before it looked to be a permissions issue but looks to be doesn't with that last build. I'll take a look

sentry-native/.codecov.yml
sentry-native/.craft.yml
sentry-native/.editorconfig
sentry-native/.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a @tustanivsky question:

Should we be adding .git to the packages? This will include all commit history etc.
Similarly about .github, looks like we're adding the whole git submodule as-is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this require a change in sentry-native to work?
If so, lets get that added to main through a PR on sentry-native first. Then we bump main here and pull that into this branch.

This way we don't need to change sentry-native in this PR and having it pass CI checks that the change is compatible with it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no changes to native. The current issues to CI imply im missing something with building Linux.

public class Sentry : ModuleRules
{
[CommandLine("-usebreakpad")]
public bool bUseBreakpad = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I say false, what am I using then?
And would that be true regardless of platform? (On Xbox today we only support breakpad so that's odd)

Seems like config will be more complicated than a bool as it'll depend on what platform you're targeting, and what's supported there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should probably rename this. Its an override more then anything. Native already select the backend needed for selected platforms but this allows the build system to override to build to use breakpad on windows. its needed for shipping releases as we only ship breakpad for the marketplace version

{
string generatorName="";

switch(compiler)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we cover all these branches in CI?

I don't think we're building on Windows yet, so we need to add that, for example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not currently build windows. i did talk to Ivan about this briefly when gathering information. Last info i got on the topic was during a weekly meeting it was mentioned he was pointed at some stuff that may help get it working.

As for the generators we currently dont build all the unreal generators even on linux. Im not even sure we try all cmake generators on the native side. But the general goal here is to map the unreal compiler to its best fit in the cmake space.

}
public class CMakeTargetInst
{
// Based on UE4CMake with modifications
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a link to where this came from that you can copy and paste here?

Instead of linking to the file through a branch, use the commit sha (on GitHub, if you press y it changes the path from branch to sha automatically.

CHANGELOG.md Outdated Show resolved Hide resolved
.gitmodules Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it need to move to plugin-dev? It was located on modules before and it's unclear why it had to change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SDK plugin now needs to know the path to native in order to build. I did originally try do this via symlink but with the SDK itself being used as a symlink it caused errors and pointed to the wrong direction. The safest and least error prone option for users was to simple move native into the SDK folder so that wherever you build SDK it can easily locate native without manual user steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants