Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 12 Nov 2019, 13:16
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Viber not finding correct set of Qt5 libs...(SOLVED - kinda)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
Mike Walsh


Joined: 28 Jun 2014
Posts: 5543
Location: King's Lynn, UK.

PostPosted: Tue 18 Dec 2018, 13:32    Post subject:  Viber not finding correct set of Qt5 libs...(SOLVED - kinda)
Subject description: The necessary libs DO exist.....but Viber is 'seeing' the wrong set. LD_LIBRARY_PATH, I suspect.....
 

Evening, all.

This evening, some advice about the 'LD_LIBRARY_PATH' would be much appreciated....at least, I think that's going to be the solution here. Or is it 'export LD_PRELOAD'? I confess, however, I'm not at all certain how you implement it.

---------------------------------------

I'm having a go at getting the Viber video-calling app to run in Xenialpup64 7.5. It comes as a .deb package, and installs without issue. Getting it to run, however, is proving a bit of a headache.....

Like so many of today's current crop of apps, it wants Qt5 in order to run. And, opening the .deb up with UExtract, I know exactly what the problem is. Viber installs to /opt/viber. All the required Qt5 libs are within the /opt/viber/libs directory. But it's not seeing them......and here's why.

I already have Qt5 installed in Xenial64 for the I-Nex system specs app to run (but's it not the particular version Viber wants.) I've already figured out this much about Qt stuff; correct versions are critical, and if more than one version exists, invariably the app gets confused...and quits in a huff with a 'segfault', or a 'stacktrace', or summat similar. So Viber is looking no further than /opt/qt5, and is finding the 'wrong' version. Which is exactly what running it from the terminal tells me.

"..../opt/qt5/xxxxxxx; xxxxxxx not found..."

From experience I know that what it really means is it can't find the specific version it wants, not that it doesn't exist!

-----------------------------------------

So, boys & girls; here's tonight's homework 'assignment' for ya. Explain to Uncle Mike how the 'LD_LIBRARY_PATH' variable stuff works, please.... (*bats eyelashes*) I've dissected a few Puppy apps that I know use this in one form or another, including the work battleshooter did to help me with the current Chrome packages (the self-contained NSS stuff).....but I'm no closer to figuring it out. For one, simple reason; in every single case, it seems to have been implemented in a different way..!!!

What would be the simplest way to 'point' Viber at the correct directory for its own Qt5 stuff, rather than stopping short at the 'system' one? Does every single Qt5 lib need to be individually named when you do this.....'cos that's what some people seem to have done..?

TIA. Any & all advice is very much appreciated, as always.


Mike. Wink

Last edited by Mike Walsh on Tue 18 Dec 2018, 19:30; edited 2 times in total
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 648
Location: Western United States

PostPosted: Tue 18 Dec 2018, 15:35    Post subject:  

Hi Mike,

You are correct about how LD_LIBRARY_PATH works. Linux searches the directories listed in this environment variable, in order, stopping at the first place where it finds what it's looking for.

The standard solution, if you know the terminal command that runs Viber, is to run Viber from a shell script that looks like this:

Code:
#!/bin/sh
LD_LIBRARY_PATH=/opt/viber/libs:$LD_LIBARARY_PATH viber whatever_args_needed


I'm assuming for the sake of argument that "viber whatever_args_needed" is the normal command line syntax for running viber. The script alters the LD_LIBRARY_PATH by inserting /opt/viber/libs to the head of the line, so to speak. But this change is ONLY effective for the command that follows on the same line. This is the safest solution because nothing else in your system is affected.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5543
Location: King's Lynn, UK.

PostPosted: Tue 18 Dec 2018, 17:15    Post subject:  

Hi, 6502coder:-

O-kay. Well, the 'command' for running viber is simply /opt/viber/Viber, AFAIK. So; would I be right in thinking something like the following, then?

Code:
#!/bin/sh
LD_LIBRARY_PATH=/opt/viber/lib:$LD_LIBRARY_PATH /opt/viber/Viber


Does that look like it would do what I want it to? Would I also be right in thinking that I could place this script in /usr/bin, and then 'call it' with the .desktop entry from /usr/share/applications.....and then with a bit of luck it'll do what I want it to and start Viber?

Hmm....

---------------------------

Right. Well, starting it from the terminal with the line I outlined above ends up with this:-

Code:
root# LD_LIBRARY_PATH=/opt/viber/lib:$LD_LIBRARY_PATH /opt/viber/Viber
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
sh: xdg-mime: command not found
Qt WebEngine ICU data not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine ICU data not found at /opt/viber/resources. Trying parent directory...
Qt WebEngine resources not found at /opt/viber/resources. Trying parent directory...
Segmentation fault
root#


For several seconds, I thought it was going to run.....then this lot all appeared in a hurry. Funny thing is, /opt/viber/resources doesn't actually appear to exist.....and a segfault is never good news.

I might give it a try in Bionicpup64.....but I'm not hopeful.

I hate Qt. Grrr...!


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
norgo


Joined: 13 Nov 2015
Posts: 352
Location: Germany

PostPosted: Tue 18 Dec 2018, 17:54    Post subject: qtwebengine  

Hey Mike don't be so aggressive Wink

Are you sure that Qtwebengine is installed ?
Qtwebengine NOT be confused with Qtwebkit !

depending on QT installation path you should find somewhere

...../resources/qtwebengine_resources_100p.pak
...../resources/qtwebengine_resources_200p.pak
...../resources/qtwebengine_resources.pak
...../resources/icudtl.dat

where from you downloaded Viber ?
I've compiled qtwebengine under Slacko 700 (32bit) and could do a test.

btw. ( time for compilation ) with intel i7 and 100 percent cpu load all the time incredible 72 minutes
Back to top
View user's profile Send private message Visit poster's website 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5543
Location: King's Lynn, UK.

PostPosted: Tue 18 Dec 2018, 19:28    Post subject:  

Hi. norgo.

Yep; qtwebengine is very definitely there. This is in the /opt/viber/lib directory:-





And this is in /opt/viber itself:-





There's your 'resources.pak' thingamajigs (plus a binary for the QtWebEngineProcess - whatever that is).

Download came from the viber.com downloads page, here:-

https://www.viber.com/download/

However.....

---------------------------

Your 'libqtwebengine' wouldn't be a lot of good, unfortunately, since this app, like many nowadays, is 64-bit only. And I've just noticed something, anyway; Viber, like certain others, will only allow the desktop app to work if you already have a mobile a/c up-and-running & activated.

I rather thought this was like the Telegram messaging app, that would work simply by the use of a mobile no. This, however, wants an a/c activated & working on a smartphone. I don't have a smartphone.....and I'm in no hurry to go out and get one. I don't even like them. I'm certainly not going to get one just on the off-chance I could get a desktop app working..!

So; I think I'm going to give this one a miss. Sorry to have wasted your time, boys & girls.....although I do at least have a handle on how this LD_LIBRARY_PATH stuff works now. Embarassed But I'm going to mark it as 'Solved', since my original question has been answered.

Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
shungabubus

Joined: 22 Jun 2011
Posts: 3

PostPosted: Fri 12 Apr 2019, 17:38    Post subject: Any update?  

Hello all, it is funny with Viber that their intellect ends at putting the same file (viber.deb) with different content so you never know what you download. Any luck with the latest version? Issue is similar but not the same exactly...
Back to top
View user's profile Send private message 
666philb


Joined: 07 Feb 2010
Posts: 3495
Location: wales

PostPosted: Fri 12 Apr 2019, 18:13    Post subject: Re: Any update?  

shungabubus wrote:
Hello all, it is funny with Viber that their intellect ends at putting the same file (viber.deb) with different content so you never know what you download. Any luck with the latest version? Issue is similar but not the same exactly...


hi shungabubus,

the new viber.deb fires up now for me in bionicpup64 don't know if fully functional though as don't use it...

needed this script to run as spot
Code:
#!/bin/sh
export LD_LIBRARY_PATH=/opt/viber/lib:$LD_LIBRARY_PATH
   APP=/opt/viber/Viber
#script to run $APP as spot...
ARGS=""
[ "$1" ] && while [ "$1" ]; do ARGS="$ARGS \"$1\""; shift; done
if [ $(id -u) -eq 0 ]; then
 [ $XAUTHORITY ] && cp $XAUTHORITY /root/spot/.Xauthority 2>/dev/null
 touch /root/spot/.Xauthority
 #following line is mostly there to catch any root:root files that may have got copied in...
 find /root/spot \( -not -user spot -or -not -group spot \) -exec chown -h spot:spot {} \; &
 export XAUTHORITY=/root/spot/.Xauthority 
 export XDG_CONFIG_HOME=/root/spot/.config
 export XDG_CACHE_HOME=/root/spot/.cache
 export XDG_DATA_HOME=/root/spot/.local/share
 exec su spot -s /bin/sh -c "\"$APP\" $ARGS"
else #precaution
 exec "$APP" "$ARGS"
fi


if no sound you might need to launch the script with apulse
Code:
apulse /path/to/script

_________________
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331
Back to top
View user's profile Send private message 
shungabubus

Joined: 22 Jun 2011
Posts: 3

PostPosted: Sat 13 Apr 2019, 11:13    Post subject: Re: Any update?  

Hello 666philb BRILLIANT! works like a charm till chat, and I don't need more on this machine Very Happy

Note: Audio is not available by design so I can't test the call function.
Back to top
View user's profile Send private message 
kuman11

Joined: 26 Dec 2017
Posts: 211

PostPosted: Sun 14 Apr 2019, 21:24    Post subject:  

Mike,

do u think Viber would work in Slacko 5.7 CE?
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5543
Location: King's Lynn, UK.

PostPosted: Mon 15 Apr 2019, 06:40    Post subject:  

kuman11 wrote:
Mike,

do u think Viber would work in Slacko 5.7 CE?


Nope. Definitely not. Read the thread; it's 64-bit only....

Nothing you can do about that, I'm afraid.


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0749s ][ Queries: 12 (0.0154s) ][ GZIP on ]