duckdb / extension-template

Template for DuckDB extensions to help you develop, test and deploy a custom extension
MIT License
152 stars 50 forks source link

error: mac os x memory.h not found fix is not documented. #97

Open dkdndes opened 3 hours ago

dkdndes commented 3 hours ago

I did the following, which is not documented in your readme in this way; some steps still need to be completed.

Installation of vcpkg

brew install vcpkg
git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg"
export VCPKG_ROOT="$HOME/vcpkg"
export VCPKG_TOOLCHAIN_PATH $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
echo $VCPKG_TOOLCHAIN_PATH # just to check

Clone the repo with submodules

git clone --recurse-submodules git@github.com:duckdb/extension-template.git

Run make, and generated an error:

Programming/Insight/extension-template/duckdb/src/include/duckdb/common/constants.hpp:11:10: fatal error: 'memory' file not found
   11 | #include <memory>
      |          ^~~~~~~~
1 error generated.
make[3]: *** [src/verification/CMakeFiles/duckdb_verification.dir/copied_statement_verifier.cpp.o] Error 1
make[2]: *** [src/verification/CMakeFiles/duckdb_verification.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [release] Error 2

I added the path for the files, and it compiled.

export CXXFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1"

I opened the issue because it is challenging to find/fix, and I thought you might like to add the info somewhere in your documentation.

dkdndes commented 3 hours ago

build/release/duckdb v1.1.3 19864453f7 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. D select quack('Jane') as result; ┌───────────────┐ │ result │ │ varchar │ ├───────────────┤ │ Quack Jane 🐥 │ └───────────────┘