sailfish-spotify / hutspot

Spotify Controller for SailfishOS. Documentation: https://sailfish-spotify.github.io/hutspot.
MIT License
18 stars 12 forks source link

aarch64 no longer compiles, openssl differences? #116

Closed poetaster closed 2 years ago

poetaster commented 2 years ago
../hutspot/src/connect/spconnect.cpp: In constructor ‘SPConnect::SPConnect(QObject*)’:
../hutspot/src/connect/spconnect.cpp:41:17: error: invalid use of incomplete type ‘DH’ {aka ‘struct dh_st’}
     BN_rshift(dh->priv_key, dh->priv_key, 8);
                 ^~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/dh.h:17,
                 from ../hutspot/src/connect/spconnect.h:7,
                 from ../hutspot/src/connect/spconnect.cpp:1:
/usr/include/openssl/ossl_typ.h:106:16: note: forward declaration of ‘DH’ {aka ‘struct dh_st’}
 typedef struct dh_st DH;
                ^~~~~
../hutspot/src/connect/spconnect.cpp:41:31: error: invalid use of incomplete type ‘DH’ {aka ‘struct dh_st’}
     BN_rshift(dh->priv_key, dh->priv_key, 8);
                               ^~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/dh.h:17,
                 from ../hutspot/src/connect/spconnect.h:7,
                 from ../hutspot/src/connect/spconnect.cpp:1:
/usr/include/openssl/ossl_typ.h:106:16: note: forward declaration of ‘DH’ {aka ‘struct dh_st’}
 typedef struct dh_st DH;
                ^~~~~
../hutspot/src/connect/spconnect.cpp:44:12: error: invalid use of incomplete type ‘DH’ {aka ‘struct dh_st’}
     powm(dh->g, dh->priv_key, dh->p, dh->pub_key);
            ^~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/dh.h:17,
                 from ../hutspot/src/connect/spconnect.h:7,
                 from ../hutspot/src/connect/spconnect.cpp:1:
/usr/include/openssl/ossl_typ.h:106:16: note: forward declaration of ‘DH’ {aka ‘struct dh_st’}
 typedef struct dh_st DH;
Scarrough commented 2 years ago

I have been puzzling my way around the openssl changes from 1.0 to 1.1 and I have it compiling for arm7 but it fails at linking (like it doesn't find the openssl lib for some reason, barfs on BN_numbits, could be target specific). It is one file that changes, I can attach it here when I get home, could you let me know how you get on with it?

vitalii-koreniev commented 2 years ago

Unfortunately, I am too busy right now defencing from russion murderers.

Scarrough commented 2 years ago

That's a pretty solid reason. Hope you succeed.

Scarrough commented 2 years ago

I have this fixed and running on my phone. I am new to this so I am unsure how best to share this?

poetaster commented 2 years ago

I have this fixed and running on my phone. I am new to this so I am unsure how best to share this?

If you forked the repo on github, you would try a Pull Request. Did you just 'clone' or also do a fork?

Scarrough commented 2 years ago

Just cloned I'm afraid.

poetaster commented 2 years ago

Just cloned I'm afraid.

Well, you could fork it now and just copy over your changes. Commit 'em, push em and do a PR.

Of, if it's not too many changes, on too many files, just post them here. I could help.

Scarrough commented 2 years ago

2 files hutspot-changes.zip .

poetaster commented 2 years ago

Ok, I'll push them into my fork .... and see if I can give you credit somehow...

Scarrough commented 2 years ago

No worries, just trying to be helpful.

poetaster commented 2 years ago

2 files hutspot-changes.zip .

And a stupid question, did you test this with librespot as player? And, if so, on which architectures?

Scarrough commented 2 years ago

Yes, I built an rpm for the arm7 target, put it on my phone and checked it worked with Librespot on there. It behaved the same as it had before. I didn't have access to other archs with librespot installed, I checked it on the emulator (found a couple of stupid bugs like failing to use BN_new() on the public key declaration giving me a seg fault) and cleaned them up, but did not have a browser (for auth) or librespot on that VM.

poetaster commented 2 years ago

Yes, I built an rpm for the arm7 target, put it on my phone and checked it worked with Librespot on there. It behaved the same as it had before. I didn't have access to other archs with librespot installed, I checked it on the emulator (found a couple of stupid bugs like failing to use BN_new() on the public key declaration giving me a seg fault) and cleaned them up, but did not have a browser (for auth) or librespot on that VM.

Ok, cool. That's a good basis. I just don't use spotify, let alone some prime service, so I can't test this. But I can note that and push it to chum to see if other people can use it.

poetaster commented 2 years ago

Fixed with: https://github.com/sailfish-spotify/hutspot/commit/77e536ae3ecd97e8ca84832e80ae5bfe710f3fff