LinuxQuestions.org
Review your favorite Linux distribution.
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 03-04-2019, 04:51 PM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,236
Blog Entries: 1

Rep: Reputation: Disabled
Failed to build from SBo


I tried to build touch typing application klavaro with help of SBo script. Built went fine yet application crashes. Here is what brought my attention
Code:
$ klavaro
*** Error in `klavaro': double free or corruption (fasttop): 0x08b50df8 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71270)[0xb5f3d270]
/lib/libc.so.6(+0x7ba73)[0xb5f47a73]
/lib/libc.so.6(cfree+0x58)[0xb5f4c5d8]
/usr/lib/libglib-2.0.so.0(g_free+0x1f)[0xb64ea0ff]
klavaro(trans_init_language_env+0x17b)[0x805719b]
klavaro(main+0x2e0)[0x8051860]
/lib/libc.so.6(__libc_start_main+0x107)[0xb5ee4697]
klavaro[0x805215c]
======= Memory map: ========
..................................................
b76c1000-b76e2000 r-xp 00000000 08:02 442434     /tmp/SBo/klavaro-3.01/gtkdatabox/.libs/libgtkdataboks.so.0.0.0
b76e2000-b76e3000 r--p 00020000 08:02 442434     /tmp/SBo/klavaro-3.01/gtkdatabox/.libs/libgtkdataboks.so.0.0.0
b76e3000-b76e4000 rw-p 00021000 08:02 442434     /tmp/SBo/klavaro-3.01/gtkdatabox/.libs/libgtkdataboks.so.0.0.0
it does not make any sense. Program should never refer to whatever was/is contained in /tmp/SBi/klavaro directory - it is just temporary build directory. Any suggestions?
 
Old 03-04-2019, 05:06 PM   #2
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 1,107

Rep: Reputation: 329Reputation: 329Reputation: 329Reputation: 329
Quote:
Originally Posted by igadoter View Post
I tried to build touch typing application klavaro with help of SBo script. Built went fine yet application crashes. Here is what brought my attention
Code:
$ klavaro
*** Error in `klavaro': double free or corruption (fasttop): 0x08b50df8 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71270)[0xb5f3d270]
/lib/libc.so.6(+0x7ba73)[0xb5f47a73]
/lib/libc.so.6(cfree+0x58)[0xb5f4c5d8]
/usr/lib/libglib-2.0.so.0(g_free+0x1f)[0xb64ea0ff]
klavaro(trans_init_language_env+0x17b)[0x805719b]
klavaro(main+0x2e0)[0x8051860]
/lib/libc.so.6(__libc_start_main+0x107)[0xb5ee4697]
klavaro[0x805215c]
======= Memory map: ========
..................................................
b76c1000-b76e2000 r-xp 00000000 08:02 442434     /tmp/SBo/klavaro-3.01/gtkdatabox/.libs/libgtkdataboks.so.0.0.0
b76e2000-b76e3000 r--p 00020000 08:02 442434     /tmp/SBo/klavaro-3.01/gtkdatabox/.libs/libgtkdataboks.so.0.0.0
b76e3000-b76e4000 rw-p 00021000 08:02 442434     /tmp/SBo/klavaro-3.01/gtkdatabox/.libs/libgtkdataboks.so.0.0.0
it does not make any sense. Program should never refer to whatever was/is contained in /tmp/SBi/klavaro directory - it is just temporary build directory. Any suggestions?
multilib ?
 
Old 03-05-2019, 04:29 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,236

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
I am running 32 bit system.
 
Old 03-05-2019, 05:19 AM   #4
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Slackware
Posts: 1,348
Blog Entries: 3

Rep: Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310
I've built it on 64bit and it runs fine. I'll try with 32bit later.
 
Old 03-05-2019, 11:55 AM   #5
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,236

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
I can confirm it works on 64bit -current. Previously I built it with espeakup as dependency (on 14.2 32bit) - I will try to rebuild without espeakup.

Last edited by igadoter; 03-05-2019 at 11:56 AM. Reason: gram error
 
Old 03-05-2019, 07:02 PM   #6
Mechanikx
Member
 
Registered: Jul 2018
Location: Canada
Distribution: Slackware
Posts: 120

Rep: Reputation: 78
@igadoter

I just installed klavaro on 14.2 32bit and it works fine. I built it without espeakup.
 
Old 03-05-2019, 09:06 PM   #7
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,545

Rep: Reputation: Disabled
It looks like a bug in klavaro, but it doesn't crash here either. If you want to debug it further you are going to need debugging symbols.

First change klavaro.SlackBuild by adding this line directly above the configure block.

Code:
SLKCFLAGS="$(printf %s "$SLKCFLAGS" | sed 's/-O2/-O0 -g/')"
Next comment or otherwise remove these two lines so it doesn't strip the debugging symbols.

Code:
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
Next rebuild and reinstall the new package and get a backtrace.

Code:
gdb klavaro 2>&1 | tee /tmp/klavaro.log
Inside the gdb prompt you can run the program with 'r' and after it crashes you can get a backtrace with 'bt' and 'bt full'. Next share the '/tmp/klavaro.log' you just created here so we can get a better idea of what is happening.

Quote:
Originally Posted by igadoter View Post
it does not make any sense. Program should never refer to whatever was/is contained in /tmp/SBi/klavaro directory - it is just temporary build directory.
This is normal and not the issue.
 
1 members found this post helpful.
Old 03-06-2019, 03:24 AM   #8
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,236

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Thanks @Mechanikx - I'll try to rebuild today without espeakup. Espeakup ha its own dependencies - I suspect portaudio - but I didn't tested it.

@orbea - great thanks I will apply these changes to Slackbuild.

At this moment I am little busy - so I will have to put this on shelf for day of two.
 
1 members found this post helpful.
Old 03-06-2019, 09:54 AM   #9
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,236

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
@orbea I did something wrong cause log shows nothing, here is part of SlackBuild script I thought is relevant to what you posted to change
Code:
SLKCFLAGS="$(printf %s "$SLKCFLAGS" | sed 's/-O2/-O0 -g/')"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --disable-static \
  --build=$ARCH-slackware-linux

make
make install DESTDIR=$PKG

#find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
#  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
then I run
Code:
$ gdb klavaro 2>&1 | tee /tmp/klavaro.log
and this is klavaro.log
Code:
$ cat /tmp/klavaro.log 
GNU gdb  7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-slackware-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from klavaro...done.
(gdb) q
seems I did something wrong.
 
Old 03-06-2019, 01:53 PM   #10
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,545

Rep: Reputation: Disabled
You missed a few steps and instead of running the program with gdb and then reproducing the issue you are just exiting. I would start it again in gdb and make sure to actually run it with 'r' this time and then get the backtrace with 'bt' after it crashes.

Quote:
Originally Posted by orbea View Post
Inside the gdb prompt you can run the program with 'r' and after it crashes you can get a backtrace with 'bt' and 'bt full'. Next share the '/tmp/klavaro.log' you just created here so we can get a better idea of what is happening.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] SBo: nvidia-legacy340-kernel: nvidia.ko failed to build lopuh Slackware 3 03-03-2019 12:21 PM
nvidia-driver SBo The symbolic link '/usr/lib/libGL.so.1' does not point to 'tmp/SBo/package-nvidia-driver/usr/lib64/libGL.so.1' Gerardo Zamudio Slackware 5 07-30-2017 10:44 PM
Questions for Robby, ponce, or anyone from SBo about SBo submission requirements. ReaperX7 Slackware 4 06-07-2015 11:30 AM
Nvidia-driver.SlackBuild from SBo (or: I am a bad and sloppy SBo maintainer) kingbeowulf Slackware 8 08-31-2012 02:41 AM
Virtualbox-ose compilation error using Sbo slack-build samac Slackware 11 10-30-2008 02:28 PM

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

All times are GMT -5. The time now is 05:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration