atilaneves / dpp

Directly include C headers in D source code
Boost Software License 1.0
231 stars 31 forks source link

Arrow: Program exited with code -11 #255

Open andre2007 opened 4 years ago

andre2007 commented 4 years ago

I have this dockerfile

FROM dlang2/ldc-ubuntu:1.20.0 as ldc

RUN apt-get update && apt-get install -y -V lsb-release wget \
    && wget https://apache.bintray.com/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb \
    && apt install -y -V ./apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb \
    && apt update && apt install -y -V libarrow-dev libparquet-dev

RUN apt-get install -y clang-9 libclang-9-dev
RUN ln -s /usr/bin/clang-9 /usr/bin/clang
RUN dub fetch dpp && DFLAGS="-L=-L/usr/lib/llvm-9/lib/" dub build dpp
COPY parquet.dpp /tmp/

RUN DFLAGS="-L=-L/usr/lib/llvm-9/lib/" dub run dpp -- /tmp/parquet.dpp \
    --parse-as-cpp \
    --include-path /usr/include/arrow \
    --include-path /usr/include/parquet \
    --preprocess-only

File parquet.dpp looks like this

#include <arrow/api.h>
#include <arrow/io/api.h>

Dpp ends with:

Running ./root/.dub/packages/dpp-0.4.1/dpp/bin/d++ /tmp/parquet.dpp --parse-as-cpp --include-path /usr/include/arrow --include-path /usr/include/parquet --preprocess-only Program exited with code -11 The command '/bin/sh -c DFLAGS="-L=-L/usr/lib/llvm-9/lib/" dub run dpp -- /tmp/parquet.dpp --parse-as-cpp --include-path /usr/include/arrow --include-path /usr/include/parquet --preprocess-only' returned a non-zero code: 2

atilaneves commented 4 years ago

The original issue (the crash) is fixed by this:

https://github.com/atilaneves/libclang/pull/20

But then the translation fails anyway because C++ is hard.

atilaneves commented 4 years ago

C++ support is just experimental at the moment.