Giter VIP home page Giter VIP logo

Comments (14)

juancresc avatar juancresc commented on May 18, 2024 2

I see the point, I need to reinstall go for arm64

from build.

wamuir avatar wamuir commented on May 18, 2024

How are you invoking go build (i.e., what command(s) are run within the Makefile's build rule)? Are you attempting to cross-compile by setting GOARCH to amd64? As you state, your TF shared library is compiled for 64-bit ARM.

from build.

juancresc avatar juancresc commented on May 18, 2024

@wamuir I removed GOARCH=arm64 and now I get this:

CGO_ENABLED=1 go build 
./executable
dyld[99082]: Library not loaded: @rpath/libtensorflow_framework.2.dylib
  Referenced from: /usr/local/lib/libtensorflow.2.dylib
  Reason: tried: '/usr/local/lib/../_solib_darwin_x86_64/_U_S_Stensorflow_Clibtensorflow.2.7.0.dylib___Utensorflow/libtensorflow_framework.2.dylib' (no such file), '/usr/local/lib/libtensorflow_framework.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libtensorflow_framework.2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libtensorflow_framework.2.dylib' (no such file)
[1]    99082 abort      ./executable

from build.

wamuir avatar wamuir commented on May 18, 2024

This error is due to your build and installation of libtensorflow. There is an open issue for building libtensorflow on M1 at tensorflow/tensorflow/issues/52160 and I see that you have also commented in that issue and requested assistance. As an initial step, and before attempting to use the Go bindings, verify that you can at least compile and successfully run the libtensorflow example program.

from build.

juancresc avatar juancresc commented on May 18, 2024

@wamuir not working :(

# on the tensorflow source code path
export LIBRARY_PATH="${LIBRARY_PATH}::/Users/juan.crescente/Documents/lib/tensorflow/bazel-bin/tensorflow/"

export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Users/juan.crescente/Documents/lib/tensorflow/bazel-bin/tensorflow/"

sudo cp libtensorflow* /usr/local/lib/.

gcc hello_tf.c -ltensorflow -o hello_tf  -L /usr/local/lib 
hello_tf.c:1:1: error: expected identifier or '('
%%writefile hello_tf.c
^
hello_tf.c:3:10: fatal error: 'tensorflow/c/c_api.h' file not found
#include <tensorflow/c/c_api.h>
         ^~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

from build.

juancresc avatar juancresc commented on May 18, 2024

If I copy the x86 files into /usr/local/lib I got a different error:

 go run  
# command-line-arguments
/usr/local/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: ignoring file /usr/local/lib//libtensorflow.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_TFE_ContextListDevices", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_ContextListDevices in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_ContextListDevices)
  "_TFE_ContextOptionsSetAsync", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_ContextOptionsSetAsync in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_ContextOptionsSetAsync)
  "_TFE_ContextOptionsSetConfig", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_ContextOptionsSetConfig in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_ContextOptionsSetConfig)
  "_TFE_DeleteContext", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContext in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContext, __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContextOptions )
  "_TFE_DeleteContextOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContextOptions in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContextOptions)
  "_TFE_DeleteTensorHandle", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_DeleteTensorHandle in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_DeleteTensorHandle)
  "_TFE_NewContext", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_NewContext in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_NewContextOptions, __cgo_5439f5b57bf2_Cfunc_TFE_NewContext )
  "_TFE_NewContextOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_NewContextOptions in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_NewContextOptions)
  "_TFE_NewTensorHandle", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_NewTensorHandle in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_NewTensorHandle)
  "_TFE_TensorHandleCopyToDevice", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleCopyToDevice in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleCopyToDevice)
  "_TFE_TensorHandleDataType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDataType in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDataType)
  "_TFE_TensorHandleDeviceName", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDeviceName in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDeviceName)
  "_TFE_TensorHandleDim", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDim in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDim)
  "_TFE_TensorHandleNumDims", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleNumDims in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleNumDims)
  "_TFE_TensorHandleResolve", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleResolve in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleResolve)
  "_TF_AddControlInput", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AddControlInput in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AddControlInput)
  "_TF_AddGradientsWithPrefix", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AddGradientsWithPrefix in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AddGradientsWithPrefix)
  "_TF_AddInput", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AddInput in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AddInputList, __cgo_5439f5b57bf2_Cfunc_TF_AddInput )
  "_TF_AddInputList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AddInputList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AddInputList)
  "_TF_AllocateTensor", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AllocateTensor in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AllocateTensor)
  "_TF_CloseSession", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_CloseSession in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_CloseSession)
  "_TF_DeleteBuffer", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteBuffer in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteBuffer)
  "_TF_DeleteDeviceList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteDeviceList in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteDeviceList)
  "_TF_DeleteGraph", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteGraph in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteGraph)
  "_TF_DeleteImportGraphDefOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteImportGraphDefOptions in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteImportGraphDefOptions)
  "_TF_DeleteLibraryHandle", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteLibraryHandle in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteLibraryHandle)
  "_TF_DeletePRunHandle", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeletePRunHandle in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeletePRunHandle)
  "_TF_DeleteSession", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteSession in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteSessionOptions, __cgo_5439f5b57bf2_Cfunc_TF_DeleteSession )
  "_TF_DeleteSessionOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteSessionOptions in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteSessionOptions)
  "_TF_DeleteStatus", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteStatus in 000009.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteStatus)
  "_TF_DeleteTensor", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteTensor in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteTensor)
  "_TF_DeviceListCount", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeviceListCount in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeviceListCount)
  "_TF_DeviceListMemoryBytes", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeviceListMemoryBytes in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeviceListMemoryBytes)
  "_TF_DeviceListName", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeviceListName in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeviceListName)
  "_TF_DeviceListType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeviceListType in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeviceListType)
  "_TF_Dim", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_Dim in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_Dim)
  "_TF_FinishOperation", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_FinishOperation in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_FinishOperation)
  "_TF_GetCode", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GetCode in 000009.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GetCode)
  "_TF_GraphGetTensorNumDims", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphGetTensorNumDims in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphGetTensorNumDims)
  "_TF_GraphGetTensorShape", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphGetTensorShape in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphGetTensorShape)
  "_TF_GraphImportGraphDef", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphImportGraphDef in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphImportGraphDef)
  "_TF_GraphNextOperation", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphNextOperation in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphNextOperation)
  "_TF_GraphOperationByName", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphOperationByName in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphOperationByName)
  "_TF_GraphToGraphDef", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphToGraphDef in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphToGraphDef)
  "_TF_ImportGraphDefOptionsAddInputMapping", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsAddInputMapping in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsAddInputMapping)
  "_TF_ImportGraphDefOptionsSetDefaultDevice", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsSetDefaultDevice in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsSetDefaultDevice)
  "_TF_ImportGraphDefOptionsSetPrefix", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsSetPrefix in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsSetPrefix)
  "_TF_LoadLibrary", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_LoadLibrary in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_LoadLibrary)
  "_TF_LoadSessionFromSavedModel", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_LoadSessionFromSavedModel in 000006.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_LoadSessionFromSavedModel)
  "_TF_Message", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_Message in 000009.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_Message)
  "_TF_NewBuffer", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewBuffer in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewBuffer)
  "_TF_NewGraph", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewGraph in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewGraph)
  "_TF_NewImportGraphDefOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewImportGraphDefOptions in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewImportGraphDefOptions)
  "_TF_NewOperation", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewOperation in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewOperation)
  "_TF_NewSession", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewSession in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewSessionOptions, __cgo_5439f5b57bf2_Cfunc_TF_NewSession )
  "_TF_NewSessionOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewSessionOptions in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewSessionOptions)
  "_TF_NewStatus", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewStatus in 000009.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewStatus)
  "_TF_NumDims", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NumDims in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NumDims)
  "_TF_OperationDevice", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationDevice in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationDevice)
  "_TF_OperationGetAttrBool", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBool in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBoolList, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBool )
  "_TF_OperationGetAttrBoolList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBoolList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBoolList)
  "_TF_OperationGetAttrFloat", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloat in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloatList, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloat )
  "_TF_OperationGetAttrFloatList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloatList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloatList)
  "_TF_OperationGetAttrInt", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrInt in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrInt, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrIntList )
  "_TF_OperationGetAttrIntList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrIntList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrIntList)
  "_TF_OperationGetAttrMetadata", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrMetadata in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrMetadata)
  "_TF_OperationGetAttrShape", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShape in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShape, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShapeList )
  "_TF_OperationGetAttrShapeList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShapeList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShapeList)
  "_TF_OperationGetAttrString", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrString in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrString, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrStringList )
  "_TF_OperationGetAttrStringList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrStringList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrStringList)
  "_TF_OperationGetAttrTensor", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensor in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensor, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensorList )
  "_TF_OperationGetAttrTensorList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensorList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensorList)
  "_TF_OperationGetAttrType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrType in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTypeList, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrType )
  "_TF_OperationGetAttrTypeList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTypeList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTypeList)
  "_TF_OperationInput", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationInput in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationInputType, __cgo_5439f5b57bf2_Cfunc_TF_OperationInput )
  "_TF_OperationInputType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationInputType in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationInputType)
  "_TF_OperationName", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationName in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationName)
  "_TF_OperationNumInputs", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationNumInputs in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationNumInputs)
  "_TF_OperationNumOutputs", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationNumOutputs in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationNumOutputs)
  "_TF_OperationOpType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOpType in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOpType)
  "_TF_OperationOutputConsumers", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputConsumers in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputConsumers)
  "_TF_OperationOutputListLength", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputListLength in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputListLength)
  "_TF_OperationOutputNumConsumers", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputNumConsumers in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputNumConsumers)
  "_TF_OperationOutputType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputType in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputType)
  "_TF_SessionListDevices", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SessionListDevices in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SessionListDevices)
  "_TF_SessionPRun", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SessionPRun in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SessionPRunSetup, __cgo_5439f5b57bf2_Cfunc_TF_SessionPRun )
  "_TF_SessionPRunSetup", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SessionPRunSetup in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SessionPRunSetup)
  "_TF_SessionRun", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SessionRun in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SessionRun)
  "_TF_SetAttrBool", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBool in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBoolList, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBool )
  "_TF_SetAttrBoolList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBoolList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBoolList)
  "_TF_SetAttrFloat", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloat in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloatList, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloat )
  "_TF_SetAttrFloatList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloatList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloatList)
  "_TF_SetAttrInt", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrInt in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrIntList, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrInt )
  "_TF_SetAttrIntList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrIntList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrIntList)
  "_TF_SetAttrShape", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShape in 000003.o
     (maybe you meant: _TF_SetAttrShapeList_Helper, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList_Helper , __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList , __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShape )
  "_TF_SetAttrShapeList", referenced from:
      _TF_SetAttrShapeList_Helper in 000003.o
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList in 000003.o
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList_Helper in 000003.o
     (maybe you meant: _TF_SetAttrShapeList_Helper, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList_Helper , __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList )
  "_TF_SetAttrString", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrString in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrStringList, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrString )
  "_TF_SetAttrStringList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrStringList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrStringList)
  "_TF_SetAttrTensor", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensor in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensor, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensorList )
  "_TF_SetAttrTensorList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensorList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensorList)
  "_TF_SetAttrType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrType in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrType, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTypeList )
  "_TF_SetAttrTypeList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTypeList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTypeList)
  "_TF_SetConfig", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetConfig in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetConfig)
  "_TF_SetDevice", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetDevice in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetDevice)
  "_TF_SetTarget", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetTarget in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetTarget)
  "_TF_TensorBitcastFrom", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_TensorBitcastFrom in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_TensorBitcastFrom)
  "_TF_TensorByteSize", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_TensorByteSize in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_TensorByteSize)
  "_TF_TensorData", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_TensorData in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_TensorData)
  "_TF_TensorType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_TensorType in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_TensorType)
  "_TF_Version", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_Version in 000012.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_Version)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


from build.

wamuir avatar wamuir commented on May 18, 2024

If I copy the x86 files into /usr/local/lib I got a different error

Let's start here: what are you trying to do?

from build.

juancresc avatar juancresc commented on May 18, 2024

@wamuir in this case, I copied the content of the libs provided here from the tutorial.
https://www.tensorflow.org/install/lang_c#build

But just to make sure I was also following all the steps in the tutorial. In the prev message, I built TF from source and used those files.

from build.

wamuir avatar wamuir commented on May 18, 2024

The binaries that you downloaded are for x86_64, which is a different architecture than that of your system. Presumably, when you built libtensorflow from source you targeted your system's architecture (arm64). You've appeared to mix/intermingle these and likely didn't install them correctly in either case, hence the errors that you are receiving.

Do you agree with this?

from build.

juancresc avatar juancresc commented on May 18, 2024

@wamuir thanks for the explanation and yes makes sense, but I have also used only the binaries obtained from building from source. Check this. You can see that it is using binaries built from source on my M1 machine:

go run main.go
# command-line-arguments
/usr/local/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: ignoring file /Users/juan/Documents/lib/tensorflow/bazel-bin/tensorflow/libtensorflow.so, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_TFE_ContextListDevices", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_ContextListDevices in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_ContextListDevices)
  "_TFE_ContextOptionsSetAsync", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_ContextOptionsSetAsync in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_ContextOptionsSetAsync)
  "_TFE_ContextOptionsSetConfig", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_ContextOptionsSetConfig in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_ContextOptionsSetConfig)
  "_TFE_DeleteContext", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContext in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContext, __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContextOptions )
  "_TFE_DeleteContextOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContextOptions in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_DeleteContextOptions)
  "_TFE_DeleteTensorHandle", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_DeleteTensorHandle in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_DeleteTensorHandle)
  "_TFE_NewContext", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_NewContext in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_NewContextOptions, __cgo_5439f5b57bf2_Cfunc_TFE_NewContext )
  "_TFE_NewContextOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_NewContextOptions in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_NewContextOptions)
  "_TFE_NewTensorHandle", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_NewTensorHandle in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_NewTensorHandle)
  "_TFE_TensorHandleCopyToDevice", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleCopyToDevice in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleCopyToDevice)
  "_TFE_TensorHandleDataType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDataType in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDataType)
  "_TFE_TensorHandleDeviceName", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDeviceName in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDeviceName)
  "_TFE_TensorHandleDim", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDim in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleDim)
  "_TFE_TensorHandleNumDims", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleNumDims in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleNumDims)
  "_TFE_TensorHandleResolve", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleResolve in 000011.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TFE_TensorHandleResolve)
  "_TF_AddControlInput", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AddControlInput in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AddControlInput)
  "_TF_AddGradientsWithPrefix", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AddGradientsWithPrefix in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AddGradientsWithPrefix)
  "_TF_AddInput", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AddInput in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AddInputList, __cgo_5439f5b57bf2_Cfunc_TF_AddInput )
  "_TF_AddInputList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AddInputList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AddInputList)
  "_TF_AllocateTensor", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_AllocateTensor in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_AllocateTensor)
  "_TF_CloseSession", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_CloseSession in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_CloseSession)
  "_TF_DeleteBuffer", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteBuffer in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteBuffer)
  "_TF_DeleteDeviceList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteDeviceList in 000002.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteDeviceList)
  "_TF_DeleteGraph", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteGraph in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteGraph)
  "_TF_DeleteImportGraphDefOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteImportGraphDefOptions in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteImportGraphDefOptions)
  "_TF_DeleteLibraryHandle", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteLibraryHandle in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteLibraryHandle)
  "_TF_DeletePRunHandle", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeletePRunHandle in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeletePRunHandle)
  "_TF_DeleteSession", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteSession in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteSessionOptions, __cgo_5439f5b57bf2_Cfunc_TF_DeleteSession )
  "_TF_DeleteSessionOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteSessionOptions in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteSessionOptions)
  "_TF_DeleteStatus", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteStatus in 000009.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteStatus)
  "_TF_DeleteTensor", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeleteTensor in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeleteTensor)
  "_TF_DeviceListCount", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeviceListCount in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeviceListCount)
  "_TF_DeviceListMemoryBytes", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeviceListMemoryBytes in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeviceListMemoryBytes)
  "_TF_DeviceListName", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeviceListName in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeviceListName)
  "_TF_DeviceListType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_DeviceListType in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_DeviceListType)
  "_TF_Dim", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_Dim in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_Dim)
  "_TF_FinishOperation", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_FinishOperation in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_FinishOperation)
  "_TF_GetCode", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GetCode in 000009.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GetCode)
  "_TF_GraphGetTensorNumDims", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphGetTensorNumDims in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphGetTensorNumDims)
  "_TF_GraphGetTensorShape", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphGetTensorShape in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphGetTensorShape)
  "_TF_GraphImportGraphDef", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphImportGraphDef in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphImportGraphDef)
  "_TF_GraphNextOperation", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphNextOperation in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphNextOperation)
  "_TF_GraphOperationByName", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphOperationByName in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphOperationByName)
  "_TF_GraphToGraphDef", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_GraphToGraphDef in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_GraphToGraphDef)
  "_TF_ImportGraphDefOptionsAddInputMapping", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsAddInputMapping in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsAddInputMapping)
  "_TF_ImportGraphDefOptionsSetDefaultDevice", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsSetDefaultDevice in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsSetDefaultDevice)
  "_TF_ImportGraphDefOptionsSetPrefix", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsSetPrefix in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_ImportGraphDefOptionsSetPrefix)
  "_TF_LoadLibrary", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_LoadLibrary in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_LoadLibrary)
  "_TF_LoadSessionFromSavedModel", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_LoadSessionFromSavedModel in 000006.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_LoadSessionFromSavedModel)
  "_TF_Message", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_Message in 000009.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_Message)
  "_TF_NewBuffer", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewBuffer in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewBuffer)
  "_TF_NewGraph", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewGraph in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewGraph)
  "_TF_NewImportGraphDefOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewImportGraphDefOptions in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewImportGraphDefOptions)
  "_TF_NewOperation", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewOperation in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewOperation)
  "_TF_NewSession", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewSession in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewSessionOptions, __cgo_5439f5b57bf2_Cfunc_TF_NewSession )
  "_TF_NewSessionOptions", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewSessionOptions in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewSessionOptions)
  "_TF_NewStatus", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NewStatus in 000009.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NewStatus)
  "_TF_NumDims", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_NumDims in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_NumDims)
  "_TF_OperationDevice", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationDevice in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationDevice)
  "_TF_OperationGetAttrBool", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBool in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBoolList, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBool )
  "_TF_OperationGetAttrBoolList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBoolList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrBoolList)
  "_TF_OperationGetAttrFloat", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloat in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloatList, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloat )
  "_TF_OperationGetAttrFloatList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloatList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrFloatList)
  "_TF_OperationGetAttrInt", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrInt in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrInt, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrIntList )
  "_TF_OperationGetAttrIntList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrIntList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrIntList)
  "_TF_OperationGetAttrMetadata", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrMetadata in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrMetadata)
  "_TF_OperationGetAttrShape", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShape in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShape, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShapeList )
  "_TF_OperationGetAttrShapeList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShapeList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrShapeList)
  "_TF_OperationGetAttrString", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrString in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrString, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrStringList )
  "_TF_OperationGetAttrStringList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrStringList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrStringList)
  "_TF_OperationGetAttrTensor", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensor in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensor, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensorList )
  "_TF_OperationGetAttrTensorList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensorList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTensorList)
  "_TF_OperationGetAttrType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrType in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTypeList, __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrType )
  "_TF_OperationGetAttrTypeList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTypeList in 000001.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationGetAttrTypeList)
  "_TF_OperationInput", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationInput in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationInputType, __cgo_5439f5b57bf2_Cfunc_TF_OperationInput )
  "_TF_OperationInputType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationInputType in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationInputType)
  "_TF_OperationName", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationName in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationName)
  "_TF_OperationNumInputs", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationNumInputs in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationNumInputs)
  "_TF_OperationNumOutputs", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationNumOutputs in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationNumOutputs)
  "_TF_OperationOpType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOpType in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOpType)
  "_TF_OperationOutputConsumers", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputConsumers in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputConsumers)
  "_TF_OperationOutputListLength", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputListLength in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputListLength)
  "_TF_OperationOutputNumConsumers", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputNumConsumers in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputNumConsumers)
  "_TF_OperationOutputType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputType in 000005.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_OperationOutputType)
  "_TF_SessionListDevices", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SessionListDevices in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SessionListDevices)
  "_TF_SessionPRun", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SessionPRun in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SessionPRunSetup, __cgo_5439f5b57bf2_Cfunc_TF_SessionPRun )
  "_TF_SessionPRunSetup", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SessionPRunSetup in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SessionPRunSetup)
  "_TF_SessionRun", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SessionRun in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SessionRun)
  "_TF_SetAttrBool", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBool in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBoolList, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBool )
  "_TF_SetAttrBoolList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBoolList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrBoolList)
  "_TF_SetAttrFloat", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloat in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloatList, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloat )
  "_TF_SetAttrFloatList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloatList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrFloatList)
  "_TF_SetAttrInt", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrInt in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrIntList, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrInt )
  "_TF_SetAttrIntList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrIntList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrIntList)
  "_TF_SetAttrShape", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShape in 000003.o
     (maybe you meant: _TF_SetAttrShapeList_Helper, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList_Helper , __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList , __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShape )
  "_TF_SetAttrShapeList", referenced from:
      _TF_SetAttrShapeList_Helper in 000003.o
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList in 000003.o
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList_Helper in 000003.o
     (maybe you meant: _TF_SetAttrShapeList_Helper, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList_Helper , __cgo_5439f5b57bf2_Cfunc_TF_SetAttrShapeList )
  "_TF_SetAttrString", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrString in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrStringList, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrString )
  "_TF_SetAttrStringList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrStringList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrStringList)
  "_TF_SetAttrTensor", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensor in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensor, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensorList )
  "_TF_SetAttrTensorList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensorList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTensorList)
  "_TF_SetAttrType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrType in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrType, __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTypeList )
  "_TF_SetAttrTypeList", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTypeList in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetAttrTypeList)
  "_TF_SetConfig", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetConfig in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetConfig)
  "_TF_SetDevice", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetDevice in 000003.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetDevice)
  "_TF_SetTarget", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_SetTarget in 000007.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_SetTarget)
  "_TF_TensorBitcastFrom", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_TensorBitcastFrom in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_TensorBitcastFrom)
  "_TF_TensorByteSize", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_TensorByteSize in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_TensorByteSize)
  "_TF_TensorData", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_TensorData in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_TensorData)
  "_TF_TensorType", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_TensorType in 000010.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_TensorType)
  "_TF_Version", referenced from:
      __cgo_5439f5b57bf2_Cfunc_TF_Version in 000012.o
     (maybe you meant: __cgo_5439f5b57bf2_Cfunc_TF_Version)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

from build.

wamuir avatar wamuir commented on May 18, 2024

Please provide output from running go env

from build.

juancresc avatar juancresc commented on May 18, 2024

@wamuir sure:

go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/juan/Library/Caches/go-build"
GOENV="/Users/juan/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/juan/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/juan/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.6"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/juan/Documents/code/rtb/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7m/mnymf5ss1mz39ygdshyl69n40000gp/T/go-build1471044767=/tmp/go-build -gno-record-gcc-switches -fno-common"

from build.

saiteja111997 avatar saiteja111997 commented on May 18, 2024

@juancresc Did it work ??

from build.

juancresc avatar juancresc commented on May 18, 2024

@saiteja111997 i mean im running TF in a arm64 M1 mac but i dont remember how the hell i installed it.

from build.

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.