Qt source build on mac
Hi Every one,
I'm new to Mac and Qt. can you please help me to build the qt source in mac. I have go through the forums but i could not get correct instructions.
I have fresh Macbook pro with qt5.5 source. Please advise me..
Thanks in advance.
@jsulm Thanks for your reply.
I have followed the intructions, it configures successfully without -icu, but if i enable -icu it throws error as follows.
icu library support cannot be enabled
then configure failed.
I have downloaded ICU and set include and lib path.
I have set macx-g++ in QMAKESPEC
I need to build qt source for x64 in mac. Is it correct QMAKESPEC?
@Shidharth I'm not mac expert, but as far as I know GCC (g++) is not the official compiler anymore. CLang is the correct compiler (delivered with XCode).
You can try to pass -v parameter to configure and check what exactly is wrong with icu.
@jsulm Thank you, I have checked with -v parameter, it shows the below error msg.
Undefined symbols for architecture x86_64:
"_ucol_close_49", referenced from:
_main in icu.o
"_ucol_open_49", referenced from:
_main in icu.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [icu] Error 1
The ICU library support cannot be enabled.
Are you locked to using Qt 5.5 ?
@SGaist yes, we already built qt5.5 on windows. So, we are using the same version in mac x64 too..
But the above linker error blocked us to proceed. Can you help me to resolve this?
How did you install ICU ? And by the way, do you really need it ?
Hi.. i work 10 years on mac .. my best method to install qt is follow.
1- Xcode https://developer.apple.com/xcode/
2- mac port https://www.macports.org/install.php
3- port install a+ qt4-mac b+ qt5-qtbase
4- to have dependencies on board ... rename qt4 qmake to qmake4 && qt5 to qmake5 & remove all from PATH -> .bash_profile
inside .bash_profile you make a alias
qmake only write a Makefile like cmake..
now you can get all patch to mac inside file
at end build the real source...
on wiki mac is not the best doc
in this way you have 3 version from qt sure one that works....
without patch I have never been able to build qt5
& on qtcreator setting all version you have in box...
@patrik08 Here's the configure line I use on my mac for 5.5:
./configure -opensource -qt-sql-sqlite -release -platform macx-g++ -confirm-license -nomake examples -nomake tests -icu -L/usr/local/lib -I/usr/local/include -licuuc -licui18n
My icu is built and installed in /usr/local.
Fine i have only Xcode 7.3.1 not 8...
Xcode 8 is not support on ElCapitan... 10.11
macOS Sierra 10.12 update is to slow i have look in other mac box..