LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-26-2020, 04:32 PM   #1
lancsuk
Member
 
Registered: Jul 2019
Location: Burnley / UK
Distribution: Slackware current
Posts: 226

Rep: Reputation: 204Reputation: 204Reputation: 204
HowTo Rebuild GLib with debug symbols?


Hiya,

I have some issues with vala-panel-appmenu, and for debugging I need glib2 with debug symbols. How I can enable the symbols?

Code:
--enable-debug=yes
does not work, and I can't find any info in the meson_options file.

Last edited by lancsuk; 12-27-2020 at 06:00 PM.
 
Old 12-26-2020, 04:49 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,124

Rep: Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198
the default buildtype in meson.build seems to be "debugoptimized" but you can also specify an explicit "debug".
also you might want to delete the stripping routine, because symbols might be useful for you.
so in the end, IMHO, you can modify glib2.SlackBuild like this
Code:
--- ./glib2.SlackBuild.orig     2020-12-12 22:23:16.846030867 +0100
+++ ./glib2.SlackBuild  2020-12-26 23:43:40.675313486 +0100
@@ -96,7 +96,7 @@
   --mandir=/usr/man \
   --sysconfdir=/etc \
   --localstatedir=/var \
-  --buildtype=release \
+  --buildtype=debug \
   -Dselinux=disabled \
   -Dfam=true \
   -Dman=true \
@@ -122,9 +122,6 @@
 mv $PKG/etc/profile.d/libglib2.csh $PKG/etc/profile.d/libglib2.csh.new
 mv $PKG/etc/profile.d/libglib2.sh $PKG/etc/profile.d/libglib2.sh.new
 
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
-  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-
 # Compress and link manpages, if any:
 if [ -d $PKG/usr/man ]; then
   ( cd $PKG/usr/man
 
1 members found this post helpful.
Old 12-26-2020, 06:47 PM   #3
lancsuk
Member
 
Registered: Jul 2019
Location: Burnley / UK
Distribution: Slackware current
Posts: 226

Original Poster
Rep: Reputation: 204Reputation: 204Reputation: 204
Quote:
Originally Posted by ponce View Post
the default buildtype in meson.build seems to be "debugoptimized" but you can also specify an explicit "debug".
also you might want to delete the stripping routine, because symbols might be useful for you.
so in the end, IMHO, you can modify glib2.SlackBuild like this
Code:
--- ./glib2.SlackBuild.orig     2020-12-12 22:23:16.846030867 +0100
+++ ./glib2.SlackBuild  2020-12-26 23:43:40.675313486 +0100
@@ -96,7 +96,7 @@
   --mandir=/usr/man \
   --sysconfdir=/etc \
   --localstatedir=/var \
-  --buildtype=release \
+  --buildtype=debug \
   -Dselinux=disabled \
   -Dfam=true \
   -Dman=true \
@@ -122,9 +122,6 @@
 mv $PKG/etc/profile.d/libglib2.csh $PKG/etc/profile.d/libglib2.csh.new
 mv $PKG/etc/profile.d/libglib2.sh $PKG/etc/profile.d/libglib2.sh.new
 
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
-  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-
 # Compress and link manpages, if any:
 if [ -d $PKG/usr/man ]; then
   ( cd $PKG/usr/man
brilliant, thank you so much.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any easy way to rebuild the whole system with debug symbols? Lockywolf Slackware 7 03-29-2019 05:52 AM
'nm' lists all symbols - including static library symbols painulyarun Programming 4 04-06-2010 04:04 AM
Debugger selectively not using symbols in library with symbols Millenniumman Programming 5 03-25-2007 09:44 AM
Debugger selectively not using symbols in library with symbols Millenniumman Programming 1 03-03-2007 07:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration