FooSoft / zero-epwing

Sane data exporter for an insane dictionary format.
https://foosoft.net/projects/zero-epwing/
MIT License
99 stars 17 forks source link

Building for macOS #1

Closed solicode closed 7 years ago

solicode commented 7 years ago

I got this tool to build successfully and run on macOS. Running the steps listed in the README as is almost worked, but the executable that gets produced actually errors out with dyld: Library not loaded: /usr/local/lib/libeb.16.dylib.

The issue seems to stem from Apple's linker as described here.

Setting DYLD_LIBRARY_PATH worked, as did removing the problematic dylibs to force static linking.

But since zero-epwing's target_link_libraries is specifically referring to .a anyway, disabling building of shared libraries for eb is also an option, right? Setting AC_DISABLE_SHARED for eb (or just running with ./configure --disable-shared) also fixed the problem for me on macOS.

I'm not sure which approach you prefer, or if this is any different for Linux or Windows, but I wanted to at least document this for macOS users.

FooSoft commented 7 years ago

I too, finally managed to get zero-epwing to build for the first time this weekend for yomichan-import in VirtualBox! The problem you are describing with the dynamic libraries being used despite me specifying .a explicitly cost me a couple of hours of trying to figure out what the hell was going on....

My hacky solution was deleting the dylib files, but the --disabled-shared option seems like it would optimal for all platforms. Now that I think of about it, I should probably also disable the networking support for libeb as that's kind of useless too.

Thanks for letting me know about a better way of handling this. I'll update the build instructions 👍

FooSoft commented 7 years ago

Build steps have been updated!