Opened 11 years ago
Closed 10 years ago
#42845 closed defect (fixed)
daemon @0.6.4 fails build on mavericks
Reported by: | posita (Matt Bogosian) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | kurthindenburg (Kurt Hindenburg) | |
Port: | daemon |
Description
main.log attached
Attachments (2)
Change History (9)
Changed 11 years ago by posita (Matt Bogosian)
Attachment: | daemon_main.log added |
---|
comment:1 Changed 11 years ago by posita (Matt Bogosian)
comment:2 Changed 11 years ago by posita (Matt Bogosian)
After minimal investigation, it seems mavericks defines its own strlcpy and strlcat (as macros). libslack (included by daemon) has redundant definitions as C functions in slack/str.[hc]. Their implementations are guarded by #ifndef HAVE_STRLC(AT|PY) statements in str.c, but their prototype definitions are not similarly guarded in str.h.
Also, while HAVE_STRLC(AT|PY) are properly set to 1 in config.h for Darwin, config.h is not included by daemon.c before daemon.c includes slack/str.h, so even if the str.h definitions were guarded, compiling daemon.c would fail to exclude them.
Attached is a patch that addresses both of these problems, and should result in a successful build.
Changed 11 years ago by posita (Matt Bogosian)
Attachment: | daemon-0.6.4-ignore-strlcpy-strlcat.patch added |
---|
fix patch
comment:3 Changed 11 years ago by posita (Matt Bogosian)
I managed a successful build via ports by moving the attached patch file to <[PREFIX]/var/macports/sources/rsync.macports.org/release/tarballs/ports/sysutils/daemon/files/strlcpy_strlcat.patch> and adding the following lines to the Portfile:
patchfiles strlcpy_strlcat.patch patch.pre_args -p1
I am Portfile NOOB, but I can imitate without understanding with the best of them. :o) FYI, I have not tested this on anything other than mavericks, so I don't know if it will still build in snow leopard, lion, etc.
comment:4 Changed 11 years ago by posita (Matt Bogosian)
Looks like the patch was good enough for brew (wink, wink, nudge, nudge):
comment:6 Changed 10 years ago by kurthindenburg (Kurt Hindenburg)
Thanks for the research and patches - I have it working here and will commit it - need to check if it will build on older systems.
comment:7 Changed 10 years ago by kurthindenburg (Kurt Hindenburg)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Same problem on brew:
https://github.com/Homebrew/homebrew/issues/25455
No fix there (yet) either.