Comments (7)
Did you make sure to install all the dependencies?
https://github.com/HaxeFoundation/hashlink#building-on-linuxosx
from hashlink.
yes, I ran brew bundle
as is documented.
from hashlink.
Did you make sure to run brew bundle
with the x86_64 build of homebrew?
from hashlink.
yes
from hashlink.
Line 95 in b5509c0
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.
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.
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)
- 'Can't cast (void (ref<f64>)) to (void ())' error for methods with varargs parameters HOT 3
- Can't compile on arch linux HOT 15
- Evaluate Profile-Guided Optimization (PGO)
- Maps are slow in hashlink HOT 1
- Failed to run on openSUSE HOT 2
- sys.FileStat.ctime is not accurate on Linux/macOS
- NDK version for android?
- `brew install hashlink` fails on Mac M1 HOT 2
- [hl/c] stack capture implementation for unix HOT 3
- Which and when should I use `cmake` or `make` to build HashLink? HOT 1
- compile fails: "error: unknown FP unit 'sse'" HOT 2
- Linking to libopenal.a causes duplicated symbol error
- Recent change breaks hashlink builds. HOT 3
- macOS libhl.dylib path causes crash HOT 1
- The Hashlink profiler causes an exception in Process.stdout.readLine
- The Hashlink GC can block the main thread if sys.thread.Thread is used HOT 1
- Get live objects from a specific type
- JIT ERROR 0 mixing hl.UI8 and Float HOT 2
- Explicit constant Float to Int type conversion HOT 1
- Game controller not recognized HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hashlink.