Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac ODBC build errors - folly #437

Open
tarunparmar opened this issue Jan 30, 2024 · 4 comments
Open

Mac ODBC build errors - folly #437

tarunparmar opened this issue Jan 30, 2024 · 4 comments

Comments

@tarunparmar
Copy link

I get following errors trying to build on mac os.
I tried brew install clickhouse-odbc but it now show up in iODBC .

(base) tparmar@pc-name build % cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl -DICU_ROOT=$(brew --prefix)/opt/icu4c ..        
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- Using ODBC: iODBC
-- 	ODBC_DIR=/Library/Frameworks/iODBC.framework/Versions/3.52
-- 	ODBC_CONFIG_SCRIPT=
-- 	ODBC_IODBC_IODBCTEST=
-- 	ODBC_IODBC_IODBCTESTW=
-- 	ODBC_APP_DEFINES=
-- 	ODBC_APP_INCLUDE_DIRS=/Library/Frameworks/iODBC.framework/Headers
-- 	ODBC_APP_COMPILER_FLAGS=
-- 	ODBC_APP_LINKER_FLAGS=/Library/Frameworks/iodbc.framework
-- 	ODBC_DRIVER_DEFINES=
-- 	ODBC_DRIVER_INCLUDE_DIRS=/Library/Frameworks/iODBC.framework/Headers;/Library/Frameworks/iODBCinst.framework/Headers
-- 	ODBC_DRIVER_COMPILER_FLAGS=
-- 	ODBC_DRIVER_LINKER_FLAGS=/Library/Frameworks/iodbcinst.framework
-- Found ODBC: TRUE  
-- Found the following ICU libraries:
--   uc (required): /usr/local/opt/icu4c/lib/libicuuc.dylib
CMake Deprecation Warning at contrib/ssl/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Warning (dev) at contrib/ssl/CMakeLists.txt:11 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
    PROJECT_VERSION_TWEAK
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Deprecation Warning at contrib/poco/CMakeLists.txt:9 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Poco package version: 1.9.4
-- Checking for C++11 compiler
-- Checking for C++11 compiler - available
-- Checking for C++14 compiler
-- Checking for C++14 compiler - available
-- Setting Poco build type - RelWithDebInfo
-- Building static libraries
-- Building without tests & samples
-- Using internal sqlite, zlib, pcre, expat, ...
-- Couldn't find MySQL or MariaDB
-- MySQL Support Disabled - no MySQL library
-- Found ODBC: /Library/Frameworks/iODBC.framework/Headers  
-- ODBC Support Enabled
-- CMake 3.28.2 successfully configured Poco using Unix Makefiles generator
-- Installation target path: /usr/local
-- C_FLAGS:  =
-- CMAKE_C_FLAGS_DEBUG:=-g -DBUILD_TYPE_DEBUG   -D_DEBUG
-- CMAKE_C_FLAGS_RELEASE:=-O3 -DNDEBUG -DNDEBUG -DBUILD_TYPE_RELEASE
-- CMAKE_C_FLAGS_MINSIZEREL:=-Os -DNDEBUG -DNDEBUG -DBUILD_TYPE_MINSIZEREL
-- CMAKE_C_FLAGS_RELWITHDEBINFO:=-O2 -g -DNDEBUG -DNDEBUG -DBUILD_TYPE_RELWITHDEBINFO
-- 
-- 
-- CXX_FLAGS:=
-- CMAKE_CXX_FLAGS_DEBUG:=-g -DBUILD_TYPE_DEBUG -D_DEBUG
-- CMAKE_CXX_FLAGS_RELEASE:=-O3 -DNDEBUG -DNDEBUG -DBUILD_TYPE_RELEASE
-- CMAKE_CXX_FLAGS_MINSIZEREL:=-Os -DNDEBUG -DNDEBUG -DBUILD_TYPE_MINSIZEREL
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO:=-O2 -g -DNDEBUG -DNDEBUG -DBUILD_TYPE_RELWITHDEBINFO
-- Building: Encodings
-- Building: XML
-- Building: JSON
-- Building: Util
-- Building: Net
-- Building: MongoDB
-- Building: Redis
-- Building: NetSSL_OpenSSL
-- Building: Crypto
-- Building: Data
-- Building: Zip
-- Building: PageCompiler
-- Building: File2Page
CMake Deprecation Warning at contrib/googletest/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at contrib/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at contrib/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at contrib/nanodbc/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- nanodbc version: 2.13.0
-- nanodbc compile: C++14
-- nanodbc build: Disable linking libc++ - 1
-- nanodbc feature: ODBC Version Override - OFF
-- nanodbc feature: Disable async features - OFF
-- nanodbc feature: Enable Unicode - 0
-- nanodbc feature: Enable Boost - OFF
-- nanodbc feature: Enable SQL_NO_DATA bug workaround - OFF
-- nanodbc build: ODBC on Unix - unixODBC
-- ODBC compile flags: -I/Users/tparmar/opt/anaconda3/include
-- ODBC link flags: -L/Users/tparmar/opt/anaconda3/lib -lodbc
-- Use rpaths on Mac OS X - ON
-- nanodbc build: Enable nanodbc target - STATIC
-- nanodbc build: Disable install target - 1
-- nanodbc build: Disable tests target - 1
-- nanodbc build: Disable examples target - 1
-- clickhouse-odbc: ANSI
-- clickhouse-odbcw: Unicode
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (you may need to install the DBD::ODBC module) (@INC contains: /Library/Perl/5.30/darwin-thread-multi-2level /Library/Perl/5.30 /Network/Library/Perl/5.30/darwin-thread-multi-2level /Network/Library/Perl/5.30 /Library/Perl/Updates/5.30.3 /System/Library/Perl/5.30/darwin-thread-multi-2level /System/Library/Perl/5.30 /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level /System/Library/Perl/Extras/5.30) at (eval 8) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
or perhaps the capitalisation of 'ODBC' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Mem, Proxy, SQLite, Sponge.
 at /Users/tparmar/Downloads/clickhouse-odbc/test/detect_driver_manager.pl line 11.
-- ODBC Driver Manager used by Perl's DBD::ODBC: 
-- ODBC Driver Manager used by Python 3's pyodbc: unixODBC
-- Testing with:
	TEST_DSN_LIST=ClickHouse DSN (ANSI);ClickHouse DSN (Unicode)
	PERL=/usr/bin/perl
	PERL_USES_MDAC=0
	PERL_USES_UNIXODBC=0
	PERL_USES_IODBC=0
	PYTHON2=PYTHON2-NOTFOUND
	PYTHON2_USES_MDAC=0
	PYTHON2_USES_UNIXODBC=0
	PYTHON2_USES_IODBC=0
	PYTHON3=/Users/tparmar/opt/anaconda3/bin/python3
	PYTHON3_USES_MDAC=0
	PYTHON3_USES_UNIXODBC=1
	PYTHON3_USES_IODBC=0
	ODBC_UNIXODBC_ISQL=
	ODBC_UNIXODBC_IUSQL=
	ODBC_IODBC_IODBCTEST=
	ODBC_IODBC_IODBCTESTW=
	SQLCMD=/usr/local/bin/sqlcmd
-- Configuring done (7.7s)
-- Generating done (1.2s)
-- Build files have been written to: /Users/tparmar/Downloads/clickhouse-odbc/build
(base) tparmar@pc-name build % cmake --build . --config RelWithDebInfo 
[ 16%] Built target Foundation
[ 65%] Built target crypto
[ 68%] Built target ssl
[ 70%] Built target Crypto
[ 76%] Built target XML
[ 78%] Built target JSON
[ 81%] Built target Util
[ 90%] Built target Net
[ 91%] Built target NetSSL
[ 91%] Building CXX object driver/CMakeFiles/clickhouse-odbc-impl.dir/utils/type_info.cpp.o
In file included from /Users/tparmar/Downloads/clickhouse-odbc/driver/utils/type_info.cpp:1:
In file included from /Users/tparmar/Downloads/clickhouse-odbc/driver/utils/type_info.h:5:
In file included from /Users/tparmar/Downloads/clickhouse-odbc/driver/utils/conversion.h:43:
In file included from /Users/tparmar/Downloads/clickhouse-odbc/driver/utils/conversion_icu.h:3:
In file included from /Users/tparmar/Downloads/clickhouse-odbc/driver/utils/resize_without_initialization.h:5:
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:302:23: error: no template named '__vector_base' in namespace 'std'
    using Base = std::__vector_base<T, std::allocator<T>>;
                 ~~~~~^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:305:46: error: use of undeclared identifier 'Base'
            sizeof(std::vector<T>) == sizeof(Base),
                                             ^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:308:22: error: unknown type name 'Base'
    reinterpret_cast<Base&>(v).*Ptr__end_ += (n - v.size());
                     ^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:417:1: error: expected ')'
FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT(char)
^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:327:13: note: expanded from macro 'FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT'
      TYPE*(std::__vector_base<TYPE, std::allocator<TYPE>>::*),      \
            ^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:417:1: note: to match this '('
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:327:12: note: expanded from macro 'FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT'
      TYPE*(std::__vector_base<TYPE, std::allocator<TYPE>>::*),      \
           ^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:417:1: error: value of type 'pointer std::vector<char>::*' is not implicitly convertible to 'char *'
FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT(char)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:328:7: note: expanded from macro 'FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT'
      &std::vector<TYPE>::__end_,                                    \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:418:1: error: expected ')'
FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT(unsigned char)
^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:327:13: note: expanded from macro 'FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT'
      TYPE*(std::__vector_base<TYPE, std::allocator<TYPE>>::*),      \
            ^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:418:1: note: to match this '('
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:327:12: note: expanded from macro 'FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT'
      TYPE*(std::__vector_base<TYPE, std::allocator<TYPE>>::*),      \
           ^
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:418:1: error: value of type 'pointer std::vector<unsigned char>::*' is not implicitly convertible to 'unsigned char *'
FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT(unsigned char)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tparmar/Downloads/clickhouse-odbc/contrib/folly/folly/memory/UninitializedMemoryHacks.h:328:7: note: expanded from macro 'FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT'
      &std::vector<TYPE>::__end_,                                    \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
7 errors generated.
gmake[2]: *** [driver/CMakeFiles/clickhouse-odbc-impl.dir/build.make:90: driver/CMakeFiles/clickhouse-odbc-impl.dir/utils/type_info.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2153: driver/CMakeFiles/clickhouse-odbc-impl.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2
@tarunparmar
Copy link
Author

@Enmk sorry to tag you but I noticed homebrew tap of clickhouse-odbc is deprecated
image

also the macos build appears to be failing
image

@tarunparmar
Copy link
Author

@alexey-milovidov is mac os odbc driver still supported ?

@NguyenLeHuyBao
Copy link

Im having the same error today, any way to fix this

@RoyLuoyx
Copy link

Got same error while building odbc driver on Mac M1.
Does anyone know solution/workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants