gotch: install error on osx

Hi,

I have a small demo example I want to try but get the following error:

go run main.go
# github.com/sugarme/gotch/libtch
torch_api.cpp:1:9: fatal error: 'torch/csrc/autograd/engine.h' file not found

than I used: https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.11.0.zip

and get this error:

go run main.go                                                                                                       

# github.com/sugarme/gotch/libtch
/Users/arnold1/go/pkg/mod/github.com/sugarme/gotch@v0.7.0/libtch/tensor.go:100:16: cannot use c_ptr (variable of type *_Ctype_long) as type *_Ctype_longlong in variable declaration
/Users/arnold1/go/pkg/mod/github.com/sugarme/gotch@v0.7.0/libtch/tensor.go:142:50: cannot use cindexes (variable of type *_Ctype_long) as type *_Ctype_longlong in variable declaration
/Users/arnold1/go/pkg/mod/github.com/sugarme/gotch@v0.7.0/libtch/tensor.go:151:49: cannot use cindexes (variable of type *_Ctype_long) as type *_Ctype_longlong in variable declaration

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

isn’t that syntax for make? export: not valid in this context: :

I think it needs to be:

$ export CC=/usr/bin/clang
$ export CXX=/usr/bin/clang++