Open hakoyamah opened 1 week ago
Interesting---it should just pick that up. What happens when you run pkg-config --libs expat
? If it's empty, can you also check the return code of the command?
On 15 November 2024 19:51:31 GMT+05:00, hakoyamah @.***> wrote:
Hi! I have found that sblg (version >= 0.5.9) fails to build on macOS. It cannot find expat. Test Environments OS: macOS Sonoma, Monterey CPU: x86_64 and arm64
./configure
...
make
... Undefined symbols for architecture arm64: "_XML_ErrorString", referenced from: ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [sblg] Error 1
Workaround: link -lexpat; add something like the following in configure or Makefile
if [ "$(uname)" = "Darwin" ]; then LDFLAGS="$LDFLAGS -lexpat" fi
or
ifeq ($(shell uname), Darwin) LDADD += -lexpat endif
-- Reply to this email directly or view it on GitHub: https://github.com/kristapsdz/sblg/issues/22 You are receiving this because you are subscribed to this thread.
Message ID: @.***>
% pkg-config --libs expat -L/opt/local/lib -lexpat
I installed expat using macports instead of homebrew, so the location of the lib is /opt/local/lib.
Hiroshi
2024/11/18 10:03、Kristaps Dz @.***>のメール:
Interesting---it should just pick that up. What happens when you run
pkg-config --libs expat
? If it's empty, can you also check the return code of the command?On 15 November 2024 19:51:31 GMT+05:00, hakoyamah @.***> wrote:
Hi! I have found that sblg (version >= 0.5.9) fails to build on macOS. It cannot find expat. Test Environments OS: macOS Sonoma, Monterey CPU: x86_64 and arm64
./configure
...
make
... Undefined symbols for architecture arm64: "_XML_ErrorString", referenced from: ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [sblg] Error 1
Workaround: link -lexpat; add something like the following in configure or Makefile
if [ "$(uname)" = "Darwin" ]; then LDFLAGS="$LDFLAGS -lexpat" fi
or
ifeq ($(shell uname), Darwin) LDADD += -lexpat endif
-- Reply to this email directly or view it on GitHub: https://github.com/kristapsdz/sblg/issues/22 You are receiving this because you are subscribed to this thread.
Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>
That's weird... The Makefile uses pkg-config to specify its linker arguments, so use probably just that function that's not in mac's expat. Can you copy the output of make so I can be doubly sure? I'll have access to a sonoma machine end of the week but not now.
On 18 November 2024 10:00:03 GMT+05:00, hakoyamah @.***> wrote:
% pkg-config --libs expat -L/opt/local/lib -lexpat
I installed expat using macports instead of homebrew, so the location of the lib is /opt/local/lib.
Hiroshi
2024/11/18 10:03、Kristaps Dz @.***>のメール:
Interesting---it should just pick that up. What happens when you run
pkg-config --libs expat
? If it's empty, can you also check the return code of the command?On 15 November 2024 19:51:31 GMT+05:00, hakoyamah @.***> wrote:
Hi! I have found that sblg (version >= 0.5.9) fails to build on macOS. It cannot find expat. Test Environments OS: macOS Sonoma, Monterey CPU: x86_64 and arm64
./configure
...
make
... Undefined symbols for architecture arm64: "_XML_ErrorString", referenced from: ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [sblg] Error 1
Workaround: link -lexpat; add something like the following in configure or Makefile
if [ "$(uname)" = "Darwin" ]; then LDFLAGS="$LDFLAGS -lexpat" fi
or
ifeq ($(shell uname), Darwin) LDADD += -lexpat endif
-- Reply to this email directly or view it on GitHub: https://github.com/kristapsdz/sblg/issues/22 You are receiving this because you are subscribed to this thread.
Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>
-- Reply to this email directly or view it on GitHub: https://github.com/kristapsdz/sblg/issues/22#issuecomment-2481958660 You are receiving this because you commented.
Message ID: @.***>
OK. here you are.
Hi! I have found that sblg (version >= 0.5.9) fails to build on macOS. It cannot find expat. Test Environments OS: macOS Sonoma, Monterey CPU: x86_64 and arm64
$ ./configure ... $ make ... Undefined symbols for architecture arm64: "_XML_ErrorString", referenced from: ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [sblg] Error 1
Workaround: link -lexpat; add something like the following in configure or Makefile
if [ "$(uname)" = "Darwin" ]; then LDFLAGS="$LDFLAGS -lexpat" fi
or
ifeq ($(shell uname), Darwin) LDADD += -lexpat endif