You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: I was able to build TileDB-Go against libtiledb installed as a conda binary on Ubuntu but not macOS. Getting this to work is not currently urgent; I am documenting my experience below in case it becomes a priority in the future.
Building TileDB-Go against the libtiledb conda binary was straightforward. I installed libtiledb (conda install -c conda-forge tiledb) and then set the documented env vars:
If I don't manually set those env vars, then it can't find libtiledb:
$ go build .# github.com/TileDB-Inc/TileDB-Go
./array.go:6:10: fatal error: tiledb/tiledb.h: No such file or directory
6 |#include <tiledb/tiledb.h>| ^~~~~~~~~~~~~~~~~
compilation terminated.
As is expected, the above env vars are not sufficient for building on macOS. It cannot find the clang compiler installed in the conda env:
$ go test -v ./...
# runtime/cgo
cgo: C compiler "x86_64-apple-darwin13.4.0-clang" not found: exec: "x86_64-apple-darwin13.4.0-clang": executable file not found in$PATH
FAIL github.com/TileDB-Inc/TileDB-Go [build failed]
When I replace LD_LIBRARY_PATH with DYLD_LIBRARY_PATH, then it can find the compiler, but then it unexpectedly fails the system libarchive is referenced instead of the one installed in the conda env.
$ go test -v ./...
dyld: Symbol not found: _iconv
Referenced from: /usr/lib/libarchive.2.dylib
Expected in: /Users/runner/micromamba-root/envs/nightly/lib/libiconv.2.dylib
in /usr/lib/libarchive.2.dylib
/Users/runner/work/_temp/e8fbb84f-3bef-4e8d-8a75-22a209e66751.sh: line 16: 5184 Abort trap: 6 go test -v ./...
Notes on other things I tried:
Explicitly installing libarchive via conda had no effect
I tried replacing DYLD_LIBRARY_PATH wtih DYLD_FALLBACK_LIBRARY_PATH, but that had no effect (ie it was back to not being able to find the compiler)
I tried combining DYLD_FALLBACK_LIBRARY_PATH=$CONDA_PREFIX/lib and PATH=$CONDA_PREFIX/bin:$PATH, but it still couldn't find the compiler
I tested on a local osx-arm64. I couldn't even get the dyld error because DYLD_LIBRARY_PATH had no effect (presumably due to System Integrity Protection), and thus it couldn't find the compiler in the conda env
For anyone interested in troubleshooting this, here is my original GitHub Actions workflow that tested TileDB-Go against the nightly libtiledb conda binary on both Ubuntu and macOS. For PR #251, I switched to building libtiledb from source on macOS.
GitHub Actions workflow
name: TileDB-Go with nightly libtiledbon:
push:
paths:
- '.github/workflows/nightly.yml'
- '.github/scripts/nightly/**'schedule:
- cron: "0 4 * * *"# Every night at 4 AM UTC (11 PM EST; 12 AM EDT)workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}name: nightly-${{ matrix.os }}-go-${{ matrix.go }}strategy:
fail-fast: falsematrix:
go: ["1.18"]os: ["macos-11", "ubuntu-20.04"]defaults:
run:
shell: bash -l {0}steps:
- uses: actions/checkout@v3
- name: Install Conda environment with go and nightly libtiledbuses: mamba-org/provision-with-micromamba@mainwith:
environment-file: falseenvironment-name: nightlyextra-specs: | sel(osx): clang sel(linux): gcc sel(osx): libarchive conda-forge::go=${{ matrix.go }} tiledbchannels: tiledb/label/nightlies, conda-forge
- name: Install dependenciesrun: go get -t .
- name: Test TileDB-Gorun: | export CPATH=$CONDA_PREFIX/include export LIBRARY_PATH=$CONDA_PREFIX/lib OS=$(uname) if [[ "$OS" == "Linux" ]] then export LD_LIBRARY_PATH=$CONDA_PREFIX/lib elif [[ "$OS" == "Darwin" ]] then export DYLD_LIBRARY_PATH=$CONDA_PREFIX/lib else echo "Unrecognized OS: $OS" exit 1 fi go test -v ./...
The text was updated successfully, but these errors were encountered:
Summary: I was able to build TileDB-Go against libtiledb installed as a conda binary on Ubuntu but not macOS. Getting this to work is not currently urgent; I am documenting my experience below in case it becomes a priority in the future.
cc: @ihnorton
xref: #251
Building TileDB-Go against the libtiledb conda binary was straightforward. I installed libtiledb (
conda install -c conda-forge tiledb
) and then set the documented env vars:If I don't manually set those env vars, then it can't find libtiledb:
As is expected, the above env vars are not sufficient for building on macOS. It cannot find the clang compiler installed in the conda env:
When I replace
LD_LIBRARY_PATH
withDYLD_LIBRARY_PATH
, then it can find the compiler, but then it unexpectedly fails the system libarchive is referenced instead of the one installed in the conda env.Notes on other things I tried:
DYLD_LIBRARY_PATH
wtihDYLD_FALLBACK_LIBRARY_PATH
, but that had no effect (ie it was back to not being able to find the compiler)DYLD_FALLBACK_LIBRARY_PATH=$CONDA_PREFIX/lib
andPATH=$CONDA_PREFIX/bin:$PATH
, but it still couldn't find the compilerDYLD_LIBRARY_PATH
had no effect (presumably due to System Integrity Protection), and thus it couldn't find the compiler in the conda envFor anyone interested in troubleshooting this, here is my original GitHub Actions workflow that tested TileDB-Go against the nightly libtiledb conda binary on both Ubuntu and macOS. For PR #251, I switched to building libtiledb from source on macOS.
GitHub Actions workflow
The text was updated successfully, but these errors were encountered: