lun-4 / awtfdb

the Anime Woman's Tagged File Data Base.
MIT License
37 stars 2 forks source link

doesnt cross compile for mac #1

Closed lun-4 closed 1 year ago

lun-4 commented 2 years ago
$ zig build -Dtarget=x86_64-macos-gnu
error(link): undefined reference to symbol '_utt'
error(link):   first referenced in '/home/luna/git/boorufs/zig-cache/o/5fbfc7b03888f9a1d71746bc089fc1d7/pcre_printint.o'
error(link): undefined reference to symbol '_utf8_table4'
error(link):   first referenced in '/home/luna/git/boorufs/zig-cache/o/5fbfc7b03888f9a1d71746bc089fc1d7/pcre_printint.o'
error(link): undefined reference to symbol '_utf8_table3'
error(link):   first referenced in '/home/luna/git/boorufs/zig-cache/o/5fbfc7b03888f9a1d71746bc089fc1d7/pcre_printint.o'
error(link): undefined reference to symbol '_ucd_caseless_sets'
error(link):   first referenced in '/home/luna/git/boorufs/zig-cache/o/5fbfc7b03888f9a1d71746bc089fc1d7/pcre_printint.o'
error(link): undefined reference to symbol '_utt_names'
error(link):   first referenced in '/home/luna/git/boorufs/zig-cache/o/5fbfc7b03888f9a1d71746bc089fc1d7/pcre_printint.o'
error(link): undefined reference to symbol '_utt_size'
error(link):   first referenced in '/home/luna/git/boorufs/zig-cache/o/5fbfc7b03888f9a1d71746bc089fc1d7/pcre_printint.o'
error: UndefinedSymbolReference
lun-4 commented 1 year ago

current error

requires #44 and probably a poll-to-kqueue abstraction layer to make it work on macos.

$ zig build -Dtarget=x86_64-macos-none
/home/luna/git/awtfdb/src/include_main.zig:514:11: error: C import failed
const c = @cImport({
          ^~~~~~~~
referenced by:
    MimeCookie: /home/luna/git/awtfdb/src/include_main.zig:519:13
    MimeCookie: /home/luna/git/awtfdb/src/include_main.zig:518:20
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

/home/luna/git/awtfdb/src/rename_watcher_main.zig:686:72: error: expected type '*os.linux.siginfo_t__struct_13399', found '*c.darwin.siginfo_t'
                const waitid_rc = std.os.linux.waitid(.PIDFD, pidfd.?, &siginfo, 0);
                                                                       ^~~~~~~~
/home/luna/git/awtfdb/src/rename_watcher_main.zig:686:72: note: pointer type child 'c.darwin.siginfo_t' cannot cast into pointer type child 'os.linux.siginfo_t__struct_13399'
/usr/lib/zig/std/c/darwin.zig:903:30: note: struct declared here
pub const siginfo_t = extern struct {
                      ~~~~~~~^~~~~~
/usr/lib/zig/std/os/linux.zig:3547:12: note: struct declared here
    extern struct {
    ~~~~~~~^~~~~~
error: wrapper-awtfdb...
lun-4 commented 1 year ago

i will be ignoring awtfdb-watcher for windows and mac for now as it won't be an easy port of that (has a lot of linuxisms and bpftrace, at least its all contained).

we return to the pcre compile issue from the first comment. https://github.com/nektro/pcre-8.45/pull/1 fixes it. will be using that patch as a workaround for now