msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.29k stars 1.22k forks source link

clang build uasm unable to find source file #7291

Open revelator opened 3 years ago

revelator commented 3 years ago

when building libomp i get an uasm error about it not being able to find the source file ?!?

revelator commented 3 years ago

Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

Error A2104: No filename specified.
make[2]: *** [projects/openmp/runtime/src/CMakeFiles/omp.dir/build.make:473: projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Windows_NT-586_asm.asm.obj] Fejl 1```
mati865 commented 3 years ago

Are you sure you are building latest out latest mingw-w64-clang PKGBUILD with makepkg-mingw?

revelator commented 3 years ago

pkgver=11.0.0 pkgrel=4

so i think so ? i had just updated via git.

mati865 commented 3 years ago

You could try reverting https://github.com/msys2/MINGW-packages/commit/906397957572b7c424ebd0853abc2ed6f2ae1886 on your machine. Maybe there is different amount of spaces. IIRC I did this change because CI was failing with the same error as yours.

revelator commented 3 years ago

ill try that, hang on for results.

revelator commented 3 years ago

Yep that fixed it, not sure why it causes ci build to break though.

revelator commented 3 years ago

Does ci use a different shell ?

mati865 commented 3 years ago

FWIW currently committed version builds for me. Shell should not matter here, maybe specific set of installed packages somehow causes CMake to generate slightly different config. I'll tweak the regex or use patch instead over the weekend.

revelator commented 3 years ago

Hmm now error crops up further down the build


  The C compiler

    "E:/mingw-w64-clang/src/build-x86_64/bin/clang.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: E:/mingw-w64-clang/src/build-libcxx-shared-x86_64/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/Msys64/usr/bin/make.exe cmTC_1e2ec/fast && /usr/bin/make  -f CMakeFiles/cmTC_1e2ec.dir/build.make CMakeFiles/cmTC_1e2ec.dir/build
    make[1]: Går til katalog "/e/mingw-w64-clang/src/build-libcxx-shared-x86_64/CMakeFiles/CMakeTmp"
    Building C object CMakeFiles/cmTC_1e2ec.dir/testCCompiler.c.obj
    /E/mingw-w64-clang/src/build-x86_64/bin/clang.exe   -march=x86-64 -mtune=generic -O2 -pipe    -o CMakeFiles/cmTC_1e2ec.dir/testCCompiler.c.obj   -c /E/mingw-w64-clang/src/build-libcxx-shared-x86_64/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_1e2ec.exe
    /E/Msys64/mingw64/bin/cmake.exe -E rm -f CMakeFiles/cmTC_1e2ec.dir/objects.a
    /E/mingw-w64-clang/src/build-x86_64/bin/llvm-ar cr CMakeFiles/cmTC_1e2ec.dir/objects.a "CMakeFiles/cmTC_1e2ec.dir/testCCompiler.c.obj"
    E:\mingw-w64-clang\src\build-x86_64\bin\llvm-ar.exe: error: unable to open 'CMakeFiles/cmTC_1e2ec.dir/objects.a': No such file or directory
    make[1]: *** [CMakeFiles/cmTC_1e2ec.dir/build.make:107: cmTC_1e2ec.exe] Fejl 1
    make[1]: Forlader katalog "/e/mingw-w64-clang/src/build-libcxx-shared-x86_64/CMakeFiles/CMakeTmp"
    make: *** [Makefile:141: cmTC_1e2ec/fast] Fejl 2```
revelator commented 3 years ago

still not able to build this ... if i revert the sed change the error comes later but it still fails.

mati865 commented 3 years ago

Sorry I forgot about this issue. No clue about error: unable to open 'CMakeFiles/cmTC_1e2ec.dir/objects.a': No such file or directory though.

revelator commented 3 years ago

weird indeed, i can build the previous version no problem so it seems to be a change in the source package causing this.