TileDB-Inc/TileDB-MariaDB

How to fix configure with external TileDB and MariaDB?

Opened this issue · 4 comments

Currently is fails, being unable to find TileDB library and erring out on the unknown to CMake command:

--->  Computing dependencies for MyTile.
--->  Fetching distfiles for MyTile
--->  Verifying checksums for MyTile
--->  Checksumming TileDB-MariaDB-0.23.1.tar.gz
--->  Extracting MyTile
--->  Extracting TileDB-MariaDB-0.23.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_MyTile/MyTile/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/MyTile/TileDB-MariaDB-0.23.1.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
--->  Configuring MyTile
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_MyTile/MyTile/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DSUPERBUILD=OFF -DTILEDB_LIBRARIES=/opt/local/lib/libtiledb.dylib -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_MyTile/MyTile/work/TileDB-MariaDB-0.23.1 
-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 12.3.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/local/bin/gcc-mp-12 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/g++-mp-12 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Not found clang-tidy
-- Not found clang-format
-- TILEDB_LIBRARIES: TILEDB_LIBRARIES-NOTFOUND
-- TILEDB_INCLUDE_DIRECTORIES: /opt/local/include
CMake Error at CMakeLists.txt:124 (MYSQL_ADD_PLUGIN):
  Unknown CMake command "MYSQL_ADD_PLUGIN".


-- Configuring incomplete, errors occurred!

A few questions:

  • How are you installing TileDB? Are you building it from source or using a package manager of some sort (eg conda)? Do you know the directory where it is being installed?
  • Could you share the CMake command you ran that invoked the logs you posted? Did you set CMAKE_PREFIX_PATH to include the directory where the external TileDB is installed?
  • For MariaDB, are you following the README instructions?

@jdblischak Thank you for responding.

I install via Macports, the portfile with settings is here: https://github.com/macports/macports-ports/blob/master/databases/tiledb/Portfile
By default it installs into /opt/local, and CMake does find TileDB includes in /opt/local/include, but for some reason fails to find the dylib in /opt/local/lib.

I will try adding CMAKE_PREFIX_PATH explicitly, though normally Macports adds its prefix automatically, and everything works fine with CMake.

As for MariaDB, that was my question: how to configure it correctly with an external MariaDB installation? I can see that README recommends building inside MariaDB tree, but that is undesirable for us (it will require changing every MariaDB version port – which I do not maintain – to add a variant for TileDB support and stick required setting there; making a separate port for MyTile plug-in is far easier). Of course, if there is no feasible way to use an existing installation of MariaDB, I will either think how to implement it or just give up on an idea to support it in Macports.

I install via Macports

Ah, ok. I don't have any experience with Macports, and you are clearly an expert, so I don't think I'll be much help to you in that regard

As for MariaDB, that was my question: how to configure it correctly with an external MariaDB installation?

I'll let another TileDB developer have the final say on this. However, I think this is a strong recommendation. From the online docs for building TileDB-MariaDB from source:

When compiling from source, you will need to fetch the MariaDB server and then build MariaDB with the MyTile source included. You must build MariaDB and MyTile together in one source tree, as MariaDB requires that all compilation flags and optimizations be the same between the server and the plugins.

This implies that if you use the exact same flags/optimizations from the MariaDB Portfile to compile Mytile, then it should work. But I don't know how hard this will be to achieve in practice

@jdblischak Thank you. Given that I have added tiledb port to Macports two days back, there is nobody having experience with it yet, I believe :)
I will see what can be done.

P. S. It seems that documentation in the quoted passage is not strictly consistent: “must” implies necessity, but the reason given implies a mere convenience (it is certainly possible to borrow optflags and w/e else needed, whether manually or via scripting).