niXman/mingw-builds

Compiling Error when using multithread

WennerChen opened this issue · 4 comments

First, I build x86_64-950-posix-seh-rt_v802-rev0 with the following script:

./build --mode=gcc-9.5.0 --arch=x86_64 --exceptions=seh --no-multilib --rt-version=v8.0.2 --threads=posix --enable-languages=c,c++ --rev=0 --provided-toolchain=/d/

The provided toolchain is x86_64-8.1.0-release-posix-seh-rt_v6-rev0. No error occurred.

And then, I build x86_64-950-posix-seh-rt_v802-rev1 with the following script:

./build --mode=gcc-9.5.0 --arch=x86_64 --exceptions=seh --no-multilib --rt-version=v8.0.2 --threads=posix --enable-languages=c,c++ --rev=1 --provided-toolchain=/d/

The provide toolchain is changed to x86_64-950-posix-seh-rt_v802-rev0, built as above. Errors occurred when building mingw-w64-crt:

dlltool.exe: lib64/libodbccr32.a: error reading ODBCCR32_dll_s00021.o: No such file or directory
make[1]: *** [Makefile:69178: lib64/libodbccr32.a] Error 1
make[1]: *** Waiting for unfinished jobs....
dlltool.exe: lib64/libodbccu32.a: error reading ODBCCR32_dll_h.o: No such file or directory
make[1]: *** [Makefile:69178: lib64/libodbccu32.a] Error 1
dlltool.exe: lib64/libntdll.a: error reading ntdll_dll_t.o: No such file or directory
make[1]: *** [Makefile:69178: lib64/libntdll.a] Error 1

I try some times, and the errors are different.

The default number of jobs is 4. When I change build script to

./build --mode=gcc-9.5.0 --arch=x86_64 --exceptions=seh --no-multilib --rt-version=v8.0.2 --threads=posix --enable-languages=c,c++ --rev=1 --jobs=1 --provided-toolchain=/d/

No error occurred.

Is there something wrong? Thanks!

hmm...
can it occurs because of some antivirus sw, or windows defender?..
I have no other ideas..

I use no antivirus sw or windows defender. When errors occured, I try again and get some other similar errors. I think some .o file may be compiled by some thread, and used by another thread. When .o file is required, it may not be generated.

Can someone try my steps to reproduce the errors?

@WennerChen This should be fixed by #623.

@WennerChen This should be fixed by #623.

@starg2 The problem is solved. Thanks very much.