haiwen / seafile-client

Seafile desktop client.
http://seafile.com
Apache License 2.0
471 stars 279 forks source link

seafile-client (-gui) does not build with openssl >= 1.1 #853

Closed christmart closed 6 years ago

christmart commented 7 years ago

-o CMakeFiles/utils.dir/src/utils/rsa.cpp.o -c /tmp/buildd/seafile-client-6.0.1+git20161227.7b0b837/src/utils/rsa.cpp In file included from /usr/include/openssl/asn1.h:24:0, from /usr/include/openssl/objects.h:916, from /usr/include/openssl/evp.h:27, from /usr/include/openssl/pem.h:16, from /tmp/buildd/seafile-client-6.0.1+git20161227.7b0b837/src/utils/rsa.cpp:1: /tmp/buildd/seafile-client-6.0.1+git20161227.7b0b837/src/utils/rsa.cpp: In function 'GString {anonymous}::public_key_to_gstring(const RSA)': /tmp/buildd/seafile-client-6.0.1+git20161227.7b0b837/src/utils/rsa.cpp:45:33: error: invalid use of incomplete type 'const RSA {aka const struct rsa_st}' gsize len = BN_num_bytes(rsa->n);

Building against openssl < 1.1 works.

openpaul commented 7 years ago

Have the same problem on debian testing building from source using

.cmake .
make

throws errors of type:

[  1%] Building CXX object CMakeFiles/utils.dir/src/utils/rsa.cpp.o
In file included from /usr/include/openssl/asn1.h:24:0,
                 from /usr/include/openssl/objects.h:916,
                 from /usr/include/openssl/evp.h:27,
                 from /usr/include/openssl/pem.h:16,
                 from /home/newram/software/seafile-client/src/utils/rsa.cpp:1:
/home/.../software/seafile-client/src/utils/rsa.cpp: In function ‘GString* {anonymous}::public_key_to_gstring(const RSA*)’:
/home/.../software/seafile-client/src/utils/rsa.cpp:45:33: error: invalid use of incomplete type ‘const RSA {aka const struct rsa_st}’
     gsize len = BN_num_bytes(rsa->n);
....
killing commented 7 years ago

Thanks for reporting. We're going to fix it soon.

killing commented 7 years ago

Hi @christmart

A similar problem has been fixed in ccnet project (https://github.com/haiwen/ccnet/commit/445b72e52895431d02f5f6380a773409c689d8ea). But even though we can fix it in seafile-client project too, it may not be desirable to compile with libssl 1.1 on debian 9. Since Qt library still depends on libssl 1.0 version, it'll result in seafile-applet linking with two versions of libssl, which could introduce problems.

christmart commented 7 years ago

seafile-client on Debian sid builds against libssl1.0 for now

paolostivanin commented 7 years ago

EDIT: openssl-1.1.0 just landed on the archlinux stable repo!

paolostivanin commented 7 years ago

@killing any plan on releasing a version compatible with openssl 1.1?

macandchief commented 6 years ago

I have the desktop client (seafile-gui) from the debian repos. When trying to "sync this library to" a local library, I receive the following message:

"Failed to add download task: Don't support syncing old version libraries"

I'm not sure what it is about. Client is 6.0.6.

shoeper commented 6 years ago

In Seafile 3.x a new library format was introduced. Since something around client version 6 syncing libraries in the old library format is not supported anymore.

macandchief commented 6 years ago

Thank you for the hint @shoeper.

Unfortunately I'm not sure what the "old library format" means and where to change it (did not find something like that under "Settings" and am not familiar with using Seafile).

shoeper commented 6 years ago

It cannot be changed. Libraries created before version 3.x have the old format, libraries created with 3.x and later have the new format. Only the new format supports http/s synchronization.

Only official way to upgrade the library is to download it and reupload it to a new library. The unofficial solution is a haskell script someone wrote that can convert a library from the old to the new format.

shoeper commented 6 years ago

See https://github.com/haiwen/seafile/issues/975#issuecomment-329775129 for more information.

macandchief commented 6 years ago

I see, thank you.

I'm afraid I did not describe properly my situation: Just created a seafile.net account and installed seafile-gui from the debian repos. In the online account I deleted all libraries now (there was one called My Libraries or something like that). Created a new library there called "Tosync" and tried to sync it to a local folder but I still get the error message. I'm just mentioning it because anyone gives a try to seafile using a seafile.net account might experience this issue. So I don't have any "old stuff" or old libraries, just wanting to see how the seafile client works. Even if I delete everything in the online account and choose "select" on the seafile-gui in order to add a library to sync, I receive the same error message.

shoeper commented 6 years ago

Seafile.net is some inofficial site providing a very old Seafile version.

You can use an older client instead or even better use another service as at least I don't think seafile.net is that trustworthy.

macandchief commented 6 years ago

Ok, I get it now, thank you. I would not like to install an older client and unfortunately seafile.net is the only hosting provider offering a free plan (as I cannot use ocloud and seacloud.cc does not offer it anymore). It's a bit of a disadvantage for seafile as e.g. for nextcloud or owncloud there are plenty free hosting offers, so it's possible to test the client and the service in the long run. I really liked the seafile client, would be great to have the opportunity to test it for a while before investing in a hosting offer.

shoeper commented 6 years ago

@macandchief https://app.syncwerk.de/accounts/login/?next=/ also offers free accounts with up to 1 GB. They run Seafile 5.x. Currently they have some issues but they should vanish within the next few days.

marcusmysc commented 6 years ago

Yep, 1 day of downtime in the last 30 days.

macandchief commented 6 years ago

@shoeper Great, thank you for the suggestion, will give it a try!

christmart commented 6 years ago

seafile-client 6.1.3 still does not build with openssl 1.1. Do you have a fix?

christmart commented 6 years ago

See also https://github.com/haiwen/seafile-client/pull/940

killing commented 6 years ago

We'll fix the build issue asap.

killing commented 6 years ago

This has been fixed on master.