diff mbox

[v2] qemu-doc.texi: Add information on compiling source code on Mac OS X

Message ID 744D56B6-243D-43E5-9E42-B6DED13C1E88@gmail.com
State New
Headers show

Commit Message

Programmingkid Aug. 7, 2015, 8:57 p.m. UTC
Add information on compiling source code on Mac OS X
to the documentation.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>

---
 qemu-doc.texi |   44 +++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 41 insertions(+), 3 deletions(-)

Comments

Peter Maydell Aug. 14, 2015, 3:16 p.m. UTC | #1
On 7 August 2015 at 21:57, Programmingkid <programmingkidx@gmail.com> wrote:
> Add information on compiling source code on Mac OS X
> to the documentation.
>
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>

> ---
>  qemu-doc.texi |   44 +++++++++++++++++++++++++++++++++++++++++---
>  1 files changed, 41 insertions(+), 3 deletions(-)
>
> diff --git a/qemu-doc.texi b/qemu-doc.texi
> index 0125bc7..c059c49 100644
> --- a/qemu-doc.texi
> +++ b/qemu-doc.texi
> @@ -3021,9 +3021,47 @@ and all other qemu-system-@var{target}.exe compiled
> for Win32.
>  @node Mac OS X
>  @section Mac OS X
>
>
>
> -The Mac OS X patches are not fully merged in QEMU, so you should look
> -at the QEMU mailing list archive to have all the necessary
> -information.
> +System Requirements:
> +@itemize
> +@item Mac OS 10.5 or higher
> +@item GCC 4.3 or higher

I think this should be "The clang compiler shipped with Xcode 4.2 or higher,
or GCC 4.3 or higher".

We should have an @item about any library dependencies we need that
aren't provided by Apple. I think that's just glib, but it's been
so long since I installed dependencies for QEMU I forget if we
need anything else third-party. (We don't need to go into detail
about where to get the third-party libs, but mentioning the
dependency is helpful I think.)

> +@end itemize
> +
> +After downloading the QEMU source code, double-click it to expand it.
> +
> +Then configure and make QEMU:
> +@example
> +./configure
> +make
> +@end example
> +
> +If you have a recent version of Mac OS X (OSX 10.7 or better
> +with Xcode 4.2 or better) we recommend building QEMU with the
> +default compiler provided by Apple, for your version of Mac OS X
> +(which will be 'clang'). The configure script will
> +automatically pick this.
> +
> +Note: If after the configure step you see a message like this:
> +@example
> +ERROR: Your compiler does not support the __thread specifier for
> +       Thread-Local Storage (TLS). Please upgrade to a version that does.
> +@end example
> +You may have to build your own version of gcc from source. Expect that to
> take

this should be lower case "you"

> +several hours. More information can be found here:
> +@uref{https://gcc.gnu.org/install/} @*
> +
> +These are some of the third party binaries of gcc available for download:
> +@itemize
> +@item Homebrew: @uref{http://brew.sh/}
> +@item @uref{https://www.litebeam.net/gcc/gcc_472.pkg}
> +@item @uref{http://www.macports.org/ports.php?by=name&substr=gcc}
> +@end itemize
> +
> +You can have several versions of GCC on your system. To specify a certain
> version,
> +use the --cc and --cxx options.
> +@example
> +./configure --cxx=<path of your c++ compiler> --cc=<path of your c
> compiler> <other options>
> +@end example

Otherwise this looks good.

thanks
-- PMM
Programmingkid Aug. 14, 2015, 4:09 p.m. UTC | #2
On Aug 14, 2015, at 11:16 AM, Peter Maydell wrote:

> On 7 August 2015 at 21:57, Programmingkid <programmingkidx@gmail.com> wrote:
>> Add information on compiling source code on Mac OS X
>> to the documentation.
>> 
>> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
> 
>> ---
>> qemu-doc.texi |   44 +++++++++++++++++++++++++++++++++++++++++---
>> 1 files changed, 41 insertions(+), 3 deletions(-)
>> 
>> diff --git a/qemu-doc.texi b/qemu-doc.texi
>> index 0125bc7..c059c49 100644
>> --- a/qemu-doc.texi
>> +++ b/qemu-doc.texi
>> @@ -3021,9 +3021,47 @@ and all other qemu-system-@var{target}.exe compiled
>> for Win32.
>> @node Mac OS X
>> @section Mac OS X
>> 
>> 
>> 
>> -The Mac OS X patches are not fully merged in QEMU, so you should look
>> -at the QEMU mailing list archive to have all the necessary
>> -information.
>> +System Requirements:
>> +@itemize
>> +@item Mac OS 10.5 or higher
>> +@item GCC 4.3 or higher
> 
> I think this should be "The clang compiler shipped with Xcode 4.2 or higher,
> or GCC 4.3 or higher".
Sounds good.

> 
> We should have an @item about any library dependencies we need that
> aren't provided by Apple. I think that's just glib, but it's been
> so long since I installed dependencies for QEMU I forget if we
> need anything else third-party. (We don't need to go into detail
> about where to get the third-party libs, but mentioning the
> dependency is helpful I think.)
That is a really good idea. This is probably what a mac user will have to install 
when installing QEMU for the first time:
- libffi
- gettext
- glib
- pgk-config
- autoconfig
- automake
- libtool
- pixman

This is all I had to install when installing QEMU onto Mac OS 10.9 for the first time. 

I could put this information in its own section like this:

Additional requirements (install in order)
1. libffi
2. gettext
3. glib
4. pgk-config
5. autoconfig
6. automake
7. libtool
8. pixman

Each item will be a hyperlink to each item's web site. Does this sound right?

> 
>> +@end itemize
>> +
>> +After downloading the QEMU source code, double-click it to expand it.
>> +
>> +Then configure and make QEMU:
>> +@example
>> +./configure
>> +make
>> +@end example
>> +
>> +If you have a recent version of Mac OS X (OSX 10.7 or better
>> +with Xcode 4.2 or better) we recommend building QEMU with the
>> +default compiler provided by Apple, for your version of Mac OS X
>> +(which will be 'clang'). The configure script will
>> +automatically pick this.
>> +
>> +Note: If after the configure step you see a message like this:
>> +@example
>> +ERROR: Your compiler does not support the __thread specifier for
>> +       Thread-Local Storage (TLS). Please upgrade to a version that does.
>> +@end example
>> +You may have to build your own version of gcc from source. Expect that to
>> take
> 
> this should be lower case "you"
> 
>> +several hours. More information can be found here:
>> +@uref{https://gcc.gnu.org/install/} @*
>> +
>> +These are some of the third party binaries of gcc available for download:
>> +@itemize
>> +@item Homebrew: @uref{http://brew.sh/}
>> +@item @uref{https://www.litebeam.net/gcc/gcc_472.pkg}
>> +@item @uref{http://www.macports.org/ports.php?by=name&substr=gcc}
>> +@end itemize
>> +
>> +You can have several versions of GCC on your system. To specify a certain
>> version,
>> +use the --cc and --cxx options.
>> +@example
>> +./configure --cxx=<path of your c++ compiler> --cc=<path of your c
>> compiler> <other options>
>> +@end example
> 
> Otherwise this looks good.
> 
> thanks
> -- PMM
Peter Maydell Aug. 14, 2015, 4:28 p.m. UTC | #3
On 14 August 2015 at 17:09, Programmingkid <programmingkidx@gmail.com> wrote:
>
> On Aug 14, 2015, at 11:16 AM, Peter Maydell wrote:
>
>> On 7 August 2015 at 21:57, Programmingkid <programmingkidx@gmail.com> wrote:
>>> Add information on compiling source code on Mac OS X
>>> to the documentation.
>>>
>>> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>>
>>> ---
>>> qemu-doc.texi |   44 +++++++++++++++++++++++++++++++++++++++++---
>>> 1 files changed, 41 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/qemu-doc.texi b/qemu-doc.texi
>>> index 0125bc7..c059c49 100644
>>> --- a/qemu-doc.texi
>>> +++ b/qemu-doc.texi
>>> @@ -3021,9 +3021,47 @@ and all other qemu-system-@var{target}.exe compiled
>>> for Win32.
>>> @node Mac OS X
>>> @section Mac OS X
>>>
>>>
>>>
>>> -The Mac OS X patches are not fully merged in QEMU, so you should look
>>> -at the QEMU mailing list archive to have all the necessary
>>> -information.
>>> +System Requirements:
>>> +@itemize
>>> +@item Mac OS 10.5 or higher
>>> +@item GCC 4.3 or higher
>>
>> I think this should be "The clang compiler shipped with Xcode 4.2 or higher,
>> or GCC 4.3 or higher".
> Sounds good.
>
>>
>> We should have an @item about any library dependencies we need that
>> aren't provided by Apple. I think that's just glib, but it's been
>> so long since I installed dependencies for QEMU I forget if we
>> need anything else third-party. (We don't need to go into detail
>> about where to get the third-party libs, but mentioning the
>> dependency is helpful I think.)
> That is a really good idea. This is probably what a mac user will have to install
> when installing QEMU for the first time:
> - libffi
> - gettext
> - glib
> - pgk-config

"pkg-config"

> - autoconfig

"autoconf"

> - automake
> - libtool
> - pixman

> This is all I had to install when installing QEMU onto Mac OS 10.9 for the first time.
>
> I could put this information in its own section like this:
>
> Additional requirements (install in order)
> 1. libffi
> 2. gettext
> 3. glib
> 4. pgk-config
> 5. autoconfig
> 6. automake
> 7. libtool
> 8. pixman
>
> Each item will be a hyperlink to each item's web site. Does this sound right?

Yes, that sounds good.

. We could add a note at the end too:
"You may find it easiest to get these from a third-party packager
such as Homebrew, Macports or Fink."

-- PMM
Programmingkid Aug. 14, 2015, 4:45 p.m. UTC | #4
On Aug 14, 2015, at 12:28 PM, Peter Maydell wrote:

> On 14 August 2015 at 17:09, Programmingkid <programmingkidx@gmail.com> wrote:
>> 
>> On Aug 14, 2015, at 11:16 AM, Peter Maydell wrote:
>> 
>>> On 7 August 2015 at 21:57, Programmingkid <programmingkidx@gmail.com> wrote:
>>>> Add information on compiling source code on Mac OS X
>>>> to the documentation.
>>>> 
>>>> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
>>> 
>>>> ---
>>>> qemu-doc.texi |   44 +++++++++++++++++++++++++++++++++++++++++---
>>>> 1 files changed, 41 insertions(+), 3 deletions(-)
>>>> 
>>>> diff --git a/qemu-doc.texi b/qemu-doc.texi
>>>> index 0125bc7..c059c49 100644
>>>> --- a/qemu-doc.texi
>>>> +++ b/qemu-doc.texi
>>>> @@ -3021,9 +3021,47 @@ and all other qemu-system-@var{target}.exe compiled
>>>> for Win32.
>>>> @node Mac OS X
>>>> @section Mac OS X
>>>> 
>>>> 
>>>> 
>>>> -The Mac OS X patches are not fully merged in QEMU, so you should look
>>>> -at the QEMU mailing list archive to have all the necessary
>>>> -information.
>>>> +System Requirements:
>>>> +@itemize
>>>> +@item Mac OS 10.5 or higher
>>>> +@item GCC 4.3 or higher
>>> 
>>> I think this should be "The clang compiler shipped with Xcode 4.2 or higher,
>>> or GCC 4.3 or higher".
>> Sounds good.
>> 
>>> 
>>> We should have an @item about any library dependencies we need that
>>> aren't provided by Apple. I think that's just glib, but it's been
>>> so long since I installed dependencies for QEMU I forget if we
>>> need anything else third-party. (We don't need to go into detail
>>> about where to get the third-party libs, but mentioning the
>>> dependency is helpful I think.)
>> That is a really good idea. This is probably what a mac user will have to install
>> when installing QEMU for the first time:
>> - libffi
>> - gettext
>> - glib
>> - pgk-config
> 
> "pkg-config"
> 
>> - autoconfig
> 
> "autoconf"
> 
>> - automake
>> - libtool
>> - pixman
> 
>> This is all I had to install when installing QEMU onto Mac OS 10.9 for the first time.
>> 
>> I could put this information in its own section like this:
>> 
>> Additional requirements (install in order)
>> 1. libffi
>> 2. gettext
>> 3. glib
>> 4. pgk-config
>> 5. autoconfig
>> 6. automake
>> 7. libtool
>> 8. pixman
>> 
>> Each item will be a hyperlink to each item's web site. Does this sound right?
> 
> Yes, that sounds good.
> 
> . We could add a note at the end too:
> "You may find it easiest to get these from a third-party packager
> such as Homebrew, Macports or Fink."
That might be a possibility for many of these packages. 

Will send in a new patch with the added suggestions above.
diff mbox

Patch

diff --git a/qemu-doc.texi b/qemu-doc.texi
index 0125bc7..c059c49 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -3021,9 +3021,47 @@  and all other qemu-system-@var{target}.exe compiled for Win32.
 @node Mac OS X
 @section Mac OS X
 
-The Mac OS X patches are not fully merged in QEMU, so you should look
-at the QEMU mailing list archive to have all the necessary
-information.
+System Requirements:
+@itemize
+@item Mac OS 10.5 or higher
+@item GCC 4.3 or higher
+@end itemize
+
+After downloading the QEMU source code, double-click it to expand it.
+
+Then configure and make QEMU:
+@example
+./configure
+make
+@end example
+
+If you have a recent version of Mac OS X (OSX 10.7 or better
+with Xcode 4.2 or better) we recommend building QEMU with the
+default compiler provided by Apple, for your version of Mac OS X
+(which will be 'clang'). The configure script will
+automatically pick this.
+
+Note: If after the configure step you see a message like this:
+@example
+ERROR: Your compiler does not support the __thread specifier for
+       Thread-Local Storage (TLS). Please upgrade to a version that does.
+@end example
+You may have to build your own version of gcc from source. Expect that to take
+several hours. More information can be found here:
+@uref{https://gcc.gnu.org/install/} @*
+
+These are some of the third party binaries of gcc available for download:
+@itemize
+@item Homebrew: @uref{http://brew.sh/}
+@item @uref{https://www.litebeam.net/gcc/gcc_472.pkg}
+@item @uref{http://www.macports.org/ports.php?by=name&substr=gcc}
+@end itemize
+
+You can have several versions of GCC on your system. To specify a certain version,
+use the --cc and --cxx options.
+@example
+./configure --cxx=<path of your c++ compiler> --cc=<path of your c compiler> <other options>
+@end example
 
 @node Make targets
 @section Make targets