Hello guys,
I wrote a simple application on Qt 5.6 (I use this specific version because it's working on old Linux and Windows versions too). I already done static compilation for Linux and Windows, and now trying to build it for BSD systems and didn't succeed.
My aim is to create fully statical build which help me to create portable GUI application for BSD systems with desktop (FreeBSD and GhostBSD, for example). Since I'm newbie to BSD systems, it's quite difficult for me.
What I did (on FreeBSD 14.0):
So, when I use latest GCC version (probably it's 12), I got an error:
When I use other GCC versions (from 4.8 to 10) I have an error:
Questions:
1) Is it possible to compile Qt 5.6 (or other versions) on FreeBSD without any source code fixing?
2) If answer to previous question is Yes. Probably now I need to switch to ports and try to build all requirements myself? If so, do I need to switch to specific quarterly branch on ports?
3) Maybe there are some ways to statically compile Qt apps on FreeBSD on other Qt version compatible with Qt 5? If so, I can consider building on another version.
I would be happy to get any advices. Thanks!
I wrote a simple application on Qt 5.6 (I use this specific version because it's working on old Linux and Windows versions too). I already done static compilation for Linux and Windows, and now trying to build it for BSD systems and didn't succeed.
My aim is to create fully statical build which help me to create portable GUI application for BSD systems with desktop (FreeBSD and GhostBSD, for example). Since I'm newbie to BSD systems, it's quite difficult for me.
What I did (on FreeBSD 14.0):
Code:
pkg install git gcc9
ln -s /usr/local/bin/gcc9 /usr/local/bin/gcc
ln -s /usr/local/bin/g++9 /usr/local/bin/g++
pkg install perl5-5.36.3_1
pkg install -g libxcb* libX11*
git clone -b 5.6 https://code.qt.io/qt/qt5.git
mv qt5 Qt-5.6
cd Qt-5.6
git clone -b 5.6 https://code.qt.io/qt/qtbase.git
./configure -prefix "/usr/local/Qt-5.6-release" -static -platform freebsd-g++ -release -opensource -confirm-license -fontconfig -system-freetype -no-cups -no-dbus -no-gif -no-iconv -no-icu -no-opengl -no-openssl -no-openvg -no-qml-debug -no-sql-sqlite -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-xcb -qt-xkbcommon-x11 -qt-zlib -nomake examples -nomake tests
make
So, when I use latest GCC version (probably it's 12), I got an error:
Code:
sorry, unimplemented: PCH allocation failure
Code:
internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report, with preprocessed source if appropriate.
Questions:
1) Is it possible to compile Qt 5.6 (or other versions) on FreeBSD without any source code fixing?
2) If answer to previous question is Yes. Probably now I need to switch to ports and try to build all requirements myself? If so, do I need to switch to specific quarterly branch on ports?
3) Maybe there are some ways to statically compile Qt apps on FreeBSD on other Qt version compatible with Qt 5? If so, I can consider building on another version.
I would be happy to get any advices. Thanks!