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

Cannot able to Build #169

Open
GunaMyCom opened this issue Nov 11, 2024 · 1 comment
Open

Cannot able to Build #169

GunaMyCom opened this issue Nov 11, 2024 · 1 comment

Comments

@GunaMyCom
Copy link

@OlivierLDff

2:29:56: Starting: "C:\Qt\Tools\CMake_64\bin\cmake.exe" --build C:/Users/anjan/OneDrive/Documents/SmartPOS/build/Desktop_Qt_6_7_0_MinGW_64_bit-Debug --target all
[1/158 0.0/sec] Building CXX object _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj
FAILED: _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj
C:\Qt\Tools\mingw1120_64\bin\g++.exe -DMINGW_HAS_SECURE_API=1 -DQATERIAL_STATIC -DQATERIAL_VERSION_MAJOR=1 -DQATERIAL_VERSION_MINOR=5 -DQATERIAL_VERSION_PATCH=1 -DQATERIAL_VERSION_TAG=70040fe -DQATERIAL_VERSION_TAG_HEX=0x70040fe -DQOLM_STATIC -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_OPENGL_LIB -DQT_QMLBUILTINS_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_XML_LIB -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -IC:/Users/anjan/OneDrive/Documents/SmartPOS/build/Desktop_Qt_6_7_0_MinGW_64_bit-Debug/_deps/qaterial-build/Qaterial_autogen/include -IC:/Users/anjan/OneDrive/Documents/SmartPOS/build/Desktop_Qt_6_7_0_MinGW_64_bit-Debug/_deps/qaterial-src/src -IC:/Users/anjan/OneDrive/Documents/SmartPOS/build/Desktop_Qt_6_7_0_MinGW_64_bit-Debug/_deps/qaterial-build/Qaterial_icons -IC:/Users/anjan/OneDrive/Documents/SmartPOS/build/Desktop_Qt_6_7_0_MinGW_64_bit-Debug/_deps/qolm-src/include -isystem C:/Qt/6.7.0/mingw_64/include/QtCore -isystem C:/Qt/6.7.0/mingw_64/include -isystem C:/Qt/6.7.0/mingw_64/mkspecs/win32-g++ -isystem C:/Qt/6.7.0/mingw_64/include/QtQml -isystem C:/Qt/6.7.0/mingw_64/include/QtQmlIntegration -isystem C:/Qt/6.7.0/mingw_64/include/QtQmlBuiltins -isystem C:/Qt/6.7.0/mingw_64/include/QtNetwork -isystem C:/Qt/6.7.0/mingw_64/include/QtGui -isystem C:/Qt/6.7.0/mingw_64/include/QtSvg -isystem C:/Qt/6.7.0/mingw_64/include/QtXml -isystem C:/Qt/6.7.0/mingw_64/include/QtQuick -isystem C:/Qt/6.7.0/mingw_64/include/QtQmlModels -isystem C:/Qt/6.7.0/mingw_64/include/QtOpenGL -isystem C:/Qt/6.7.0/mingw_64/include/QtQuickControls2 -isystem C:/Qt/6.7.0/mingw_64/include/QtCore5Compat -DQT_QML_DEBUG -g -fdiagnostics-color=always -Winvalid-pch -include C:/Users/anjan/OneDrive/Documents/SmartPOS/build/Desktop_Qt_6_7_0_MinGW_64_bit-Debug/_deps/qaterial-build/CMakeFiles/Qaterial.dir/cmake_pch.hxx -MD -MT _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj -MF _deps\qaterial-build\CMakeFiles\Qaterial.dir\Unity\unity_1_cxx.cxx.obj.d -o _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj -c C:/Users/anjan/OneDrive/Documents/SmartPOS/build/Desktop_Qt_6_7_0_MinGW_64_bit-Debug/_deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx
C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/as.exe: _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj: too many sections (39728)
C:\Users\anjan\AppData\Local\Temp\ccjAJV6i.s: Assembler messages:
C:\Users\anjan\AppData\Local\Temp\ccjAJV6i.s: Fatal error: can't write 66 bytes to section .text of _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj: 'file too big'
C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/as.exe: _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj: too many sections (39728)
C:\Users\anjan\AppData\Local\Temp\ccjAJV6i.s: Fatal error: _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj: file too big
ninja: build stopped: subcommand failed.
12:30:29: The process "C:\Qt\Tools\CMake_64\bin\cmake.exe" exited with code 1.
Error while building/deploying project SmartPOS (kit: Desktop Qt 6.7.0 MinGW 64-bit)
When executing step "Build"

@OlivierLDff
Copy link
Owner

Disclaimer: I have no experience with MinGW.

The error is : Fatal error: can't write 66 bytes to section .text of _deps/qaterial-build/CMakeFiles/Qaterial.dir/Unity/unity_1_cxx.cxx.obj: 'file too big'

You could try to disable unity build with cmake -DQATERIAL_ENABLE_UNITY_BUILD=OFF.

I don't have the environment to replicate but the fix should be something like:

if (MINGW)
   target_compile_options(Qaterial PRIVATE "-Wa,-mbig-obj")
 endif()

Tell me if this work, you can open a PR to fix it if you can replicate the error in the CI. Otherwise I do not wish to support what we don't have CI env for.

Have a nice day

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

No branches or pull requests

2 participants