LBes
LBes

Reputation: 3456

make with Cygwin

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

Upvotes: 1

Views: 4689

Answers (1)

Warren Young
Warren Young

Reputation: 42373

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.

Upvotes: 1

Related Questions