Compiler Problems

JayGee 181 Reputation points
2021-03-06T01:25:27.907+00:00

Let me start from the beginning.
I was using MSYS to do a meson build, and it started to compile fine (it was interupted by missing Directx-headers).
Later, when I tried the build again, it halted with a compiling error about not finding mspdb140.dll.
I checked to find the file resided in three places in C:\Program Files (x86)\Microsoft Visual Studio 14.0\
...Common7\IDE
...VC\bin
...VC\bin\amd64

I already have C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE in my path.

Anyway the problem was annoying me, since I couldn't figure out why I was suddenly getting compiler error, even in gcc in the MSYS builds, so I did a system restore, as I figured something I did messed things up.

Unfortunately that did not fix the problem MSYS started telling me 'compiler cc cannot compile programs'.
Google didn't help me much with that, since everything seemed Linux related.

I got the idea of trying Visual Studio with meson, and I did find the mesonbuild site useful, and VS gave me more details on the error.
It reported it cannot find mspdb100.dll.
So I put the C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 in the path (...10.0\VC\bin was already there).

After a reboot, whe I tried the build I started getting

***The application was unable to start correctly (0xc000007b). Click OK to close the application.***

Then

***Microsoft C/C++ Compiler Driver stopped working***

I really don't know what to do at this point.
Is there a way I can fix the compiler issues without having to reinstall any VS?
Does my path environment need cleaning up?
I'm actually having issues with that also. I didn't get any feedback on that.

Edit:
I'll include the log file.
The attachment does not seem to be working.

Build started at 2021-03-05T21:43:14.532740
Main binary: c:\python37\python.exe
Build Options: 
Python system: Windows
The Meson build system
Version: 0.53.2
Source dir: C:\msys-builds\mesa-mesa-21.0.0-rc5
Build dir: C:\msys-builds\mesa-mesa-21.0.0-rc5\mesa-build
Build type: native build
Program python found: YES (C:\Python27\python.EXE)
Running command: C:\Python27\python.EXE bin/meson_get_version.py
--- stdout ---
21.0.0-rc5
--- stderr ---


Project name: mesa
Project version: 21.0.0-rc5
No CFLAGS in the environment, not changing global flags.
No LDFLAGS in the environment, not changing global flags.
No CPPFLAGS in the environment, not changing global flags.
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc C:\msys-builds\mesa-mesa-21.0.0-rc5\mesa-build\meson-private\sanitycheckc.c -o C:\msys-builds\mesa-mesa-21.0.0-rc5\mesa-build\meson-private\sanitycheckc.exe -pipe
Sanity check compile stdout:

-----
Sanity check compile stderr:
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lgcc_s
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lgcc
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lgcc_s
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lgcc
/usr/lib/gcc/x86_64-pc-msys/9.1.0/../../../../x86_64-pc-msys/bin/ld: cannot find crtend.o: No such file or directory
collect2: error: ld returned 1 exit status

-----

meson.build:21:0: ERROR: Compiler cc can not compile programs.
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,602 questions
0 comments No comments
{count} votes

Accepted answer
  1. Karen Payne MVP 35,036 Reputation points
    2021-03-06T01:30:17.827+00:00

    Hello,

    Your best course of action is to ask in the following forum

    https://groups.google.com/g/mesonbuild


2 additional answers

Sort by: Most helpful
  1. JayGee 181 Reputation points
    2021-03-06T03:44:12.38+00:00

    With the help of this link, I got an idea to try the vs2015 Native Tools Command Prompt, instead of the 2017, and that solved the problem.
    I don't know why, since the 2015 dlls were what could not be found. So I'm stumped.
    At least the build made a step forward.

    C++ compiler for the host machine: cl (msvc 19.00.24215.1)
    C++ linker for the host machine: link link 14.00.24215.1
    Build machine cpu family: x86_64
    Build machine cpu: x86_64
    Host machine cpu family: x86_64
    Host machine cpu: x86_64
    Target machine cpu family: x86_64
    
    0 comments No comments

  2. JayGee 181 Reputation points
    2021-03-10T00:49:11.67+00:00

    I haven't been able to find any post buttons on Google Groups, although there appear to be another way. However the problem has been resolved.

    0 comments No comments