maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Extra softwares in Sailfish using CLI, repositories, etc (https://talk.maemo.org/showthread.php?t=92036)

levone1 2019-04-07 17:29

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by Halftux (Post 1555957)
No problem and no need to say sorry :) Maybe I need to say sorry. What ever.



Could mean everything maybe not enough ram. Or it is some problem with qemu. Or some configure option or compiler flag when you compile the needed packages on arm. Maybe it is better to try it on a real pc first, to make sure that the approach has success. And when everything is working like you want, then try to get it running on the mobile.

Try also to make a apt-get dist-upgrade. So the right procedure would be.
Code:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
reboot
sudo apt-get install xfce4
reboot


So, turns out that I never had a network connection. I misunderstood some terminal output and thought I did ... I found this - https://ownyourbits.com/2017/02/06/r...network-access - which offered some hope, and followed all steps, including modding script to say NO_NETWORK=0 and IFACE=data0, as well as editing sudoers file... But, no luck.

edit - actually, now I seem to have connection - mu bin files referred to in sudoers were in sbin... I pinged the ip that showed up in
Code:

ip route ls
and got a normal response, so I guess connection is ok(?) Anyway, still segmentation fault error on apt-get update, even though connection is definitely there. I was able to download html of webpage with wget, but when I try to download any file, segmentation fault...

Maemish 2019-04-08 09:07

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Did you try to install on an sdcard or to phione itself? I got segmentation fault after an interrupted fetching of packages and only way to resolve the issue was to reformat the sdcard and start from the beginning what I was doing. Have got the same thing to happen couple of times (either with interruption likie a received call or with some unsuitable packages with dpkg error.

mrsellout 2019-04-08 16:13

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
@levone1. if I understand correctly, you're trying to run a raspbian image under qemu on your Xperia X compact?

Try having a read through this thread:
https://talk.maemo.org/showthread.php?t=98882

Here people managed to go down the chroot route with other distributions and get a VNC display up for a GUI.

You should be able to get Raspbian running in the same fashion.

levone1 2021-01-24 04:31

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
edit - never mind, I found it - mapplauncherd-devel...

Anybody know how I can get qt5-boostable package? Trying to rpmbuild, and it's the last dependency I need, and I can't figure out which package it's in...

levone1 2021-07-07 02:36

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
ok - how about this ...
Trying to rpm build from source. Hit several bumps and found solutions, but I'm stumped on this part.

Getting an error on code
Code:

= qMin(qMin(s.width() / 2, s.height() / 2), f)
.
The error is
Code:

graphicswidget/rect.cpp: In member function 'vir
tual void karin::rect::setRadius(float)':
graphicswidget/rect.cpp:293:55: error: no matchi
ng function for call to 'qMin(const double&, flo
at&)'
= qMin(qMin(s.width() / 2, s.height() / 2), f);
                                            ^

I'm totally unfamiliar with this type of code, but my searching hints that the key to the problem is in the fact that something tjere represents a 'double', so that 'f)' part needs to say something else, but can't figure it out ...

pichlo 2021-07-07 11:10

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
You pretty much figured it out yourself. qMin returns a double, so
Code:

qMin(qMin(s.width() / 2, s.height() / 2), f)
is seen by the compiler as
Code:

qMin(double, whatever_type_f_is)
If f is float, convert it to double. The best solution would be to make it double to start with, but if that is not practical, simply cast it:
Code:

qMin(qMin(s.width() / 2, s.height() / 2), double(f))
C++ is funny like that. In C, the conversion from float to double is automatic. C++ thinks it's too cool for that.

EDIT:
In this case, C++ cannot convert automatically because qMin is a template and requires the same type for both parameters. The compiler does not know whether to convert them both to float or to double, so it gives up and throws a wobbly. I still think it should be smart enough to convert them both to the wider type, but as I say, C++ can be funny sometimes.

levone1 2021-07-07 16:33

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by pichlo (Post 1572268)
You pretty much figured it out yourself. qMin returns a double, so
Code:

qMin(qMin(s.width() / 2, s.height() / 2), f)
is seen by the compiler as
Code:

qMin(double, whatever_type_f_is)
If f is float, convert it to double. The best solution would be to make it double to start with, but if that is not practical, simply cast it:
Code:

qMin(qMin(s.width() / 2, s.height() / 2), double(f))
C++ is funny like that. In C, the conversion from float to double is automatic. C++ thinks it's too cool for that.

EDIT:
In this case, C++ cannot convert automatically because qMin is a template and requires the same type for both parameters. The compiler does not know whether to convert them both to float or to double, so it gives up and throws a wobbly. I still think it should be smart enough to convert them both to the wider type, but as I say, C++ can be funny sometimes.

Thanks - double(f)) did the trick. I still couldn't get rpm to build, since the build was creating a /usr/lib.. directory in BUILDROOT iwhile the app needed a /usr/lib64... directory, but all the proper files were created, so I could easily copy manually. Any insight there would be appreciated, jist out of curiosity ...

pichlo 2021-07-08 06:55

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by levone1 (Post 1572271)
I still couldn't get rpm to build, since the build was creating a /usr/lib.. directory in BUILDROOT iwhile the app needed a /usr/lib64... directory, but all the proper files were created, so I could easily copy manually. Any insight there would be appreciated, jist out of curiosity ...

I haven't got the first idea. Have you tried asking Mr DuckDuckGo?

My naive guess would be that building it on a 32-bit architecture will always create a 32-bit RPM. On a 64-bit architecture you may have a choice. This looks promising, but I have not tried it myself.

levone1 2021-07-08 12:46

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by pichlo (Post 1572272)
I haven't got the first idea. Have you tried asking Mr DuckDuckGo?

My naive guess would be that building it on a 32-bit architecture will always create a 32-bit RPM. On a 64-bit architecture you may have a choice. This looks promising, but I have not tried it myself.

Thanks, I'll check it out... The error was file not found'. It was lookifor .../usr/lib64/..., but it created .../usr/lib..., which contained a 64-bit lib file.

levone1 2021-07-30 14:50

Re: Extra softwares in Sailfish using CLI, repositories, etc
 
Quote:

Originally Posted by pichlo (Post 1572272)
I haven't got the first idea. Have you tried asking Mr DuckDuckGo?

My naive guess would be that building it on a 32-bit architecture will always create a 32-bit RPM. On a 64-bit architecture you may have a choice. This looks promising, but I have not tried it myself.

How about this one ...

A cpp file has a section like this
Code:

void IpHeartBeatWatcher::run()
{
#ifdef SFOS
    handle_ = iphb_open(NULL);
    if (handle_ != NULL)
    {
        while ( doWatch_ )
        {
            time_t time = iphb_wait(handle_, 0, (2 * IPHB_GS_WAIT_10_MINS), 1);
            printf("%ld seconds since the epoch began\n", (long)time);
            printf("%s", asctime(gmtime(&time)));

            emit triggered();

And the make error says that
Code:

2 * IPHB_GS_WAIT_10_MINS
is 'not declared in this scope'.

I'm not even sure where the variable or the scope is... Seems like the IPBH_GS... line needs to be either declared before, or included in some other declaration, or...?

Thanks

(tried to get past it with a hack :
Code:

time_t seconds;
            seconds = time(NULL);
            printf("%ld seconds since the epoch began\n", (long)time);

but then it complained about ...gmtime(&time) in the next line, that it 'cannot convert' )


All times are GMT. The time now is 10:00.

vBulletin® Version 3.8.8