segfault

Get your foo on.

segfault

Postby nodir » November 18th, 2018, 2:32 am

I build a program (transmission), and if i start the gtk version, it gives me a segfault.
$ transmission-gtk
Segfault
$

That is all i get. In all those years i hardly ran in Segfaults.
How do i troubleshoot those?
(i heard something like strace, and i did "strace transmission-gtk, but that is not of much help).

for what it's worth this are the configure options and make/make-install the usual way :
Code: Select all
 autoreconf -fiv
    ./configure  \
     CFLAGS="$QICFLAGS -DNO_SYS_QUEUE_H" CXXFLAGS="$QICXXFLAGS"  \
     $configure_args \
     --libdir=/usr/lib${libSuffix} \
     --infodir=$infodir \
     --mandir=$mandir \
     --docdir=$docdir \
     --with-gtk  \
     --enable-cli \
     --enable-daemon \
     --disable-static \
     --build="$(cc -dumpmachine)"

    make -j${jobs} V=1
    make -j${jobs} DESTDIR="$destdir" install

That are the dependencies:
libs/libevent.

The configure option: -DNO_SYS_QUEUE_H" relates to the musl-library not having sys/queue.h, so transmission comes with the openbsd queue.h file included, which gets "included" instead of sys/queue.h (for glibc linuxes).

transmission-cli seems to work, btw.

I only started transmission-gtk from a chroot with xhost + and export DISPLAY=:0.0 yet.
I don't think that could relate to a segfault, but am really not much in chroots with X, besides most basic tests (which usually work). I for one haven't it seen yet.

That is all i could figure out.
Mind you: I don't undersand answers like "link package x against library y". I need more detailed (or more basic) answers.

thanks in advance, even for tiny help, links, explanations, etc.
nodir
 
Posts: 307
Joined: June 16th, 2015, 10:10 pm

Re: segfault

Postby golinux » November 18th, 2018, 3:16 am

Probably not relevant but do you have the GTK libs installed?
May the FORK be with you!
User avatar
golinux
 
Posts: 1118
Joined: July 23rd, 2011, 4:45 pm
Location: not a 'buntard!

Re: segfault

Postby nodir » November 18th, 2018, 4:09 am

Good point. I think i got them installed, but the sad truth is: I really don't know that much about libraries
(debian does all the dependency stuff automatically, so i never really cared much for libraries).
My assumption (and it really is only that) is, that ./configure will complain and fail, if a dependency is missing.
nodir
 
Posts: 307
Joined: June 16th, 2015, 10:10 pm

Re: segfault

Postby golinux » November 18th, 2018, 4:30 am

Could be a recommend that is disabled in your config.
May the FORK be with you!
User avatar
golinux
 
Posts: 1118
Joined: July 23rd, 2011, 4:45 pm
Location: not a 'buntard!

Re: segfault

Postby nodir » November 18th, 2018, 4:35 am

Let me investigate (as far i am able to. I try to read up on libraries, but jesus, that is tough stuff. You got those /usr/lib* .so and .a on the one hand, and that /usr/include stuff, and once i think i got it, it is all wrong again ... :-) ).
As said: good point, i will look more deep in it.
nodir
 
Posts: 307
Joined: June 16th, 2015, 10:10 pm

Re: segfault

Postby Head_on_a_Stick » November 18th, 2018, 12:29 pm

nodir wrote:I build a program (transmission), and if i start the gtk version, it gives me a segfault.
$ transmission-gtk
Segfault
$

That is all i get. In all those years i hardly ran in Segfaults.
How do i troubleshoot those?

I think the preferred method is gdb, Debian guide here:

https://wiki.debian.org/HowToGetABacktrace

Is this for Dragora? You may have to recompile their libc (musl?) to enable the debugging flags and get a meaningful backtrace.

Alpine Linux offer a transmission-gtk package, their APKBUILD shows the configuration options used:

https://git.alpinelinux.org/cgit/aports ... n/APKBUILD

^ They don't appear to use the --with-gtk option but the package does contain a GTK binary.
Show Off
User avatar
Head_on_a_Stick
 
Posts: 163
Joined: June 16th, 2015, 8:35 pm
Location: London baby!

Re: segfault

Postby nodir » November 18th, 2018, 6:05 pm

thanks.
So gdb too, huh? Puh, not sure if i want something like that right now (simply as it adds too much new stuff).
After looking at the output of strace i was hoping for something which a "user" would/could do. I remember i once looked at gdb too, and i sure could make no sense out of it. (But then: what did i expect? ... )
Just explaining in long detail why i probably won't do it, though the answer is much appreciated.

Yes, for dragora. And i usually search for other "recipes" (from scratch, slackbuilds, arch aurc, etc), also alpine. Always depends how much problems i run into etc. alpine seems to have musl too, iirc? Hence i hope it has a solution for problems related to that (same goes for Void, it also has some musl patches).
You might translate that to: i don't really do much, but copy and paste stuff back and forth, without really understanding much. :-).
iirc i found no musl-patch for transmission, i also found no other patch at the sites where i usually look. And i have been at it for hours and hours, so i probably did search quite a bit, fiddle quite a bit (rebuild libevent as a dependency, upgrade yada-pixbuf, change configure options back and forth ...), what i get is a one word result: Segfault.
That was just chat-info, here comes the main part:
I will try without --with-gtk, good hint. thanks.

Got a good one for you: to figure out how the heck to solve the missing queue.h problem, i did what i do everytime:
cd srcdir; grep -r sys/queue.h *
if i wouldn't have to do it quite often these (and only) these days, i wouldn't have seen the grep -R . at all ....
finding the queue.h solution was a tough one, quite proud i could figure it out, a pity now i don't get the gtk version sorted. fingers crossed .... will try a bit more.

I sure have learned way more by the failing recipes than by the ones which just run through, and that are quite a few. So it isn't as bad as it may sound. :-) (what i want is to learn more about compiling, if all i wanted is to use apps, i could simply use a distribution which offers apps in a comfortable way. iow: having or not having transmission-gtk is not that important to me).
nodir
 
Posts: 307
Joined: June 16th, 2015, 10:10 pm

Re: segfault

Postby Head_on_a_Stick » November 18th, 2018, 9:33 pm

nodir wrote:i once looked at gdb too, and i sure could make no sense out of it.

Yeah, it makes no sense to me either but I've been asked to supply gdb output for several bug reports in the past so the devs could see what went wrong.

nodir wrote:alpine seems to have musl too, iirc?

Yes, they use a musl libc base rather than the GNU variant, it's one of the reasons why the distribution is so light (and also the reason they will never support systemd, which has a hard glibc dependency).
Show Off
User avatar
Head_on_a_Stick
 
Posts: 163
Joined: June 16th, 2015, 8:35 pm
Location: London baby!

Re: segfault

Postby Randicus Draco Albus » November 19th, 2018, 3:30 am

golinux is probably correct. gtk versions of applications sometimes need little extra things to work. An example is LibreOffice. I had gtk+2 librairies installed. When I did my last system upgrade Chinese input stopped working in LibreOffice but still worked Leafpad text editor and gui file managers. I had to install LibreOffice gtk+3 to get input working again.

For Transmission specifically, I am using (in OpenBSD) x11/gtk+3. I do not know where in the Xorg files gtk+3 is located in Linux, but something like that might be your problem.
Klingons are fun, but Romulans are the sexiest women in the galaxy.
User avatar
Randicus Draco Albus
 
Posts: 1497
Joined: September 22nd, 2011, 1:22 pm

Re: segfault

Postby golinux » November 19th, 2018, 4:27 am

For those who have not previously seen this gem:

https://igurublog.wordpress.com/2012/11 ... in-threes/

All part of the free(not-so-much)desktop.org and systemd disease. GTK3 is in perpetual breakage which creates havoc with how windows display apps. I have to deal with this mess when theming Devuan.
May the FORK be with you!
User avatar
golinux
 
Posts: 1118
Joined: July 23rd, 2011, 4:45 pm
Location: not a 'buntard!

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x