Skip to content

Failed to build Qt 5.9.2 in parallel(make -jN && N > 1) #2606

Closed

Description

@JCYang
  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Windows build number: 10.0.16299.19 and ubuntu 16.04

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)
    Build qt 5.9.2 from source.
    configure command:
    current dir /somewhere/qt5-build
    qt5 src dir /somewhere/qt5

../qt5/configure -opensource -confirm-license -release -make libs -make examples -optimized-qmake -platform linux-g++-64 -no-qml-debug -no-directfb -no-kms -qt-xcb -qt-zlib -qt-libjpeg -qt-libpng -qt-harfbuzz -qt-xkbcommon -qt-freetype -qt-pcre -no-icu -prefix /home/jc_yang/non-specified -skip 3d -skip activeqt -skip androidextras -skip canvas3d -skip charts -skip connectivity -skip datavis3d -skip declarative -skip doc -skip enginio -skip gamepad -skip graphicaleffects -skip imageformats -skip location -skip macextras -skip multimedia -skip networkauth -skip purchasing -skip quickcontrols -skip quickcontrols2 -skip remoteobjects -skip script -skip scxml -skip sensors -skip serialbus -skip serialport -skip speech -skip translations -skip virtualkeyboard -skip wayland -skip webchannel -skip webengine -skip websockets -skip webview -skip x11extras -skip xmlpatterns

after successful config,
run make -j16 or make -j8 to start build

  • What's wrong / what should be happening instead:
    I expect build to be success. but it failed with weird error condition.
    below is excerpt of the build failure output:
    "In file included from /usr/include/limits.h:25:0,
    from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:168,
    from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:7,
    from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:34,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zconf.h:422,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zlib.h:34,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zutil.h:31,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/crc32.c:31:
    /usr/include/features.h:367:25: fatal error: .moc/sys/cdefs.h: Invalid argument
    compilation terminated.
    In file included from /usr/include/features.h:391:0,
    from /usr/include/limits.h:25,
    from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:168,
    from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:7,
    from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:34,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zconf.h:422,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zlib.h:34,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/compress.c:9:
    /usr/include/x86_64-linux-gnu/gnu/stubs.h:10:27: fatal error: .moc/gnu/stubs-64.h: Invalid argument
    Makefile:17491: recipe for target '.obj/crc32.o' failed
    In file included from /usr/include/stdio.h:27:0,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/gzguts.h:39,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/gzwrite.c:6:
    /usr/include/features.h:391:23: fatal error: .moc/gnu/stubs.h: Invalid argument
    compilation terminated.
    make[3]: *** [.obj/crc32.o] Error 1
    compilation terminated.
    make[3]: *** Waiting for unfinished jobs....
    Makefile:17442: recipe for target '.obj/compress.o' failed
    make[3]: *** [.obj/compress.o] Error 1
    Makefile:17732: recipe for target '.obj/gzwrite.o' failed
    make[3]: *** [.obj/gzwrite.o] Error 1
    In file included from /usr/include/x86_64-linux-gnu/sys/types.h:219:0,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zconf.h:448,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zlib.h:34,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zutil.h:31,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/adler32.c:8:
    /usr/include/x86_64-linux-gnu/sys/select.h:45:23: fatal error: .moc/bits/time.h: Invalid argument
    compilation terminated.
    Makefile:17395: recipe for target '.obj/adler32.o' failed
    make[3]: *** [.obj/adler32.o] Error 1
    In file included from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/zutil.h:38:0,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/deflate.h:16,
    from /mnt/d/third_party_libs/qt5/qtbase/src/3rdparty/zlib/src/trees.c:37:
    /usr/include/stdlib.h:42:30: fatal error: .moc/bits/waitstatus.h: Invalid argument
    compilation terminated.
    Makefile:17986: recipe for target '.obj/trees.o' failed
    make[3]: *** [.obj/trees.o] Error 1
    make[3]: Leaving directory '/mnt/d/third_party_libs/qt-host-build/qtbase/src/corelib'
    Makefile:224: recipe for target 'sub-corelib-make_first' failed
    make[2]: *** [sub-corelib-make_first] Error 2
    make[2]: Leaving directory '/mnt/d/third_party_libs/qt-host-build/qtbase/src'
    Makefile:48: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/mnt/d/third_party_libs/qt-host-build/qtbase'
    Makefile:48: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2"

make -j1 or just plainly make do run successfully. Just parallel build failed pretty fast.

Activity

  1. cnwzhjs commented on Nov 1, 2017

    @cnwzhjs

    I met the same issue while building another big project, and used strace to trace g++'s sys calls, here are some logs:

    [pid 23421] open("bla_bla_bla/config.h", O_RDONLY|O_NOCTTY) = 4
    [pid 23421] fstat(4, {st_mode=S_IFREG|0777, st_size=11046, ...}) = 0
    [pid 23421] read(4, "/* +----------------------------"..., 11046) = 11046
    [pid 23421] close(4) = 0
    // some useless logs...
    [pid 23421] open("bla_bla_bal/base.h", O_RDONLY) = 4
    [pid 23421] fstat(4, {st_mode=S_IFREG|0777, st_size=3690, ...}) = 0
    [pid 23421] read(4, "/* +----------------------------"..., 4096) = 3690
    [pid 23421] read(4, "", 4096) = 0
    [pid 23421] write(2, "In file included from "..., 294In file included from bla_bla_bla/common.h:16:0,
    from bla_bla_bla/bla_bla_bla.cpp:12:
    bla_bla_bla/base.h:43:26: fatal error: bla_bla_bla/version.h: Invalid argument

    This log has been modified manually to remove my company's secrets

    please take a look at the fstat and read calls:
    The first pair of calls are normal, you can see they have same number on size parameters.
    The second pair of calls are the point causing this problem, the file size if 3690bytes, but trying to invoke syscall read with 4096 bytes.

  2. iclodq commented on Nov 3, 2017

    @iclodq

    I met the same issue when I compile my project with "-jN" that is compiled well on another computer. Then I compile without "-jN", it's ok. Strangely, after the success, I compile the project with "-jN" again, and it works well.
    So ,you can make without "-jN".

  3. therealkenc commented on Nov 11, 2017

    @therealkenc

    16299 so probably #2448 and friends. Try the workaround and see if that helps. Or upgrade to 17035 if you can, and let us know if the problem persists.

  4. JCYang commented on Nov 15, 2017

    @JCYang
    Author

    If 16299.64 contains the fix for #2448 then I can confirm they are not the same bug.
    I've just upgraded to .64 and the the same error still exist.

  5. therealkenc commented on Nov 15, 2017

    @therealkenc

    No, 17035 as it says in #2448....

  6. cnwzhjs commented on Nov 28, 2017

    @cnwzhjs

    therealkenc this workaround works perfect for me. thank you so much for the reply.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions