Skip to content

em++.bat emcc.bat and other bat files do not support for very long command line on windows. #26229

Open

Description

@lygstate

Please include the following in your bug report:

Version of emscripten/emsdk:

Please include the output `emcc -v` here
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.7 (8dc91db45bf96c174531006839472a3924d105aa)
clang version 21.0.0git (https:/github.com/llvm/llvm-project 57025b42c43b2f14f7e58692bc19cd53d1b8a45e)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: D:\CI-Tools\emsdk\upstream\bin

Failing command line in full:
If this is compile or link-time failure please include the full failing command
along with its entire output.

FAILED: [code=1] qtquick3dphysics/src/3rdparty/PhysX/BundledPhysX_autogen/timestamp qtquick3dphysics/src/3rdparty/PhysX/BundledPhysX_autogen/mocs_compilation.cpp D:/work/xtal-wasm/build-wasm/qtquick3dphysics/src/3rdparty/PhysX/BundledPhysX_autogen/timestamp D:/work/xtal-wasm/build-wasm/qtquick3dphysics/src/3rdparty/PhysX/BundledPhysX_autogen/mocs_compilation.cpp 
C:\WINDOWS\system32\cmd.exe /C "cd /D D:\work\xtal-wasm\build-wasm\qtquick3dphysics\src\3rdparty\PhysX && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_autogen D:/work/xtal-wasm/build-wasm/qtquick3dphysics/src/3rdparty/PhysX/CMakeFiles/BundledPhysX_autogen.dir/AutogenInfo.json Release && "C:\Program Files\CMake\bin\cmake.exe" -E touch D:/work/xtal-wasm/build-wasm/qtquick3dphysics/src/3rdparty/PhysX/BundledPhysX_autogen/timestamp && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_transform_depfile Ninja gccdepfile D:/work/xtal-wasm/qt-everywhere-src-6.10.2 D:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX D:/work/xtal-wasm/build-wasm D:/work/xtal-wasm/build-wasm/qtquick3dphysics/src/3rdparty/PhysX D:/work/xtal-wasm/build-wasm/qtquick3dphysics/src/3rdparty/PhysX/BundledPhysX_autogen/deps D:/work/xtal-wasm/build-wasm/CMakeFiles/d/6c3f60a473c335cc99f3271a00131d6e2743c9d1af89eab2358456954a8e7f09.d"

AutoMoc subprocess error
------------------------
The content generation command for "BIN:/qtquick3dphysics/src/3rdparty/PhysX/BundledPhysX_autogen/moc_predefs.h" failed.
Process failed with return value 1

Command
-------
D:/CI-Tools/emsdk/upstream/emscripten/em++.bat -std=gnu++17 -w -dM -E "C:/Program Files/CMake/share/cmake-4.2/Modules/CMakeCXXCompilerABI.cpp" -DNDEBUG -DPX_COOKING -DQT_BUILD_PHYSXSTATIC_LIB -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_HAVE_EMSCRIPTEN_ASYNCIFY -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QASCONST -DQT_NO_QEXCHANGE -DQT_NO_QSNPRINTF -DQT_NO_STD_FORMAT_SUPPORT -DQT_USE_QSTRINGBUILDER -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/characterkinematic -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/collision -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/common -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/common/windows -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/cooking -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/cudamanager -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/extensions -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/filebuf -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/foundation -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/geometry -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/geomutils -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/gpu -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/pvd -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/solver -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/task -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/include/vehicle -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/unix -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/windows -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/common/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/common/include/windows -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/common/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/fastxml/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/filebuf/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include/unix -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include/unix/neon -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include/unix/sse2 -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include/windows -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/ccd -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/common -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/contact -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/convex -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/distance -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/gjk -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/hf -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/intersection -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/mesh -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/pcm -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/sweep -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/api/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/common/include/collision -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/common/include/pipeline -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/common/include/utils -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/software/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevelaabb/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevelaabb/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowleveldynamics/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/lowleveldynamics/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physx/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physx/src/buffering -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physx/src/device -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxcharacterkinematic/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxcooking/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxcooking/src/convex -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxcooking/src/mesh -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src/serialization -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src/serialization/Binary -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src/serialization/File -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src/serialization/Xml -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxgpu/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxmetadata/core/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxmetadata/extensions/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxvehicle/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/physxvehicle/src/physxmetadata/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/pvd/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/pvd/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/scenequery/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/scenequery/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/simulationcontroller/include -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtquick3dphysics/src/3rdparty/PhysX/source/simulationcontroller/src -ID:/work/xtal-wasm/qt-everywhere-src-6.10.2/qtbase/mkspecs/wasm-emscripten -ID:/work/xtal-wasm/build-wasm/qtbase/include -ID:/CI-Tools/emsdk/upstream/emscripten/cache/sysroot/include/fakesdl -ID:/CI-Tools/emsdk/upstream/emscripten/cache/sysroot/include/compat -ID:/CI-Tools/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1 -ID:/CI-Tools/emsdk/upstream/lib/clang/21/include -ID:/CI-Tools/emsdk/upstream/emscripten/cache/sysroot/include

Output
------
The command line is too long.

[761/8601] Running syncqt.cpp for module: QtExamplesAssetDownloader

Activity

  1. sbc100 commented on Feb 8, 2026

    @sbc100
    Collaborator

    I wonder if this another reason to get rid of the bat files: #24858

  2. sbc100 commented on Feb 8, 2026

    @sbc100
    Collaborator

    Do you happen to know where the failure is happening? is the issue with em++.bat (that bat file launcher)? Or is the issue that ninja itself should be using a response file in these cases maybe?

  3. lygstate commented on Feb 8, 2026

    @lygstate
    Author

    Do you happen to know where the failure is happening? is the issue with em++.bat (that bat file launcher)? Or is the issue that ninja itself should be using a response file in these cases maybe?

    It's the isse of windows bat, that do not support very long command line, but when compiling very big projects, it's a issue:( I am compiling Qt

  4. sbc100 commented on Feb 9, 2026

    @sbc100
    Collaborator

    I was doing some digging and I found that this issue has come up before: #2386

    It was supposedly fixed by adding CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES etc, in #2386.

    See

    set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
    set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
    set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
    set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
    set(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES 1)
    set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1)
    set(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@")
    set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@")

    I wonder why this is not happening in your case? Are you using the Emscripten.cmake toolchain file?

  5. sbc100 commented on Feb 9, 2026

    @sbc100
    Collaborator

    I wonder if the problem is that the rules for AutoMoc are not honoring CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES?

  6. lygstate commented on Feb 9, 2026

    @lygstate
    Author

    I wonder if the problem is that the rules for AutoMoc are not honoring CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES?

    Yeap, it's about Qt Moc that not support for response file.

  7. sbc100 commented on Feb 9, 2026

    @sbc100
    Collaborator

    Should we open an upstream bug about that? If the AutoMoc step is running the CXX compiler then shouldn't it be honoring stuff like CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES?

  8. lygstate commented on Feb 9, 2026

    @lygstate
    Author

    Should we open an upstream bug about that? If the AutoMoc step is running the CXX compiler then shouldn't it be honoring stuff like CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES?

    It's fine, I'll upstream to cmake for that latter, I report and fixes cmake bugs before, but now I'll focus on a faster emcc.exe first.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions