Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Could not find or use auto-linked library #28

Open
kkivan opened this issue Aug 5, 2021 · 2 comments
Open

Could not find or use auto-linked library #28

kkivan opened this issue Aug 5, 2021 · 2 comments

Comments

@kkivan
Copy link

kkivan commented Aug 5, 2021

Got this error when trying to run the target with the GraphViz package
GraphViz installed with Homebrew, works perfectly as cli in terminal

The issue is with M1 Macs only.

ld: warning: Could not find or use auto-linked library 'gvc'
ld: warning: Could not find or use auto-linked library 'cgraph'
Undefined symbols for architecture arm64:
  "_agerrors", referenced from:
      GraphViz.attempt<A>(throwing: () -> A) throws -> A in GraphViz.o
  "_aglasterr", referenced from:
      static GraphViz.Error.(lastErrorMessage in _24C6592C881063ABBFDC7A6D4D4AA881).getter : Swift.String? in GraphViz.o
  "_agmemread", referenced from:
      closure #1 () -> Swift.UnsafeMutablePointer<__C.Agraph_s>? in closure #1 (Swift.UnsafePointer<Swift.Int8>) throws -> Swift.UnsafeMutablePointer<__C.Agraph_s>? in closure #1 () throws -> Foundation.Data in closure #1 () -> () in GraphViz.Renderer.render(dot: Swift.String, to: GraphViz.Format, on: __C.OS_dispatch_queue, completion: (Swift.Result<Foundation.Data, Swift.Error>) -> ()) -> () in GraphViz.o
  "_gvContext", referenced from:
      closure #1 () throws -> Foundation.Data in closure #1 () -> () in GraphViz.Renderer.render(dot: Swift.String, to: GraphViz.Format, on: __C.OS_dispatch_queue, completion: (Swift.Result<Foundation.Data, Swift.Error>) -> ()) -> () in GraphViz.o
  "_gvFreeContext", referenced from:
      $defer #1 () -> () in closure #1 () throws -> Foundation.Data in closure #1 () -> () in GraphViz.Renderer.render(dot: Swift.String, to: GraphViz.Format, on: __C.OS_dispatch_queue, completion: (Swift.Result<Foundation.Data, Swift.Error>) -> ()) -> () in GraphViz.o
  "_gvFreeLayout", referenced from:
      $defer #2 () -> () in closure #1 () throws -> Foundation.Data in closure #1 () -> () in GraphViz.Renderer.render(dot: Swift.String, to: GraphViz.Format, on: __C.OS_dispatch_queue, completion: (Swift.Result<Foundation.Data, Swift.Error>) -> ()) -> () in GraphViz.o
  "_gvFreeRenderData", referenced from:
      $defer #3 () -> () in closure #1 () throws -> Foundation.Data in closure #1 () -> () in GraphViz.Renderer.render(dot: Swift.String, to: GraphViz.Format, on: __C.OS_dispatch_queue, completion: (Swift.Result<Foundation.Data, Swift.Error>) -> ()) -> () in GraphViz.o
  "_gvLayout", referenced from:
      closure #1 () -> Swift.Int32 in closure #3 (Swift.UnsafePointer<Swift.Int8>) throws -> () in closure #1 () throws -> Foundation.Data in closure #1 () -> () in GraphViz.Renderer.render(dot: Swift.String, to: GraphViz.Format, on: __C.OS_dispatch_queue, completion: (Swift.Result<Foundation.Data, Swift.Error>) -> ()) -> () in GraphViz.o
  "_gvRenderData", referenced from:
      closure #1 () -> Swift.Int32 in closure #4 (Swift.UnsafePointer<Swift.Int8>) throws -> () in closure #1 () throws -> Foundation.Data in closure #1 () -> () in GraphViz.Renderer.render(dot: Swift.String, to: GraphViz.Format, on: __C.OS_dispatch_queue, completion: (Swift.Result<Foundation.Data, Swift.Error>) -> ()) -> () in GraphViz.o
  "_gvToolTred", referenced from:
      closure #2 () -> Swift.Int32 in closure #1 () throws -> Foundation.Data in closure #1 () -> () in GraphViz.Renderer.render(dot: Swift.String, to: GraphViz.Format, on: __C.OS_dispatch_queue, completion: (Swift.Result<Foundation.Data, Swift.Error>) -> ()) -> () in GraphViz.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@fjvaldera
Copy link

I have an Intel Mac and I have this same error.

@fjvaldera
Copy link

fjvaldera commented Sep 6, 2021

I have an Intel Mac and I have this same error.

In my case I was missing the Xcode Command Line Tools. Ran xcode-select --install, reinstalled the dependencies and all good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants