chdkptp - alternative ptp client - page 93 - General Discussion and Assistance - CHDK Forum
supplierdeeply

chdkptp - alternative ptp client

  • 1106 Replies
  • 517726 Views
*

Offline mphx

  • ***
  • 210
Re: alternative ptp client
« Reply #920 on: 18 / December / 2016, 17:32:20 »
Advertisements
@reyalp

To simplify things.

1.Both binaries (precompiled by you and compiled by me) are segfaulting.
2.dmesg segfault is from my compiled binary. ** but i just checked , dmesg message is the same for both binaries**

Your precompiled binary as far as i can understand uses one or two versions back of IUP and CD.
I used the latest available.Probably thats why one binary throws in some warning/errors and segfaults and the other one doesnt throws any messages and just segfaults.
So bottom line i believe that both binaries have the same problem and that must be something to do with libgobject-2.0.so.0.xxx which is part of the glib2 package. (installed version is 2.50.2-1).
I tried some older versions but it was no-go either.

I did some ldd with both binaries just to check if the various libgobject i was using were "used" by the binary.
https://www.dropbox.com/s/w590qzum8r6oy4f/ldd.zip?dl=0 ** i zipped 2 files containing the result of the ldd command for both binaries**
Probably they are the same libraries used and only difference would be the iup/cd libraries (especially in versions)

I dont have a debian/ubuntu distro handy at this time to check versions and stuff , if you have feel free to check it.If you need to check versions of specific packages/libraries/whatever feel free to tell me.

EDIT : Changing distros is not big deal but i'd like to stick with arch-based distro for mostly 2 reasons.Firstly there are precompiled packages i couldnt dream to find in any other distro.There is even chdkptp available ( https://aur.archlinux.org/packages/chdkptp) although it doesnt build correctly :) . So prebuilt/compiled packages is a big plus here.
Secondly , arch-based distros are bleeding edge and since i have a rather difficult hardware (hybrid graphics) i want to get new updates fast in hoping some things would get implemented or fixed some day.
Just for the history :)

EDIT 2 :

IUP : iup-3.20-Lua52_Linux44_64_lib.tar.gz (+lua52 libs)
CD : cd-5.11-Lua52_Linux44_64_lib.tar.gz (+lua52 libs)



Thanks.
« Last Edit: 18 / December / 2016, 17:46:09 by mphx »

Re: alternative ptp client
« Reply #921 on: 18 / December / 2016, 18:47:07 »
I had some difficulties in ubuntu 15.04.  I made a script for both the GUI version and line mode version to set things like ld_library_path etc. 
I also after every reboot, manually have to:

  sudo ldconfig /usr/lib64

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #922 on: 18 / December / 2016, 18:50:29 »
Here's ldd from the pre-compiled build running on Ubuntu 16.04. Nothing really jumps out at me comparing with yours.

The glib version on my system is 2.48.1

I did notice that yours has a bunch of wayland libraries. If gtk is trying to use wayland, using X instead might be something to try. The wiki page states
Quote
GTK+ 3 lets users select the desired GDK back-end by setting the GDK_BACKEND Unix environment variable.
I assume something like
export GDK_BACKEND=x11
before chdkptp is invoked

I wouldn't be at all surprised if IUP/CD have some X specific dependencies.

There's probably some error log for wayland (equivalent to .xsession-errors or /var/log/Xorg.N.log) which might provide more clues.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: alternative ptp client
« Reply #923 on: 18 / December / 2016, 19:30:56 »
@reyalp


Lets take things in a order.


1.i pulled from old archives glib2 2.48.1 and linked chdkptp locally to it . no-go
2. According to this ( https://wiki.archlinux.org/index.php/wayland#GTK.2B_3 ) gtk3 backend defaults to X11 and can be overriden to use wayland backend with the command you suggested.Which it didn't make any difference.So that link might be telling the truth.
3.3 out of 4 wayland libs mentioned in my files , are mentionted to your file too.So i dont think wayland is involved / affecting anything here.
4.I didn't find any logs concerning wayland.Thats logic if you think that nothing related to wayland is running.Some packages pulled some wayland libs as dependencies apparently,nothing more.
/var/log/Xorg.N.log has zero errors (thats a shock!) , .xession-errors has nothing related to chdkptp.

I've noticed something odd that might be relevant or not.
As i said i have hybrid graphics.When i need to run something on my second gpu (the good one) i use something like "optirun <application>" and sends the <application> to the second gpu , using all the libs/drivers/etc that are related to this card.
Its the well-known bumblebee project , best solution for hybrid graphics so far in linux. :(

Well i was playing around with chdkptp and i issued "optirun ./chdkptp.sh" .It just displayed "starting gui..." and exited.Zero messages at dmesg.No "segmentation fault" at prompt. Like nothing ran at all.Pretty odd.

I presume that we are missing some strange version combination of libs involved in all this.

A good thing would be to zip your source folder with all libs involved in there , send it over to me , so i can try to compile it here , with your configuration , your combination of local libs.
Can't think of anything else to test/try at this moment...


*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #924 on: 18 / December / 2016, 20:15:17 »
1.i pulled from old archives glib2 2.48.1 and linked chdkptp locally to it . no-go
Not surprising. It's quite likely that where the error occurs is not the source of the problem.

Quote
2. According to this ( https://wiki.archlinux.org/index.php/wayland#GTK.2B_3 ) gtk3 backend defaults to X11 and can be overriden to use wayland backend with the command you suggested.Which it didn't make any difference.So that link might be telling the truth.
3.3 out of 4 wayland libs mentioned in my files , are mentionted to your file too.So i dont think wayland is involved / affecting anything here.
4.I didn't find any logs concerning wayland.Thats logic if you think that nothing related to wayland is running.Some packages pulled some wayland libs as dependencies apparently,nothing more.
Yeah, that makes sense. I know very little about this wayland stuff.

Quote
/var/log/Xorg.N.log has zero errors (thats a shock!) , .xession-errors has nothing related to chdkptp.
To be clear, N is the display number (typically 0). If that's what you looked at, maybe error logging is turned off somewhere?

Quote
I've noticed something odd that might be relevant or not.
As i said i have hybrid graphics.When i need to run something on my second gpu (the good one) i use something like "optirun <application>" and sends the <application> to the second gpu , using all the libs/drivers/etc that are related to this card.
Its the well-known bumblebee project , best solution for hybrid graphics so far in linux. :(

Well i was playing around with chdkptp and i issued "optirun ./chdkptp.sh" .It just displayed "starting gui..." and exited.Zero messages at dmesg.No "segmentation fault" at prompt. Like nothing ran at all.Pretty odd.
I don't really know anything about this, but it wouldn't surprise me if optirun just didn't display the error.
Quote
A good thing would be to zip your source folder with all libs involved in there , send it over to me , so i can try to compile it here , with your configuration , your combination of local libs.
I don't understand how this would help. The libs I used are listed in README-LINUX-BINARIES.TXT

You could check out r723 of the chdkptp source if you wanted, but I'm very confident that none of the changes since then are relevant to this problem.

The config.mk I used is attached, but all it really does is set the paths.

Since both my build and yours crash in similar ways, my suspicion is that the errors are between IUP/CD and the GTK etc libraries on your system. But this is just a wild guess.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: alternative ptp client
« Reply #925 on: 21 / December / 2016, 10:12:32 »
@reyalp
After the last days , trying distros , running binaries , compiling sources.. the result is. ZERO :)

After Manjaro/XFC4 , i installed ubuntu 16.10/Unity (clean install).First thing i did was to run chdkptp.Same segfault.
Updated it to 17.04.Thought newer versions there , maybe i will get lucky.Same story there.
I fcked up ubuntu installation at some point, so i ended up to Fedora since i want to run some 3d programs that are coming in rpm packages so suits me well.
Newest fedora runs wayland.First shock there :)
export GDK_BACKEND=x11 did the trick though and after that , we are back to the same segfault.
I am starting to believe that iup/cd maybe want specific versions of specific system libraries :)

Ah forgot to mention that every try was made , by compiling iup/cd(im)/lua52 every time to be sure that they are built against current system's libraries.
Its not big ,deal  i can test stuff in chdkptp at studio (windows) but i'd like to have it available at home too...

*

Offline srsa_4c

  • ******
  • 4451
Re: alternative ptp client
« Reply #926 on: 21 / December / 2016, 19:24:41 »
@mphx
You could try investigating those crashes a bit more. See posts starting here to get some ideas (gdb, backtrace).

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #927 on: 21 / December / 2016, 23:34:34 »
After Manjaro/XFC4 , i installed ubuntu 16.10/Unity (clean install).First thing i did was to run chdkptp.Same segfault.
That's strange, in the past builds on older versions of ubuntu have run fine on later versions for me.

Did you try my build on this OS?

Quote
Ah forgot to mention that every try was made , by compiling iup/cd(im)/lua52 every time to be sure that they are built against current system's libraries.
Do you really mean building IUP/CD ? I really don't recommend this (I remember we had a long conversation about this in the other thread). Up to now, I've had no problems using their pre-built libraries.

As srsa_4c suggests, debugging with gdb might give some clues.
Don't forget what the H stands for.


*

Offline mphx

  • ***
  • 210
Re: alternative ptp client
« Reply #928 on: 22 / December / 2016, 04:15:10 »
@reyalp


Sorry,forgot to mention , that i firstly was testing pre-built binaries of yours , before starting compiling , in every distro i was installing.The result was the same with either binaries and compiled.


I did some debugging , dont know alot of it to dig really deep..but it was all ended up to glib2/libgobject library.
I will check the link too.

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #929 on: 22 / December / 2016, 12:51:13 »
Sorry,forgot to mention , that i firstly was testing pre-built binaries of yours , before starting compiling , in every distro i was installing.The result was the same with either binaries and compiled.
Thanks for clarifying.
Quote
I did some debugging , dont know alot of it to dig really deep..but it was all ended up to glib2/libgobject library.
If you can get stack trace, please post it.

If anyone else is using chdkptp on Linux, I'd be interested to know what distros the GUI is working (or not) on.

I'll try to investigate this further at some point, but unfortunately due to real life circumstance I have even less time for CHDK related stuff than usual.
Don't forget what the H stands for.

 

Related Topics