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

SKALED-1900 release build with separate debug info #1969

Merged
merged 13 commits into from
Sep 27, 2024

Conversation

dimalit
Copy link
Contributor

@dimalit dimalit commented Aug 23, 2024

  1. All dependencies, are built with -O3 and without -g.
  2. skaled is built with -O3 but WITH -g.
  3. -rdynamic removed.
  4. skaled binary is stripped, but it's copy wit debug info is kept.

CUSTOM BUILD Now contains option to build maximally optimized "Release" configuration

Consequences:

  1. Stack trace printed by skaled on crash will not contain any function names.
  2. gdb will be able to use skaled-debug file to load debug info for original skaled
  3. addr2line will be able to convert addresses from skaled's printed stack trace into source code locations using skaled-debug binary

Testing:
1

objdump -h skaled | grep debug
nm -a skaled

2 Execute strip command on skaled and see that it's size didn't change
3 ojdump -h <file> | grep debug on all project libraries shows no result too.

skaled binary size 29575576

@dimalit dimalit changed the title Enhancement/skaled 1900 release build debug info SKALED-1900 release build with separate debug info Aug 23, 2024
@dimalit dimalit linked an issue Aug 28, 2024 that may be closed by this pull request
@dimalit dimalit marked this pull request as ready for review August 28, 2024 17:28
kladkogex
kladkogex previously approved these changes Aug 29, 2024
@@ -28,6 +28,7 @@ jobs:
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true
sudo apt-get -y install liblz4-dev || true
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can add this library to our deps script instead of installing in through apt-get? seems like it is pretty easy to install https://github.com/lz4/lz4

@kladkogex kladkogex self-requested a review August 30, 2024 14:40
@olehnikolaiev olehnikolaiev self-requested a review September 25, 2024 14:27
@DmytroNazarenko DmytroNazarenko added this to the SKALE 3.1 milestone Sep 25, 2024
@dimalit dimalit merged commit cb87613 into v3.20.0 Sep 27, 2024
4 of 5 checks passed
@dimalit dimalit deleted the enhancement/SKALED-1900-release-build-debug-info branch September 27, 2024 10:38
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2024
@DmytroNazarenko DmytroNazarenko restored the enhancement/SKALED-1900-release-build-debug-info branch September 27, 2024 20:45
@DmytroNazarenko DmytroNazarenko deleted the enhancement/SKALED-1900-release-build-debug-info branch September 27, 2024 20:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove debug library builds from release
4 participants