probonopd / linuxdeployqt

Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
Other
2.2k stars 409 forks source link

How can I pack ‘libssl-dev’ into the App? #219

Open omgredfog opened 6 years ago

omgredfog commented 6 years ago

WizQTClient use linuxdeployqt to make 「wiznote.AppImage」,I had make it successfully,but this app need 「libssl-dev」to connect to its server ,If there is not 「libssl-dev」in my system,I can't use it.

This is libssl-dev:

libssl-dev

filelist

I have mkdir ‘include’ and 'lib' by add some statements,then, it mkdir and copy all files to the Package,but, the 'lib' and 'include' files don't work.

So , if I want the Package correctly identified the 'lib' and 'include' and use them ,just like the system's 'lib' and 'include',what should i do ?

TheAssassin commented 6 years ago

*-dev packages contain files used to develop and compile applications, and are not needed for running them. What you most likely would want to do is bundle libssl.so.1.0.0, which is provided by the package libssl1.0.0. But, actually, if your application is using it, linuxdeployqt should recognize this dependency and bundle it.

All of the above is just pure speculation, though. Without additional data, we can't really help you. What's the exact error? Does the application show an error message? Make screenshots, and post them here, please.

omgredfog commented 6 years ago

@TheAssassin

Thank you ,This app named 'wiznote' :WizQTClient

I package it correctly ,this is my package :

wiz.AppImage

When I run it , the erro will appear:

but , when i install ‘libssl-dev’,Error message will disappear

i7@pc:~$ ./wiznote2.5.9 [DEBUG] set server : "http://api.wiz.cn/" [WARNING]: QSslSocket: cannot resolve CRYPTO_num_locks ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve CRYPTO_set_id_callback ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve CRYPTO_set_locking_callback ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve ERR_free_strings ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve EVP_CIPHER_CTX_init ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve sk_new_null ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve sk_push ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve sk_free ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve sk_num ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve sk_pop_free ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve sk_value ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSL_library_init ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSL_load_error_strings ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSL_get_ex_new_index ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSLv3_client_method ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSLv23_client_method ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSLv3_server_method ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSLv23_server_method ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve X509_STORE_CTX_get_chain ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSLeay ((null):0, (null)) [WARNING]: QSslSocket: cannot resolve SSLeay_version ((null):0, (null)) [WARNING]: Incompatible version of OpenSSL ((null):0, (null)) [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [WARNING]: QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once. ((null):0, (null)) [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [WARNING]: QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once. ((null):0, (null)) [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : "" [INFO] Failed to exec json request, network error=99, message=, url=https://as.wiz.cn/as/user/login?clientType=macos&clientVersion=2.5.9&apiVersion=10 [DEBUG] old server "" [DEBUG] new server "" [DEBUG] on tonken acquired : ""

TheAssassin commented 6 years ago

when i install ‘libssl-dev’

Then this package also installs a dependency which fixes your problems. I assure you it's not the dev package which fixes your issues.

probonopd commented 6 years ago

So, what happens if you do not install libssl-dev but do install libssl?

Which OS are you on?

omgredfog commented 6 years ago

@probonopd

This problem only appeared on the Deepin Linux, which was based on Debian,and I tried to pack wiznote on the Ubuntu 16.04, and I found that this problem did not exist. Although I didn't understand the details, I didn't modify the code of wiznote, so i conjecture it was the linuxdeployqt's problem,it doesn't work correctly on Deepin Linux,such as, some dependencies were not identified.

omgredfog commented 6 years ago

The libssl has been installed in my Deepin Linux 15.5, but I must install the libssl-dev for this app。

I feel very strange about this. Now I've packed a new one on Ubuntu16.04, it runs on other computers perfectly

TheAssassin commented 6 years ago

Maybe use Ubuntu for packaging then? Build services like Travis offer you to do so with every new commit automatically. And it's always better to automate such packaging processes, to be able to reproduce builds.

TheAssassin commented 6 years ago

Possibly related to https://github.com/probonopd/linuxdeployqt/issues/221#issuecomment-360703632.

probonopd commented 6 years ago

Ubuntu 16.04, it runs on other computers perfectly

Most likely it will fail on 14.04 which is still a supported version. Please use that one for building. Thanks.

omgredfog commented 6 years ago

@probonopd

Do you mean you can't run on ubuntu14.04 or can't pack it? I've been very familiar with the packing process of wiznote, and I can verify it as you have indicated.

Packed by ubuntu16.04: https://pan.stnts.com/s/LvJRqln

TheAssassin commented 6 years ago

You can't run AppImages built on newer releases on older releases. Hence, if you bundle on 16.04, it will most likely not run on 14.04.

omgredfog commented 6 years ago

@TheAssassin

Thank you , I will have a try

probonopd commented 6 years ago

Yes, please build on 14.04.

cognition9144 commented 6 years ago

I also encounter this problem when using WizNote. I extracted the libssl1.0-dev into the AppImage, and even made a link from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 to /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 in the AppImage which should have redirected the newer so file to the older one. However, it didn't work before I removed libssl1.0-dev and installed libssl1.0.0 mutually (I already have libssl1.0.0 installed before that). Installing libssl1.0.0 was supposed to do nothing, but it did do some magic.

So I'm curious about why just copying files didn't work? Does the files in the system have higher priorities than those in the AppImage?

probonopd commented 6 years ago

If the library cannot be found in the AppImage (e.g., because it is in a location that is not searched for libraries), then the system falls back to loading the system one. If you run with LD_DEBUG=libs ./Your.AppImage, then you can see what is going on.