Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross compile with mingw #62

Closed
iltommi opened this issue Jan 26, 2018 · 3 comments
Closed

cross compile with mingw #62

iltommi opened this issue Jan 26, 2018 · 3 comments

Comments

@iltommi
Copy link

iltommi commented Jan 26, 2018

I'm trying to cross compile using mingw and I get an error when compiling

[  3%] Building CXX object CMakeFiles/PythonQt.dir/src/PythonQt.cpp.obj
/usr/bin/i686-w64-mingw32-g++  -DPYTHONQT_EXPORTS -DPYTHONQT_SUPPORT_NAME_PROPERTY -DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK -DPYTHONQT_WRAP_Qtcore -DPYTHONQT_WRAP_Qtgui -DPYTHONQT_WRAP_Qtnetwork -DPYTHONQT_WRAP_Qtopengl -DPYTHONQT_WRAP_Qtqml -DPYTHONQT_WRAP_Qtquick -DPYTHONQT_WRAP_Qtsql -DPYTHONQT_WRAP_Qtsvg -DPYTHONQT_WRAP_Qtuitools -DPYTHONQT_WRAP_Qtxml -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_QML_LIB -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB @CMakeFiles/PythonQt.dir/includes_CXX.rsp -std=gnu++11 -o CMakeFiles/PythonQt.dir/src/PythonQt.cpp.obj -c /mnt/local/src/neutrinoMaster/PythonQt/src/PythonQt.cpp
/mnt/local/src/neutrinoMaster/PythonQt/src/PythonQt.cpp:1951:10: fatal error: private/qmetaobjectbuilder_p.h: No such file or directory
 #include <private/qmetaobjectbuilder_p.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/PythonQt.dir/build.make:164: CMakeFiles/PythonQt.dir/src/PythonQt.cpp.obj] Error 1
make[2]: Leaving directory '/mnt/local/src/neutrinoMaster/PythonQt/cross'
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/PythonQt.dir/all] Error 2
make[1]: Leaving directory '/mnt/local/src/neutrinoMaster/PythonQt/cross'
make: *** [Makefile:130: all] Error 2

I bet you already run into this since : https://github.com/commontk/PythonQt/blob/patched-8/CMakeLists.txt#L154

but in my case the variable ${Qt5Core_PRIVATE_INCLUDE_DIRS} is empty

qmetaobjectbuilder_p.h is located here:

/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore/5.9.3/QtCore/private/qmetaobjectbuilder_p.h

@jcfr
Copy link
Member

jcfr commented Jan 26, 2018

trying to cross compile using mingw

You could look at the dockcross/windows-x64 image, it also provides a toolchain file.

PS: Currently in an airport, I can not download the docker image to experiment.

but in my case the variable ${Qt5Core_PRIVATE_INCLUDE_DIRS} is empty

That said, you could try to explicitly set the variable configuring with -DQt5Core_PRIVATE_INCLUDE_DIRS:PATH=/usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore/5.9.3/QtCore

@jcfr jcfr changed the title cross compile cross compile with mingw Jan 26, 2018
@iltommi
Copy link
Author

iltommi commented Jan 26, 2018

I did set up something similar with docker https://hub.docker.com/r/iltommi/neutrino-docker-cross
for my project (which compiles my pythonqt fork)

it's fedora based (which has a lot of pre-built mingw packages)

@iltommi
Copy link
Author

iltommi commented Jan 26, 2018

ok I understand that you included more recent input from sourceforge mai tree.

I got your tree compiled with

mingw32-cmake .. -DQt5_DIR=/usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/Qt5 -DPythonQt_Wrap_QtAll=TRUE -DCMAKE_CXX_FLAGS='-isystem /usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore/5.9.3/QtCore -isystem /usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore/5.9.3'

thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants