Git Product home page Git Product logo

Comments (7)

tobil4sk avatar tobil4sk commented on June 12, 2024

Did you make sure to install all the dependencies?
https://github.com/HaxeFoundation/hashlink#building-on-linuxosx

from hashlink.

avrame avatar avrame commented on June 12, 2024

yes, I ran brew bundle as is documented.

from hashlink.

tobil4sk avatar tobil4sk commented on June 12, 2024

Did you make sure to run brew bundle with the x86_64 build of homebrew?

from hashlink.

avrame avatar avrame commented on June 12, 2024

yes

from hashlink.

tobil4sk avatar tobil4sk commented on June 12, 2024

LIBFLAGS += -L/usr/local/opt/libjpeg-turbo/lib -L/usr/local/opt/jpeg-turbo/lib -L/usr/local/lib -L/usr/local/opt/libvorbis/lib -L/usr/local/opt/openal-soft/lib

Looks like the path for libpng is missing here? You could try adding it.

Alternatively, you could also try the makefile patches for M1 from this PR: https://github.com/HaxeFoundation/hashlink/pull/577/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52

from hashlink.

avrame avatar avrame commented on June 12, 2024

Unfortunately, neither of those ideas worked. I get the same ld: library not found for -lpng error after adding the directory where libpng is.

And when using the branch in the PR I get this when running make:

Undefined symbols for architecture x86_64:
  "_ov_clear", referenced from:
      _ogg_finalize in fmt.o
  "_ov_info", referenced from:
      _fmt_ogg_info in fmt.o
  "_ov_open_callbacks", referenced from:
      _fmt_ogg_open in fmt.o
  "_ov_pcm_seek", referenced from:
      _fmt_ogg_seek in fmt.o
  "_ov_pcm_tell", referenced from:
      _fmt_ogg_tell in fmt.o
  "_ov_pcm_total", referenced from:
      _fmt_ogg_info in fmt.o
  "_ov_read", referenced from:
      _fmt_ogg_read in fmt.o
  "_png_image_begin_read_from_memory", referenced from:
      _fmt_png_decode in fmt.o
  "_png_image_finish_read", referenced from:
      _fmt_png_decode in fmt.o
  "_png_image_free", referenced from:
      _fmt_png_decode in fmt.o
  "_tjDecompress2", referenced from:
      _fmt_jpg_decode in fmt.o
  "_tjDestroy", referenced from:
      _fmt_jpg_decode in fmt.o
  "_tjInitDecompress", referenced from:
      _fmt_jpg_decode in fmt.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [fmt] Error 1

from hashlink.

avrame avatar avrame commented on June 12, 2024

ok, I finally got it working. Thanks for your help @tobil4sk
I did indeed need to add the libpng library dir to that line that sets LIBFLAGS, along with several others. In the end, this is what worked:

LIBFLAGS += -L/usr/local/homebrew/opt/libjpeg-turbo/lib -L/usr/local/homebrew/opt -L/usr/local/homebrew/opt/jpeg-turbo/lib -L/usr/local/lib -L/usr/local/homebrew/opt/libvorbis/lib -L/usr/local/homebrew/opt/openal-soft/lib -L/usr/local/homebrew/opt/libpng/lib -L/usr/local/homebrew/opt/sdl2/lib -L/usr/local/homebrew/opt/mbedtls@2/lib -L/usr/local/homebrew/opt/libuv/lib

I hope this is useful for anyone else with an arm64 Mac.

from hashlink.

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.