Skip to content

Can't be built from prebuilt binaries #4

Description

@magicaltoast

Can't get it to compile on Linux without GPU from official binaries

What I've done

  • Downloaded latest .tgz file from onnxruntime releases (onnxruntime-linux-x64-1.9.0.tgz)
  • Created empty folder /opt/onnxruntime
  • Extracted tgz file into that folder
  • I've set up bashrc as described in the instruction

Error

go get -v -tags='nogpu' github.com/c3sr/go-onnxruntime
github.com/c3sr/go-onnxruntime
# github.com/c3sr/go-onnxruntime
In file included from ../go/pkg/mod/github.com/c3sr/go-onnxruntime@v1.2.0/device.go:3:
./cbits/predictor.hpp:10:10: fatal error: onnxruntime_c_api.h: No such file or directory
   10 | #include <onnxruntime_c_api.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Bash rc setup

export LIBRARY_PATH=$LIBRARY_PATH:/opt/onnxruntime/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/onnxruntime/lib

Values of variables

echo $LIBRARY_PATH $LD_LIBRARY_PATH
:/opt/onnxruntime/lib :/opt/onnxruntime/lib

How /opt/onnxruntime/ looks

tree /opt/onnxruntime/
/opt/onnxruntime/
├── GIT_COMMIT_ID
├── include
│   ├── cpu_provider_factory.h
│   ├── onnxruntime_c_api.h
│   ├── onnxruntime_cxx_api.h
│   ├── onnxruntime_cxx_inline.h
│   ├── onnxruntime_run_options_config_keys.h
│   ├── onnxruntime_session_options_config_keys.h
│   └── provider_options.h
├── lib
│   ├── libonnxruntime.so -> libonnxruntime.so.1.9.0
│   └── libonnxruntime.so.1.9.0
├── LICENSE
├── Privacy.md
├── README.md
├── ThirdPartyNotices.txt
└── VERSION_NUMBER

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions