Building Qt 5.3.0 ios with SSL
-
Hi everybody,
I have a qt5.2.1 version compiled successfully with ssl support but because of the new features of 5.3 I need to compile this with support for SSL, I tried to with these commands:
OPENSSL_LIBS='-L/Users/devUser/openssl_IOS/lib -lssl -lcrypto' ./configure -openssl-linked -developer-build -opensource -nomake examples -nomake tests -xplatform macx-ios-clang -confirm-license -platform macx-clang
OPENSSL_LIBS='-L/Users/devUser/openssl_IOS/lib -lssl -lcrypto' ./configure -openssl-linked -developer-build -opensource -nomake examples -nomake tests -xplatform macx-ios-clang -confirm-license -debug-and-release -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -no-warnings-are-errors
always I get the error
ndefined symbols for architecture armv7:
"std::ios_base::Init::~Init()", referenced from:after this I tried to find out the reason and I believe that the problem is related to C++11 support. so I tried both command above adding "-c++11" this doesnt work.
after this, I tried to install the precompiled packed. When I try to compile the project with this it complains as is expected about QSslSockets and QSslerror.
I tried everything for 2 days and it did not works.
So please if somebody has a clue I will be very gratefull
-
Hi,
Do you already have a statically built OpenSSL for ARM ?
-
yes, It is the same that I used to compiled the QT 5.2.1
-
I tried it again with these command, but this time from git:
git clone git://gitorious.org/qt/qt5.git qt5
cd qt5
git checkout stableperl init-repository --no-webkit
OPENSSL_LIBS='-L/Users/DevUser/openssl_IOS/lib -lssl -lcrypto' ./configure -openssl-linked -developer-build -opensource -nomake examples -nomake tests -xplatform macx-ios-clang -confirm-license -debug-and-release -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -no-warnings-are-errors -c++11 -platform macx-clang
make -j4
It compiles succesfully but :
The result when i compile the project:
Undefined symbols for architecture armv7:
"std::ios_base::Init::~Init()", referenced from:
__GLOBAL__I_a in libToolAPI-1.6.1.a(AE_AudioPlayerAndRecorder.o)
__GLOBAL__I_a in libTool2API-2.0.1.a(Reader_FskController.o)
__GLOBAL__I_a in libTool2API-2.0.1.a(Reader_WavBuffer.o)
__GLOBAL__I_a in llibToolAPI-1.6.1.a(AE_WavBuffer.o)
__GLOBAL__I_a in libTool2API-2.0.1.aAE_ManchesterRealTimeDecoder.o)
__GLOBAL__I_a in libToolAPI-1.6.1.a(AE_ManchesterRealTimeDecoder.o)
__GLOBAL__I_a in libTool2API-2.0.1.a(AE_ManchesterState.o)
...
"std::ios_base::Init::Init()", referenced from:
__GLOBAL__I_a in libToolAPI-1.6.1.a(AE_AudioPlayerAndRecorder.o)
__GLOBAL__I_a in libTool2API-2.0.1.a(Reader_FskController.o)
__GLOBAL__I_a in libTool2API-2.0.1.a(Reader_WavBuffer.o)
__GLOBAL__I_a in libToolAPI-1.6.1.a(AE_WavBuffer.o)
__GLOBAL__I_a in libTool2API-2.0.1.a(AE_ManchesterRealTimeDecoder.o)
__GLOBAL__I_a in llibToolAPI-1.6.1.a(AE_ManchesterRealTimeDecoder.o)
__GLOBAL__I_a in libTool2API-2.0.1.a(AE_ManchesterState.o)
...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)make[1]: *** [iphoneos-release] Error 65
make: *** [release-iphoneos] Error 2
11:52:49: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Product1 (kit: iphoneos-clang Qt 5.3.0ssl))
When executing step 'Make', it still didnt work :(
-
just I want to highligh that in the version 5.2.1 it works with no problem
-
It seems that it's you are missing a symbol from the stdc++ library
-
Thanks SGaist, that was also my guess, can you give me any suggestion or do you see any mistake?
-
Wait, I may have missed something. Are you saying that your project fails to build with your custom version of Qt 5.3 ?
-
yes, exactly.
When I try to compile my project with any of the many different customs versions I have built of 5.3.0 it fails as you can see above.
But with a version 5.2.1 that I also built before it works.
-
Just to rule out the obvious, did you rebuild your project from scratch ?
-
yes, after building I tried to make clean and recompile, also, erase the building folder of my project even try to compile from Xcode.
Exact the same behavior
-
SGaist did you do this operation before?
or do you know where should I start looking because at this moment I am really lost -
I've not yet built 5.3 completely from scratch (I've updated it regularly from git so it might be something subtle).
What I'm wondering is where do you the wrong lib since AFAIK, the mkspecs haven't changed.
I'll do a clean build later
-
SGaist. Any advance on this?
-
The error you are getting is not a bug, you have c++11 activated, this means that you have to use libc++ and you can't mix it with libstdc++.
-
So. The answer should be -no-c++11.
-
Or (if it is a possibility) rebuild your dependencies to also use libc++
-
Thanks very much SGaist. Sadly recompile the libraries is not in the menu. So I will disable the c++11. And i will try it on monday.