1

I am trying to set VTK on windows (did I say it was complicated?^^). I have successfully configured VTK with CMake and I am now trying to run make through cygwin. However when I go to the build directory and enter make all the terminal prints and does is:

make

Microsoft Windows [version 6.3.9600]

(c) 2013 Microsoft Corporation. All rights reserved.

Does anyone know what's wrong?

EDIT: when typing cygcheck I get:

Cygwin Package Information
Package              Version        Status
make                 4.0-2           OK

EDIT 2: Here is a screenshot of what I get (sorry it's in french) enter image description here

Thanks in advance for any help you can give :)

EDIT 3: New screenshot + Makefile Content

enter image description here

Makefile content:

# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.2

# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target

# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:

    #=============================================================================
# Special targets provided by cmake.

# Disable implicit rules so canonical targets will work.
.SUFFIXES:

# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =

.SUFFIXES: .hpux_make_needs_suffix_list

# Suppress display of executed commands.
$(VERBOSE).SILENT:

# A target that is always out of date.
cmake_force:
.PHONY : cmake_force

    #=============================================================================
# Set environment variables for the build.

SHELL = cmd.exe

# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\CMake\bin\cmake.exe"

# The command to remove a file.
RM = "C:\Program Files (x86)\CMake\bin\cmake.exe" -E remove -f

# Escaping for special characters.
EQUALS = =

# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Lonni\VTK\VTK-6.2.0

# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Lonni\VTK\Build1

    #=============================================================================
# Targets provided globally by CMake.

# Special rule for the target edit_cache
edit_cache:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running         CMake cache editor..."
    "C:\Program Files (x86)\CMake\bin\cmake-gui.exe" -H$(CMAKE_SOURCE_DIR) -    B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache

# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast

# Special rule for the target rebuild_cache
rebuild_cache:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running     CMake to regenerate build system..."
    "C:\Program Files (x86)\CMake\bin\cmake.exe" -H$(CMAKE_SOURCE_DIR) -    B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache

# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast

# The main all target
all: cmake_check_build_system
    $(CMAKE_COMMAND) -E cmake_progress_start     C:\Users\Lonni\VTK\Build1\CMakeFiles     C:\Users\Lonni\VTK\Build1\CMakeFiles\progress.marks
    $(MAKE) -f CMakeFiles\Makefile2 all
    $(CMAKE_COMMAND) -E cmake_progress_start     C:\Users\Lonni\VTK\Build1\CMakeFiles 0
.PHONY : all

# The main clean target
clean:
    $(MAKE) -f CMakeFiles\Makefile2 clean
.PHONY : clean

# The main clean target
clean/fast: clean
.PHONY : clean/fast

# Prepare targets for installation.
preinstall: all
    $(MAKE) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall

# Prepare targets for installation.
preinstall/fast:
    $(MAKE) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall/fast

# clear depends
depend:
    $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-    build-system CMakeFiles\Makefile.cmake 1
.PHONY : depend

#=============================================================================
# Target rules for targets named vtk-android

# Build rule for target.
vtk-android: cmake_check_build_system
    $(MAKE) -f CMakeFiles\Makefile2 vtk-android
.PHONY : vtk-android

# fast build rule for target.
vtk-android/fast:
    $(MAKE) -f CMakeFiles\vtk-android.dir\build.make CMakeFiles/vtk-    android.dir/build
.PHONY : vtk-android/fast

#=============================================================================
# Target rules for targets named vtk-compile-tools

# Build rule for target.
vtk-compile-tools: cmake_check_build_system
    $(MAKE) -f CMakeFiles\Makefile2 vtk-compile-tools
.PHONY : vtk-compile-tools

# fast build rule for target.
vtk-compile-tools/fast:
    $(MAKE) -f CMakeFiles\vtk-compile-tools.dir\build.make CMakeFiles/vtk-    compile-tools.dir/build
.PHONY : vtk-compile-tools/fast

# Help Target
help:
    @echo The following are some of the valid targets for this Makefile:
    @echo ... all (the default if no target is provided)
    @echo ... clean
    @echo ... depend
    @echo ... vtk-android
    @echo ... edit_cache
    @echo ... rebuild_cache
    @echo ... vtk-compile-tools
.PHONY : help



#=============================================================================
# Special targets to cleanup operation of make.

# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
    $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-    build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system
LBes
  • 3,366
  • 1
  • 32
  • 66

1 Answers1

1

The default installation of Cygwin is quite minimal. It doesn't include GNU make, so you're getting Microsoft's make.

You need to re-run Cygwin's setup-*.exe and add make. Chances are, you probably need other things, too. I suggest opening the Devel category and giving the contents a scan while you're in there.


EDIT, after screenshots were added to the question:

Your screenshots show several confusions. I'll go through them one by one, quoting the text in each case:

Pas de cible spécifiée et aucun makefile n'a été trouvé

In English, that is "No targets specified and no makefile found." This tells you that GNU make is installed and running, but that you don't have a file called GNUmakefile, makefile, or Makefile in the current directory. It searches for those three, in order.

This is not surprising since ls shows that you are running it in an empty directory.

/cygdrive/c/MinGW/bin/make

There are two problems here:

  1. As I said in the comments, only programs linked to cygwin1.dll can make sense of /cygdrive. Windows' cmd.exe has no idea what /cygdrive means. c:\MinGW\bin\make is the correct form under cmd.exe.

  2. MinGW is not Cygwin. Any problems you have with MinGW are an entirely separate question, not related to the problems you're having with Cygwin's GNU make package.

/usr/bin/make

This is similar to the previous item: cmd.exe has no idea what to do with a POSIX path. Because Windows' file path parsing code sometimes treats forward slashes the same as backslashes, this gets interpreted as c:\usr\bin\make in this case, but there is almost certainly no c:\usr directory at all.

The reason this path works in the left screenshot is that Cygwin mounts your Cygwin installation directory (e.g. c:\cygwin or c:\cygwin64, by default) as the POSIX root, so that c:\cygwin\usr appears as /usr to any program linked to cygwin1.dll which uses POSIX APIs such as open(2). This includes Cygwin's version of GNU bash, as you show.

You should not require the explicit path within the Cygwin Terminal window, since /usr/bin should be ahead of anything else in the PATH. If that is not the case, you might not be using the Cygwin icon that setup.exe created, in which case you don't have a proper login shell. Either use that icon, or mimic what it does by calling mintty -, not just plain mintty.

Community
  • 1
  • 1
Warren Young
  • 40,875
  • 8
  • 85
  • 101
  • Correct me I am wrong, but my previous installation of cygwin had no make and I got the "command not found" error. So is that really the reason why? – LBes May 22 '15 at 15:21
  • @LonniBesançon: I'm assuming you have Visual Studio installed, which is how you got Microsoft `make`. – Warren Young May 22 '15 at 15:21
  • Indeed I do, but I had it installed when I tried before and I don't get the same error. How could I possibly fix the absence of make then? Because I'm pretty sure I checked it under Dev – LBes May 22 '15 at 15:23
  • If you're using Cygwin through the Cygwin Terminal icon installed by `setup.exe` (as opposed to the Windows console) then Cygwin programs should be first in the `PATH`, ahead of things like Visual Studio. Are you sure `ls /usr/bin/make` shows that it is installed? How about `cygcheck make` or `cygcheck -c make`? – Warren Young May 22 '15 at 15:27
  • So does giving an explicit path (`/usr/bin/make`) do the right thing? – Warren Young May 22 '15 at 15:55
  • It actually works when I'm just launching cygwin but when i'm trying to launch it from within /cygdrive/c it doesn't and tells me that the command doesn't exist – LBes May 22 '15 at 16:00
  • Define "it". *What* is telling you these things? Is it make, or cmd.exe, or bash, or Windows, or...? How is "within Cygwin" distinct from /cygdrive, in your mind? /cygdrive *only* makes sense to Cygwin, not to Windows. – Warren Young May 22 '15 at 16:55
  • Sorry for answering this late. I don't have access to the PC machine now (on a mac currently). Basically, I had two different windows. One which was the classic cygwin prompt. On the other one I started and typed in /cygdrive/c. When I enter cygcheck /usr/bin/make on the first one it works. When I try on the second one I get "the command doesn't exist" error. I am quite confused as I can't see any difference. Then again I'm not an expert so I don't know what could trigger such a difference... – LBes May 22 '15 at 20:22
  • Open a Cygwin shell (`bash`) rather than a Windows command prompt (`cmd`). On the latter, Cygwin's `make` probably isn't in the `%PATH%`. – reinierpost May 26 '15 at 08:07
  • Ok i'm gonna add what I get and edit my post because I'm still not through with it – LBes May 26 '15 at 11:05
  • Cannot add a picture... Not enough reputation yet. Anyway I tried what reinierpost suggested and I'm still having the same error. I have two windows. On the first one it's just cygwin that I launch, on the second cygwin and i get to my directory cd cygdrive/c/... When trying /usr/bin/make on the first one: no target. On the second one: cannot find the command – LBes May 26 '15 at 11:10
  • Thanks for helping me out to clarify things a little bit. I am less confused now and make works just fine :). Now still have to try and succeed in the process of making VTK ^^'. – LBes May 28 '15 at 10:57
  • I still have issues. I edited my post to show what I get now. Sorry i'm quite new to this – LBes May 28 '15 at 17:05
  • @LonniBesançon: This is turning into a "how do I use Cygwin and GNU make" tutorial. Please post the new thing as a separate question. The answer has nothing to do with anything we've already discussed. – Warren Young May 28 '15 at 17:48
  • I do feel it is quite related. I admit I was a bit confused by Cygwin in the first place but still there is something not normal here no ? I mean I can't see no reason why it would switch from the gnu make to the VS make in the use case I showed in my last screenshot. I don't mind posting an other question at all, it's just that I think it's still quite related – LBes May 28 '15 at 17:53
  • @LonniBesançon: Why don't you believe me when I tell you that the answer to this latest question is different and unrelated to the previous discussion? If you knew enough to second-guess me, you would know the correct command already. – Warren Young May 28 '15 at 18:06
  • Alright ok ! Didn't mean to upset you at all. Was just skeptical about it all in the first place that's all. I will create then an other question with the screenshot and make file – LBes May 28 '15 at 18:34
  • Done :). http://stackoverflow.com/questions/30514661/visual-studio-make-instead-of-gnu-make-with-cygwin Sorry again if I offended you – LBes May 28 '15 at 18:42