pgRouting / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
https://pgrouting.org
GNU General Public License v2.0
1.16k stars 366 forks source link

3.4.1 fails native build on Mac #2430

Closed tmcsys closed 1 year ago

tmcsys commented 1 year ago

Xcode 10.2.1 MacOSX10.14.sdk CMake 3.24.3 (cmake.org)

CMake Error at CMakeLists.txt:404 (add_library):
  Cannot find source file:

    /Downloads/pgrouting-3.4.1/build/src/tsp/$(PROJECT_NAME).build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/tsp.build/$(OBJECT_FILE_DIR_normal:base)/x86_64/tsp.o

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc

CMake Error at CMakeLists.txt:404 (add_library):
  No SOURCES given to target: pgrouting-3.4

[CMakeLists.txt:404]
add_library(${PROJECT_LIB_NAME}
    ${LIBRARY_MODE_TARGET}
    ${PROJECT_OBJECTS})
cvvergara commented 1 year ago

Hi, can you post all that is output when you do the cmake command.

sanak commented 1 year ago

Hi @tmcsys,
I couldn't reproduce the issue on my mac environment.

cmake command output:

% cd ~/Downloads
% unzip pgrouting-3.4.1.zip
% cd pgrouting-3.4.1
% mkdir build
% cd build
% cmake ..
-- Setting build type to 'Release' as none was specified.
-- CMAKE_BUILD_TYPE Release
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - 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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.37.1 (Apple Git-137.1)") 
-- DOXYGEN_MINIMUM_VERSION=1.7
-- SPHINX_MINIMUM_VERSION=4.0
-- POSTGRESQL_MINIMUM_VERSION=9.2.0
-- BOOST_MINIMUM_VERSION=1.56.0
-- POSTGIS_MINIMUM_VERSION=2.0.0
-- Found Boost: /opt/homebrew/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.56.0")  
-- Found Perl: /Users/sanak/.plenv/shims/perl (found version "5.34.1") 
-- POSTGRESQL_PG_CONFIG is /opt/homebrew/bin/pg_config
-- POSTGRESQL_EXECUTABLE is /opt/homebrew/Cellar/postgresql@14/14.6/bin/postgres
-- POSTGRESQL_VERSION_STRING in FindPostgreSQL.cmake is PostgreSQL 14.6 (Homebrew)
-- POSTGRESQL_INCLUDE_DIR: /opt/homebrew/include/postgresql@14/server
-- POSTGRESQL_LIBRARIES: /opt/homebrew/lib/postgresql@14
-- POSTGRESQL_VERSION_STRING=PostgreSQL 14.6 (Homebrew)
-- POSTGRESQL_VERSION=14.6
-- PGSQL_VERSION=146
-- LIBRARY_INSTALL_PATH /opt/homebrew/lib/postgresql@14
-- Performing Test C_COMPILER_SUPPORTS_FPIC
-- Performing Test C_COMPILER_SUPPORTS_FPIC - Success
-- Performing Test CXX_COMPILER_SUPPORTS_FPIC
-- Performing Test CXX_COMPILER_SUPPORTS_FPIC - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sanak/Downloads/pgrouting-3.4.1/build
cvvergara commented 1 year ago

@tmcsys I think your macos is 10 can you please upgrade to 13 and reopen the ticket if the problem persists

cvvergara commented 1 year ago

Reopen if problem persists

sanak commented 1 year ago

@tmcsys I think your macos is 10 can you please upgrade to 13 and reopen the ticket if the problem persists

@cvvergara Thanks for the comment! 🙇‍♂️ @tmcsys macOS 13.0 (Ventura) was released at last October and it is quite new. I think that macOS 12.5 (Monterey) may be also fine, because it supports the latest Xcode 14.1. https://developer.apple.com/support/xcode/ Just FYI