From: Christopher Friedt <chrisfriedt@gmail.com>
To: famz@redhat.com, mst@redhat.com
Cc: Christopher Friedt <chrisfriedt@gmail.com>,
qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH 0/2][RESENT-INLINE] Resolve link errors on Mac OS X
Date: Mon, 2 May 2016 21:01:03 -0400 [thread overview]
Message-ID: <1462237265-61763-1-git-send-email-chrisfriedt@gmail.com> (raw)
Hi list,
I recently tried to build Qemu on Mac and ran into a couple of trivial issues
that I've provided patches for. I suppose that normally people just use
'brew install qemu', but there is really no reason that it can't be built from
source, particularly for those modifying Qemu regularly.
In any case, the first change moves to using 'libtool -static' to create
libraries on Mac OS X. If one attempts to use ar and ranlib, then the final
link will fail with error messages resembling the following:
ld: warning: ignoring file libqemuutil.a, file was built for archive which
is not the architecture being linked (x86_64): libqemuutil.a
Undefined symbols for architecture x86_64:
...
Notice ld (Apple's ld64) presumes the static library is a relocatable with
architecture 'archive' rather than x86_64, in this case.
A similar fix is required for dtc - again quite trivial, but I can provide that if necessary.
The second patch removes the preprocessor conditional around the function
event_notifier_init_fd() in util/event_notifier-posix.c so that the link does
not fail on systems where CONFIG_POSIX is defined but CONFIG_EVENTFD is not
(such as under Mac OS X).
There is more information in each of the commits that follows.
Please feel free to comment.
Cheers,
C
Christopher Friedt (2):
Use libtool instead of ar to create static libraries on Darwin.
Remove unnecessary CONFIG_EVENTFD preprocessor conditional to satisfy
link
rules.mak | 4 ++++
util/event_notifier-posix.c | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.6.4 (Apple Git-63)
next reply other threads:[~2016-05-03 1:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 1:01 Christopher Friedt [this message]
2016-05-03 1:01 ` [Qemu-devel] [PATCH 1/2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin Christopher Friedt
2016-05-03 1:01 ` [Qemu-devel] [PATCH 2/2] [RESENT-INLINE] Remove unnecessary CONFIG_EVENTFD preprocessor conditional to satisfy link Christopher Friedt
2016-05-03 6:59 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462237265-61763-1-git-send-email-chrisfriedt@gmail.com \
--to=chrisfriedt@gmail.com \
--cc=famz@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).