Fix UdfTest. More cleanup.
set -ex
-INPLACE_SED="sed -i"
-
export LDFLAGS="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib"
# libcuda.so is a machine specific library. For building, we use
@@ -26,18 +24,17 @@ export GDAL_ROOT=$PREFIX
# add):
export CXXFLAGS="`echo $CXXFLAGS | sed 's/-fPIC//'`"
-# Fixes error: no member named 'secure_getenv' in the global namespace
-# Try disabling this for the next omniscidb release, see
+# Fixes https://github.com/Quansight/pearu-sandbox/issues/7
# https://github.com/omnisci/omniscidb/issues/374
export CXXFLAGS="$CXXFLAGS -Dsecure_getenv=getenv"
# Adjust OPENSSL_ROOT for conda environment. This ensures that
# openssl is picked up from host environment:
-$INPLACE_SED 's!/usr/local/opt/openssl!\'$PREFIX'!g' CMakeLists.txt
+sed -i 's!/usr/local/opt/openssl!\'$PREFIX'!g' CMakeLists.txt
# Avoid picking up boost/regexp header files from local system if
# there:
-$INPLACE_SED 's!/usr/local!\'$PREFIX'!g' CMakeLists.txt
+sed -i 's!/usr/local!\'$PREFIX'!g' CMakeLists.txt
# Make sure that llvm-config and clang++ are from host environment,
# otherwise UdfTest will fail:
@@ -50,8 +47,6 @@ export LIBRARIES="$LIBRARIES -L$PREFIX/lib"
# All these must be picked up from $PREFIX/bin
export CC=clang
export CXX=clang++
-export CMAKE_CC=clang
-export CMAKE_CXX=clang++
# Resolves `It appears that you have Arrow < 0.10.0`:
export CFLAGS="$CFLAGS -pthread"
@@ -61,7 +56,7 @@ export LDFLAGS="$LDFLAGS -lpthread -lrt -lresolv"
# `boost::system::detail::system_category_instance'`:
export CXXFLAGS="$CXXFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY"
-export EXTRA_CMAKE_OPTIONS="$EXTRA_CMAKE_OPTIONS -DCMAKE_C_COMPILER=$CMAKE_CC -DCMAKE_CXX_COMPILER=$CMAKE_CXX"
+export EXTRA_CMAKE_OPTIONS="$EXTRA_CMAKE_OPTIONS -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
mkdir -p build
cd build
@@ -87,11 +82,11 @@ make install
if [ "`ldd bin/initdb | grep "not found" | tr -d '[:space:]'`" == "libcuda.so.1=>notfound" ]; then
echo "SKIP RUNNING SANITY TESTS: libcuda.so.1 not found"
else
- # Add g++ include paths for astparser. This used by the loadtime
- # UDF support, resolves not found include files errors: cstdint,
- # bits/c++config.h, features.h
- GCCVERSION=$(basename $(dirname $(g++ -print-libgcc-file-name)))
- export CPLUS_INCLUDE_PATH=$PREFIX/$HOST/include/c++/$GCCVERSION:$PREFIX/$HOST/include/c++/$GCCVERSION/$HOST:$PREFIX/$HOST/sysroot/usr/include
+ # Add g++ include paths for astparser. This is used by the
+ # loadtime UDF support, resolves not found include files errors:
+ # cstdint, bits/c++config.h, features.h
+ GCCVERSION=$(basename $(dirname $($GXX -print-libgcc-file-name)))
+ export CPLUS_INCLUDE_PATH=$PREFIX/$HOST/include/c++/$GCCVERSION:$PREFIX/lib/gcc/$HOST/$GCCVERSION/include
mkdir tmp
$PREFIX/bin/initdb tmp
