0

I installed Qt 4.8 from developer.nokia website which is a .run file. Because it's from nokia i assume the libraries are compiled with openssl... I use ubuntu 11.10 and it has openssl already installed. I can't make the QSsl classes working because of this, what am i doing wrong?

Anyone know a proper Qt SDK 4.8 that works fine?

Thanks!

Jacob Krieg
  • 2,834
  • 15
  • 68
  • 140

2 Answers2

2
 export QTDIR=/home/user/qtsdk-2010.05/
 export PATH=$QTDIR/bin:$QTDIR/qt/bin:$PATH
 export LD_LIBRARY_PATH=/home/user/qtsdk-2010.05/lib/:/home/user/qtsdk-2010.05/qt/lib/:$LD_LIBRARY_PATH

please change qtsdk-2010.05 to your sdk path

and make sure the binary path and lib is correct, then qmake ,make clean , make

camino
  • 10,085
  • 20
  • 64
  • 115
  • but i don't use qt commercial. I installed the free qt version – Jacob Krieg Mar 09 '13 at 23:59
  • free version is ok , just change the binary path and lib path to your own sdk, then qmake ,make clean , make – camino Mar 10 '13 at 00:01
  • I have replace the commercial with another version – camino Mar 10 '13 at 00:09
  • still doesn't work... `QSslSocket::supportsSsl()` still returns false... :( – Jacob Krieg Mar 10 '13 at 00:13
  • what is the output of: ldd your_binary_file |grep qt -i ? – camino Mar 10 '13 at 00:17
  • i get nothing: `a@ubuntu:~/Downloads$ ldd QtSdk-offline-linux-x86_64-v1.2.1.run | grep qt -i ` `a@ubuntu:~/Downloads$ ` – Jacob Krieg Mar 10 '13 at 00:19
  • your_binary_file should be the executable file of your own application ,not QtSdk-offline-linux-x86_64-v1.2.1.run. For example ldd myapp |grep qt -i – camino Mar 10 '13 at 00:22
  • first line: `libQtGui.so.4 => /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtGui.so.4 (0x00007fdea84be000)` second line: `libQtNetwork.so.4 => /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtNetwork.so.4 (0x00007fdea8163000)` third line: `libQtCore.so.4 => /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 (0x00007fdea7c6f000)` – Jacob Krieg Mar 10 '13 at 00:26
  • how about ldd your_binary_file |grep ssl -i ? – camino Mar 10 '13 at 00:37
  • maybe you can goto http://qt.digia.com/ to get qt5.0.0 and give a try ,you can get a 30 day license . – camino Mar 10 '13 at 00:43
  • i'm willing to create a ssl connection between a client and a server using qsslsocket and i think qt 5 has some bugs because it makes the connection crash. I tested on a qt 4.8 on a friend computer on mac and linux and works fine. qt5 crashes. I'm talking about this example: `https://github.com/dgraves/QSslChat` – Jacob Krieg Mar 10 '13 at 00:52
  • another solution is to edit you pro file , add "LIBS += -Wl,-rpath, /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/", then make clean ,qmake,make; let's see whether it can work or not – camino Mar 10 '13 at 00:58
  • i get `:-1: error: cannot find /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/: File format not recognized` :( – Jacob Krieg Mar 10 '13 at 01:02
  • /home/a/.QtSDK/ is your install path right? is there any file inside /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/? – camino Mar 10 '13 at 01:05
  • it should be QMAKE_LFLAGS += -Wl,-rpath, /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib – camino Mar 10 '13 at 01:12
  • File format not recognized? how about the output of "file /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtNetwork.so.4" – camino Mar 10 '13 at 01:18
  • error is: `:-1: error: cannot find /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib: File format not recognized` output of the command you suggested is `/home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtNetwork.so.4: symbolic link to `libQtNetwork.so.4.8.1' ` – Jacob Krieg Mar 10 '13 at 01:22
  • please check the result of "file /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtNetwork.so.4.8.1" – camino Mar 10 '13 at 01:26
  • `/home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtNetwork.so.4.8.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped ` – Jacob Krieg Mar 10 '13 at 01:30
  • please change "QMAKE_LFLAGS += -Wl,-rpath, /home/a...." to QMAKE_RPATHDIR += /home/a/.QtSDK/Desktop/Qt/4.8.1/gcc/lib and give a try – camino Mar 10 '13 at 01:35
  • this time code compiles but `QSslSocket::supportsSsl()` still returns false :( – Jacob Krieg Mar 10 '13 at 01:40
  • does this command works in your computer "openssl s_client -connect www.paypal.com:443" – camino Mar 10 '13 at 01:46
  • no, it has `QT += core gui network` but i tried also to add widgets and it still does not recognize ssl – Jacob Krieg Mar 10 '13 at 01:56
  • qt += core gui network is ok, "I tested on a qt 4.8 on a friend computer on mac and linux and works fine" do you mean the same sdk (qt4.8.1)works fine on other linux machine ? – camino Mar 10 '13 at 02:07
  • you can use "strace ./your_app_name >& 1.log" to check whether ssl lib is missing , I guess your /lib/i386-linux-gnu/libssl.so.1.0.0 is missing – camino Mar 10 '13 at 02:23
  • if so,please reinstall it using "sudo apt-get --reinstall install libssl1.0.0" – camino Mar 10 '13 at 02:31
  • thank you very much for your help. libssl1.0.0 was already installed. I solved the problem installing `qt-sdk` from the repos. I have no idea why the sdk from nokia's website is not working well. I also tried sudo `apt-get --reinstall install libssl1.0.0`. If you have other ideas please share, maybe someone encounters the same problem and we can help. – Jacob Krieg Mar 13 '13 at 10:09
0

Solved the problem installing qt-sdk from the repositories.

sudo apt-get install qt-sdk

A newer version of the Qt Creator can be found on qt-project.org

However for Ubuntu 11.10 Qt 4.7 will be installed and not 4.7. Qt 4.8 is available on the newer Ubuntu versions' repositories.

Jacob Krieg
  • 2,834
  • 15
  • 68
  • 140