The first few different things

This commit is contained in:
Marko Budiselic 2022-09-17 13:14:16 +02:00
parent 898c894a48
commit 4d9bb27db7
4 changed files with 57 additions and 44 deletions

View File

@ -235,6 +235,12 @@ set(MG_ARCH "x86_64" CACHE STRING "Host architecture to build Memgraph on. Suppo
# setup external dependencies -------------------------------------------------
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
set(THREADS_PREFER_PTHREAD_FLAG ON)
# threading
find_package(Threads REQUIRED)
# optional readline

6
environment/os/macos-12.sh Executable file
View File

@ -0,0 +1,6 @@
#/bin/bash
brew install bash
brew install cmake
brew install clisp sbcl
brew install boost gflags fmt jemalloc openssl

85
init
View File

@ -1,4 +1,4 @@
#!/bin/bash -e
#!/opt/homebrew/Cellar/bash/5.1.16/bin/bash -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
@ -64,16 +64,16 @@ else
done
fi
DISTRO=$(operating_system)
ARCHITECTURE=$(architecture)
if [ "${ARCHITECTURE}" = "arm64" ] || [ "${ARCHITECTURE}" = "aarch64" ]; then
OS_SCRIPT=$DIR/environment/os/$DISTRO-arm.sh
else
OS_SCRIPT=$DIR/environment/os/$DISTRO.sh
fi
echo "ALL BUILD PACKAGES: $($OS_SCRIPT list MEMGRAPH_BUILD_DEPS)"
$OS_SCRIPT check MEMGRAPH_BUILD_DEPS
echo "All packages are in-place..."
# DISTRO=$(operating_system)
# ARCHITECTURE=$(architecture)
# if [ "${ARCHITECTURE}" = "arm64" ] || [ "${ARCHITECTURE}" = "aarch64" ]; then
# OS_SCRIPT=$DIR/environment/os/$DISTRO-arm.sh
# else
# OS_SCRIPT=$DIR/environment/os/$DISTRO.sh
# fi
# echo "ALL BUILD PACKAGES: $($OS_SCRIPT list MEMGRAPH_BUILD_DEPS)"
# $OS_SCRIPT check MEMGRAPH_BUILD_DEPS
# echo "All packages are in-place..."
# create a default build directory
mkdir -p ./build
@ -93,6 +93,7 @@ if [[ ! -f "${quicklisp_install_dir}/setup.lisp" ]]; then
" | sbcl --script || exit 1
rm -rf quicklisp.lisp || exit 1
fi
# TODO(gitbuda): -T doesn't work on Mac
ln -Tfs "$DIR/src/lisp" "${quicklisp_install_dir}/local-projects/lcp"
# Install LCP dependencies
# TODO: We should at some point cache or have a mirror of packages we use.
@ -111,34 +112,34 @@ if [[ "$setup_libs" == "true" ]]; then
cd ..
fi
# setup gql_behave dependencies
setup_virtualenv tests/gql_behave
# setup stress dependencies
setup_virtualenv tests/stress
# setup integration/ldap dependencies
setup_virtualenv tests/integration/ldap
# Setup tests dependencies.
# cd tests
# ./setup.sh
# cd ..
# TODO(gitbuda): Remove setup_virtualenv, replace it with tests/ve3. Take care
# of the build order because tests/setup.py builds pymgclient which depends on
# mgclient which is build after this script by calling make.
echo "Done installing dependencies for Memgraph"
echo "Linking git hooks"
for hook in $(find $DIR/.githooks -type f -printf "%f\n"); do
ln -s -f "$DIR/.githooks/$hook" "$DIR/.git/hooks/$hook"
echo "Added $hook hook"
done;
# Install precommit hook
python3 -m pip install pre-commit
python3 -m pre_commit install
# Link `include/mgp.py` with `release/mgp/mgp.py`
ln -v -f include/mgp.py release/mgp/mgp.py
# # setup gql_behave dependencies
# setup_virtualenv tests/gql_behave
#
# # setup stress dependencies
# setup_virtualenv tests/stress
#
# # setup integration/ldap dependencies
# setup_virtualenv tests/integration/ldap
#
# # Setup tests dependencies.
# # cd tests
# # ./setup.sh
# # cd ..
# # TODO(gitbuda): Remove setup_virtualenv, replace it with tests/ve3. Take care
# # of the build order because tests/setup.py builds pymgclient which depends on
# # mgclient which is build after this script by calling make.
#
# echo "Done installing dependencies for Memgraph"
#
# echo "Linking git hooks"
# for hook in $(find $DIR/.githooks -type f -printf "%f\n"); do
# ln -s -f "$DIR/.githooks/$hook" "$DIR/.git/hooks/$hook"
# echo "Added $hook hook"
# done;
#
# # Install precommit hook
# python3 -m pip install pre-commit
# python3 -m pre_commit install
#
# # Link `include/mgp.py` with `release/mgp/mgp.py`
# ln -v -f include/mgp.py release/mgp/mgp.py

View File

@ -1,4 +1,4 @@
#!/bin/bash -e
#!/opt/homebrew/Cellar/bash/5.1.16/bin/bash -e
# Download external dependencies.
# Don't forget to add/update the license in release/third-party-licenses of added/updated libs!
@ -201,7 +201,7 @@ popd
# mgclient
mgclient_tag="v1.4.0" # (2022-06-14)
repo_clone_try_double "${primary_urls[mgclient]}" "${secondary_urls[mgclient]}" "mgclient" "$mgclient_tag"
sed -i 's/\${CMAKE_INSTALL_LIBDIR}/lib/' mgclient/src/CMakeLists.txt
sed -e 's/\${CMAKE_INSTALL_LIBDIR}/lib/' mgclient/src/CMakeLists.txt
# pymgclient
pymgclient_tag="4f85c179e56302d46a1e3e2cf43509db65f062b3" # (2021-01-15)