Code Monkey home page Code Monkey logo

Comments (14)

mfreeman451 avatar mfreeman451 commented on July 20, 2024 1

having the same issue on m1

from tfgo.

true-zero avatar true-zero commented on July 20, 2024

Initialised go mod which seemed to help with the issue but then created a different issue with gcc.

C:\Users\User\go\src\testTensor>go mod init
go: creating new go.mod: module testTensor

C:\Users\User\go\src\testTensor>go get github.com/galeone/tfgo
go: github.com/galeone/tfgo upgrade => v0.0.0-20210204182614-84b9a5e77f79
go: downloading github.com/galeone/tensorflow v2.4.0-rc0.0.20210202175351-640a390c2283+incompatible
go: downloading github.com/golang/protobuf v1.4.3
go: downloading google.golang.org/protobuf v1.25.0
# github.com/galeone/tensorflow/tensorflow/go
exec: "gcc": executable file not found in %PATH%

from tfgo.

true-zero avatar true-zero commented on July 20, 2024

After spending time installing MingGW and adding it to the PATH for system.

C:\Users\User\go\src\testTensor>go get github.com/galeone/tfgo
# github.com/galeone/tensorflow/tensorflow/go
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ltensorflow
collect2.exe: error: ld returned 1 exit status

from tfgo.

true-zero avatar true-zero commented on July 20, 2024

According to the official documentation Go bindings for Tensorflow is not supported on Windows systems however according to this comment with a bit of hacking together it may be possible to get it to work.

from tfgo.

galeone avatar galeone commented on July 20, 2024

Really sorry but I'm not able to help you, I don't have a windows machine 😅

I'd keep this issue open hoping for someone in the same situation that might be able to solve this. Or maybe, if you'll be able to make it work on windows you could open a pull request even to describe the step-by-step process, it would be really appreciated

from tfgo.

vkuznet avatar vkuznet commented on July 20, 2024

Hi,
how about macOS? I have the following problem:

# I tried with and without
# go env -w GONOSUMDB="github.com/galeone/tensorflow"

go get github.com/galeone/tfgo
go: downloading github.com/galeone/tfgo v0.0.0-20210204182614-84b9a5e77f79
go: downloading github.com/galeone/tensorflow v2.4.0-rc0.0.20210202175351-640a390c2283+incompatible
# github.com/galeone/tensorflow/tensorflow/go
Undefined symbols for architecture x86_64:
  "_TFE_ContextOptionsSetAsync", referenced from:
      __cgo_3a1240f23db5_Cfunc_TFE_ContextOptionsSetAsync in _x003.o
     (maybe you meant: __cgo_3a1240f23db5_Cfunc_TFE_ContextOptionsSetAsync)
  "_TF_AddGradientsWithPrefix", referenced from:
      __cgo_3a1240f23db5_Cfunc_TF_AddGradientsWithPrefix in _x004.o
     (maybe you meant: __cgo_3a1240f23db5_Cfunc_TF_AddGradientsWithPrefix)
  "_TF_ImportGraphDefOptionsSetDefaultDevice", referenced from:
      __cgo_3a1240f23db5_Cfunc_TF_ImportGraphDefOptionsSetDefaultDevice in _x004.o
     (maybe you meant: __cgo_3a1240f23db5_Cfunc_TF_ImportGraphDefOptionsSetDefaultDevice)
  "_TF_TensorBitcastFrom", referenced from:
      __cgo_3a1240f23db5_Cfunc_TF_TensorBitcastFrom in _x011.o
     (maybe you meant: __cgo_3a1240f23db5_Cfunc_TF_TensorBitcastFrom)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

from tfgo.

galeone avatar galeone commented on July 20, 2024

Hi @vkuznet , have you downloaded and installed in your system the correct library? https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-darwin-x86_64-2.4.0.tar.gz

I don't have a Mac so I can't help you trying to reproduce your issue on my computer, but It looks like some symbol is missing from the library.

Have you tried to follow the steps suggested in the tensorflow install c documentation and run the hello world in C? Does it work?

from tfgo.

vkuznet avatar vkuznet commented on July 20, 2024

After several iterations I found the issue. Turns out I had in /usr/local/lib previous version of TF (1.X) I was need to remove it, then I copied TF 2.4 library to /usr/local/lib and after that I was able to get tfgo. Now it seems to work

from tfgo.

galeone avatar galeone commented on July 20, 2024

After several iterations I found the issue. Turns out I had in /usr/local/lib previous version of TF (1.X) I was need to remove it, then I copied TF 2.4 library to /usr/local/lib and after that I was able to get tfgo. Now it seems to work

Great! Thank you for this update. Now I know that tfgo also runs on MacOS then :)

from tfgo.

farshed avatar farshed commented on July 20, 2024

Hi @galeone, is there a way to use it on mac arm64. It gives me the following error when I try to install.

ld: warning: ignoring file /usr/local/lib/libtensorflow.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
"_TFE_ContextListDevices", referenced from:
__cgo_54a25ea29f0c_Cfunc_TFE_ContextListDevices in _x003.o
(maybe you meant: __cgo_54a25ea29f0c_Cfunc_TFE_ContextListDevices)
"_TFE_ContextOptionsSetAsync", referenced from:
__cgo_54a25ea29f0c_Cfunc_TFE_ContextOptionsSetAsync in _x003.o
(maybe you meant: __cgo_54a25ea29f0c_Cfunc_TFE_ContextOptionsSetAsync)
"_TFE_ContextOptionsSetConfig", referenced from:
__cgo_54a25ea29f0c_Cfunc_TFE_ContextOptionsSetConfig in _x003.o
(maybe you meant: __cgo_54a25ea29f0c_Cfunc_TFE_ContextOptionsSetConfig)
"_TFE_DeleteContext", referenced from:
__cgo_54a25ea29f0c_Cfunc_TFE_DeleteContext in _x003.o
(maybe you meant: __cgo_54a25ea29f0c_Cfunc_TFE_DeleteContextOptions, __cgo_54a25ea29f0c_Cfunc_TFE_DeleteContext )

from tfgo.

vkuznet avatar vkuznet commented on July 20, 2024

@farshed I think it is question about TF library availability on arm64 architecture rather about tfgo. You should check with TF libs for that platform.

from tfgo.

farshed avatar farshed commented on July 20, 2024

@vkuznet Thanks for confirming. I was hoping there was a way to run the x86_64 build with Rosetta 2 but I guess I'll just have to wait for the arm64 support.

from tfgo.

yiippee avatar yiippee commented on July 20, 2024

on wsl2 alse gets the same errors:

github.com/galeone/tensorflow/tensorflow/go imports
        github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto: cannot find module providing package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto

Do I miss something? Thanks.

from tfgo.

yiippee avatar yiippee commented on July 20, 2024

According to the official documentation Go bindings for Tensorflow is not supported on Windows systems however according to this comment with a bit of hacking together it may be possible to get it to work.

Do you run on the wsl2 ? I get the same error. Thanks.

from tfgo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.