acgetchell's Avatar


10 May, 2017 03:33 PM

Hello all,

I'm writing some scientific C++ code which compiles so far on MacOS and Linux using Travis. However, I'm having less success on Windows using AppVeyor. I use CMake, Boost, GoogleTests, and CGAL.



"The C++ compiler ... is not able to compile a simple test program."

When I got this error on Travis-CI/MacOS it was an incorrect path (gcc was specified, but AppleClang was being used). Suggestions, comments, questions?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 10 May, 2017 09:18 PM

    Ilya Finkelshteyn's Avatar

    I forked your repo, reproduced the issue and added blocking RDP statement in finsih. In RDP I was able to reproduce it too. I looked at C:/projects/dev/releases-CGAL-4.9.1/CMakeFiles/CMakeError.log and it has a lot of more specific errors like:

    Determining if the C compiler works failed with the following output:
    Change Dir: C:/projects/dev/CMakeFiles/CMakeTmp
    Run Build Command:"C:/projects/dev/ninja/ninja.exe" "cmTC_39035"
    [1/2] Building C object CMakeFiles\cmTC_39035.dir\testCCompiler.c.obj
    FAILED: CMakeFiles/cmTC_39035.dir/testCCompiler.c.obj 
    C:\PROGRA~1\LLVM\bin\clang.exe  /nologo   /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_39035.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_39035.dir\ -c testCCompiler.c
    clang.exe: error: no such file or directory: '/nologo'
    clang.exe: error: no such file or directory: '/DWIN32'
    clang.exe: error: no such file or directory: '/D_WINDOWS'
    clang.exe: error: no such file or directory: '/W3'
    clang.exe: error: no such file or directory: '/MDd'
    clang.exe: error: no such file or directory: '/Zi'
    clang.exe: error: no such file or directory: '/Ob0'
    clang.exe: error: no such file or directory: '/Od'
    clang.exe: error: no such file or directory: '/RTC1'
    clang.exe: error: no such file or directory: '/showIncludes'
    clang.exe: error: no such file or directory: '/FoCMakeFiles\cmTC_39035.dir\testCCompiler.c.obj'
    clang.exe: error: no such file or directory: '/FdCMakeFiles\cmTC_39035.dir'
    ninja: build stopped: subcommand failed.
    Googled some of those errors and found good links like this and this

    Hope this can point you to the right direction. I would recommend to debug in RDP to save time. Though note that environment variables are not transferred from build process to RDP so you need at least rerun your 'set path' command.

    Sorry for not providing you with final solution, we are mostly .NET shop here and rely on the community for other frameworks.


  2. 2 Posted by acgetchell on 11 May, 2017 02:42 PM

    acgetchell's Avatar


    Thanks for your help. RDP debugging is much better.

    I’ve gotten further; now I’m using Visual Studio 15 2017 win64 directly and running into it not finding GMP even after a `nuget install libgmp_vc120`.

    I think I’ve used up my builds for today, as I’m queued. <>

    Thanks again.


  3. Support Staff 3 Posted by Ilya Finkelshte... on 12 May, 2017 03:48 AM

    Ilya Finkelshteyn's Avatar

    We don't have day limits. Open source projects are getting 1 parallel job in a free plan, maybe some other job was running when you see that current is queued.

  4. 4 Posted by accounts on 25 May, 2017 06:08 PM

    accounts's Avatar

    @acgetchell Are you still interested in getting the build working with clang-cl and ninja? If so I'm happy to help; Unfortunately none of your recent project builds attempt configuring for clang-cl so I'm not sure what, if anything, you need help with.

  5. 5 Posted by acgetchell on 29 May, 2017 10:06 PM

    acgetchell's Avatar
  6. 6 Posted by accounts on 29 May, 2017 11:12 PM

    accounts's Avatar

    @acgetchell The first problem is that you need to set the MSVC environment variables up before invoking CMake.

    For the Visual Studio 2017 image that can be done using:

    - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64

    Note this sets up the environment to compile 64 bit programs. Unfortunately the x86 configuration is broken for MSVC 2017 (but not MSVC 2015).

    If you want to use the MSVC 2015 image you can initialize the enviroment using:

    - call " C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64

    Here's an example of multiple different clang-cl configurations:

    After applying the above changes CMake should not report clang-cl as broken:

  7. 7 Posted by acgetchell on 30 May, 2017 03:11 AM

    acgetchell's Avatar

    Thanks for the help!

    I didn’t see Eric’s .appveyor.yml as it looks like the repo had been deleted, but based on your instructions I got: <>


  8. 8 Posted by accounts on 31 May, 2017 11:01 PM

    accounts's Avatar

    @acgetchell Right, that's the same error I saw afterwards too. That seems to be a fault of your CMake configuration, or that you're missing the GMP packages.

    Try ensuring you tell CMake where to look for the GMP you installed from nuget, and also ensure that package comes with a CMake find module.

  9. 9 Posted by acgetchell on 31 May, 2017 11:09 PM

    acgetchell's Avatar

    Hmmm, I don’t think it’s a fault with my CMakeLists.txt, since I build fine on Linux and MacOS: <>

    Also, I have lines to explicitly include GMP: <>

    Which also include, as far as I can tell, the locations of that library in %PATH%

    Adam Getchell
    [email blocked]

  10. 10 Posted by accounts on 03 Jun, 2017 05:35 AM

    accounts's Avatar

    @acgetchell: Also try adding the installation prefix of GMP to CMAKE_PREFIX_PATH.

  11. 11 Posted by acgetchell on 16 Jun, 2017 08:52 PM

    acgetchell's Avatar
  12. 12 Posted by acgetchell on 07 Jul, 2017 08:29 PM

    acgetchell's Avatar

    Hello all,

    I’ve gotten much further by using Miniconda to install the needed libraries.

    Now for some reason, the compiler cannot find cdefs.h and reent.h, even though I define the path where they can be found in my CMakeFile: <>

    Do you have any insight as to why this isn’t working?



  13. 13 Posted by acgetchell on 13 Jul, 2017 04:29 PM

    acgetchell's Avatar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • log-4.txt 10.1 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac