oatpp / example-crud

A complete example of a "CRUD" service (UserService) built with Oat++.
https://oatpp.io/
Apache License 2.0
98 stars 61 forks source link

make: *** No rule to make target 'install'. Stop. #13

Closed Corgile closed 3 years ago

Corgile commented 3 years ago

env

after I ran command ./utility/install-oatpp-modules.sh, here is what it printed in the console, from where you can see some make: *** No rule to make target 'install'. Stop. messages

(x_x)💦 ./utility/install-oatpp-modules.sh

INSTALLING MODULE 'oatpp' (Debug) using 8 threads ...

Cloning into 'oatpp'...
remote: Enumerating objects: 492, done.
remote: Counting objects: 100% (492/492), done.
remote: Compressing objects: 100% (460/460), done.
Rremote: Total 492 (delta 165), reused 99 (delta 18), pack-reused 0
Receiving objects: 100% (492/492), 460.96 KiB | 963.00 KiB/s, done.
Resolving deltas: 100% (165/165), done.
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.21390.
-- The CXX compiler identification is MSVC 19.29.30037.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Dev/Microsoft/Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done

############################################################################
## oatpp module compilation config:

OATPP_DISABLE_ENV_OBJECT_COUNTERS=OFF
OATPP_DISABLE_POOL_ALLOCATIONS=OFF
OATPP_THREAD_HARDWARE_CONCURRENCY=AUTO
OATPP_THREAD_DISTRIBUTED_MEM_POOL_SHARDS_COUNT=10
OATPP_COMPAT_BUILD_NO_THREAD_LOCAL=OFF

############################################################################

oatpp version: '1.2.5'
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - not found
-- Found Threads: TRUE
OATPP_ADD_LINK_LIBS=wsock32;ws2_32

############################################################################
## oatpp-module-install.cmake

OATPP_THIS_MODULE_NAME=oatpp
OATPP_THIS_MODULE_VERSION=1.2.5
OATPP_THIS_MODULE_LIBRARIES=oatpp;oatpp-test
OATPP_THIS_MODULE_TARGETS=oatpp;oatpp-test
OATPP_THIS_MODULE_DIRECTORIES=oatpp;oatpp-test

############################################################################

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_BUILD_TYPE
    OATPP_SQLITE_AMALGAMATION

-- Build files have been written to: E:/WorkSpace/Repo/example-crud/tmp/oatpp/build
make: *** No rule to make target 'install'.  Stop.

INSTALLING MODULE 'oatpp-swagger' (Debug) using 8 threads ...

Cloning into 'oatpp-swagger'...
remote: Enumerating objects: 57, done.
remote: Counting objects: 100% (57/57), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 57 (delta 9), reused 26 (delta 6), pack-reused 0
Receiving objects: 100% (57/57), 3.18 MiB | 949.00 KiB/s, done.
Resolving deltas: 100% (9/9), done.
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.21390.
-- The CXX compiler identification is MSVC 19.29.30037.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Dev/Microsoft/Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Finding oatpp in location=INSTALLED
OATPP_INCLUDE=C:/Program Files (x86)/oatpp/include/oatpp-1.2.5/oatpp
OATPP_TEST_INCLUDE=C:/Program Files (x86)/oatpp/include/oatpp-1.2.5/oatpp

############################################################################
## oatpp-swagger module. Resolving dependencies...

############################################################################

target_link_oatpp(oatpp-swagger) to installed oatpp lib

############################################################################
## oatpp-module-install.cmake

OATPP_THIS_MODULE_NAME=oatpp-swagger
OATPP_THIS_MODULE_VERSION=1.2.5
OATPP_THIS_MODULE_LIBRARIES=oatpp-swagger
OATPP_THIS_MODULE_TARGETS=oatpp-swagger
OATPP_THIS_MODULE_DIRECTORIES=oatpp-swagger

############################################################################

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_BUILD_TYPE
    OATPP_SQLITE_AMALGAMATION

-- Build files have been written to: E:/WorkSpace/Repo/example-crud/tmp/oatpp-swagger/build
make: *** No rule to make target 'install'.  Stop.

INSTALLING MODULE 'oatpp-sqlite' (Debug) using 8 threads ...

Cloning into 'oatpp-sqlite'...
remote: Enumerating objects: 65, done.
remote: Counting objects: 100% (65/65), done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 65 (delta 17), reused 37 (delta 7), pack-reused 0 eceiving objects:  83% (54/65), 1.64 MiB | 1.04 MiB/s
Receiving objects: 100% (65/65), 2.19 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (17/17), done.
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.21390.
-- The C compiler identification is MSVC 19.29.30037.0
-- The CXX compiler identification is MSVC 19.29.30037.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Dev/Microsoft/Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Dev/Microsoft/Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Finding oatpp in location=INSTALLED
OATPP_INCLUDE=C:/Program Files (x86)/oatpp/include/oatpp-1.2.5/oatpp
OATPP_TEST_INCLUDE=C:/Program Files (x86)/oatpp/include/oatpp-1.2.5/oatpp

############################################################################
## oatpp-sqlite module. Resolving dependencies...

############################################################################

target_link_oatpp(oatpp-sqlite) to installed oatpp lib

############################################################################
## oatpp-module-install.cmake

OATPP_THIS_MODULE_NAME=oatpp-sqlite
OATPP_THIS_MODULE_VERSION=1.2.5
OATPP_THIS_MODULE_LIBRARIES=oatpp-sqlite;sqlite
OATPP_THIS_MODULE_TARGETS=oatpp-sqlite;sqlite
OATPP_THIS_MODULE_DIRECTORIES=oatpp-sqlite;sqlite

############################################################################

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_BUILD_TYPE

-- Build files have been written to: E:/WorkSpace/Repo/example-crud/tmp/oatpp-sqlite/build
make: *** No rule to make target 'install'.  Stop.

Any helps, Thanks

lganzzzo commented 3 years ago

Hey @corgile ,

The ./utility/install-oatpp-modules.sh script is for Linux/Mac and it's included for reference only.

I would suggest just running those steps manually on windows. Example for oatpp module (same for other modules):

$ git clone https://github.com/oatpp/oatpp.git
$ cd oatpp\
$ MD build
$ cd build\

$ cmake ..
$ cmake --build . --target INSTALL
Corgile commented 3 years ago

Hey @corgile ,

The ./utility/install-oatpp-modules.sh script is for Linux/Mac and it's included for reference only.

I would suggest just running those steps manually on windows. Example for oatpp module (same for other modules):

$ git clone https://github.com/oatpp/oatpp.git
$ cd oatpp\
$ MD build
$ cd build\

$ cmake ..
$ cmake --build . --target INSTALL

I tried another round to build and run the example-crud project, and I got this:

(Homlex) -> cmake ..
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.21390.
-- The C compiler identification is MSVC 19.29.30037.0
-- The CXX compiler identification is MSVC 19.29.30037.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Dev/Microsoft/Visual Studio/2019/Professional
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Dev/Microsoft/Visual Studio/2019/Profession
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:28 (find_package):
  By not providing "Findoatpp.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "oatpp", but
  CMake did not find one.

  Could not find a package configuration file provided by "oatpp" (requested
  version 1.2.5) with any of the following names:

    oatppConfig.cmake
    oatpp-config.cmake

  Add the installation prefix of "oatpp" to CMAKE_PREFIX_PATH or set
  "oatpp_DIR" to a directory containing one of the above files.  If "oatpp"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "E:/WorkSpace/Repos/example-crud/build/CMakeFiles/CMakeOutput.log".

so do I have to config CMAKE_PREFIX_PATH or CMAKE_MODULE_PATH in my environment variables? If so, then what should be the values of them?

Corgile commented 3 years ago

Is there any tutorials on running oatpp projects on windows ?

lganzzzo commented 3 years ago

@corgile ,

Could not find a package configuration file provided by "oatpp" (requested version 1.2.5) with any of the following names:

You don't have oatpp installed. You have to install oatpp on your system.

$ cmake --build . --target INSTALL

Also, make sure to run CMD as Admin