PMunch/futhark

Opir segfaults when wrapping libantumbra

tandy-1000 opened this issue · 0 comments

I'm trying to wrap libantumbra using the following code (where . is libantumbra/):

# antumbra.nim
import pkg/futhark

importc:
  sysPath "/usr/lib64/clang/14/include"
  path "."
  "libantumbra.h"

{.passL:"-lantumbra".}

This generates:

# ~/.cache/nim/antumbra_d/futhark-includes.h
#include "libantumbra.h"

And runs Opir:

$ opir -I/usr/lib64/clang/14/include -I/home/tandy/libantumbra /home/tandy/.cache/nim/antumbra_d/futhark-includes.h
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault (core dumped)

Thank you.