* Building GCC on arm macOS
@ 2021-02-17 10:31 Roman Bolshakov
2021-02-17 10:35 ` Iain Sandoe
0 siblings, 1 reply; 5+ messages in thread
From: Roman Bolshakov @ 2021-02-17 10:31 UTC (permalink / raw)
To: gcc-help; +Cc: Iain Sandoe
Hello,
stage1 of GCC build (master branch as of yesterday) fails with the error:
*** Configuration aarch64-apple-darwin20.3.0 not supported
make[2]: *** [configure-stage1-gcc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
Is it expected issue? I had impression that GCC works on Apple Silicon
macs.
Thanks,
Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building GCC on arm macOS
2021-02-17 10:31 Building GCC on arm macOS Roman Bolshakov
@ 2021-02-17 10:35 ` Iain Sandoe
2021-02-17 13:03 ` Roman Bolshakov
0 siblings, 1 reply; 5+ messages in thread
From: Iain Sandoe @ 2021-02-17 10:35 UTC (permalink / raw)
To: Roman Bolshakov; +Cc: gcc-help
Hi Roman,
Roman Bolshakov <r.bolshakov@yadro.com> wrote:
> stage1 of GCC build (master branch as of yesterday) fails with the error:
>
> *** Configuration aarch64-apple-darwin20.3.0 not supported
> make[2]: *** [configure-stage1-gcc] Error 1
> make[1]: *** [stage1-bubble] Error 2
> make: *** [all] Error 2
>
> Is it expected issue?
Yes, that’s expected (it is not a bug).
> I had impression that GCC works on Apple Silicon
> macs.
There is an experimental branch here :
https://github.com/iains/gcc-darwin-arm64
but it is not yet ready for inclusion in GCC master,
thanks
Iain
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building GCC on arm macOS
2021-02-17 10:35 ` Iain Sandoe
@ 2021-02-17 13:03 ` Roman Bolshakov
2021-02-17 13:50 ` Iain Sandoe
0 siblings, 1 reply; 5+ messages in thread
From: Roman Bolshakov @ 2021-02-17 13:03 UTC (permalink / raw)
To: Iain Sandoe; +Cc: gcc-help
On Wed, Feb 17, 2021 at 10:35:59AM +0000, Iain Sandoe wrote:
> Roman Bolshakov <r.bolshakov@yadro.com> wrote:
>
> > stage1 of GCC build (master branch as of yesterday) fails with the error:
> >
> > *** Configuration aarch64-apple-darwin20.3.0 not supported
> > make[2]: *** [configure-stage1-gcc] Error 1
> > make[1]: *** [stage1-bubble] Error 2
> > make: *** [all] Error 2
> >
> > Is it expected issue?
>
> Yes, that’s expected (it is not a bug).
>
> > I had impression that GCC works on Apple Silicon
> > macs.
>
> There is an experimental branch here :
> https://github.com/iains/gcc-darwin-arm64
>
> but it is not yet ready for inclusion in GCC master,
Hi Iain,
Thanks for the reference.
I'm trying to build from your master-wip-apple-si branch and it doesn't
build too:
The directory that should contain system headers does not exist:
/usr/include
make[3]: *** [stmp-fixinc] Error 1
rm gcov.pod fsf-funding.pod lto-dump.pod gpl.pod cpp.pod gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
Thanks,
Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building GCC on arm macOS
2021-02-17 13:03 ` Roman Bolshakov
@ 2021-02-17 13:50 ` Iain Sandoe
2021-02-17 16:20 ` Roman Bolshakov
0 siblings, 1 reply; 5+ messages in thread
From: Iain Sandoe @ 2021-02-17 13:50 UTC (permalink / raw)
To: Roman Bolshakov; +Cc: gcc-help
Roman Bolshakov <r.bolshakov@yadro.com> wrote:
> On Wed, Feb 17, 2021 at 10:35:59AM +0000, Iain Sandoe wrote:
>> Roman Bolshakov <r.bolshakov@yadro.com> wrote:
>>
>>> stage1 of GCC build (master branch as of yesterday) fails with the error:
>>>
>>> *** Configuration aarch64-apple-darwin20.3.0 not supported
>>> make[2]: *** [configure-stage1-gcc] Error 1
>>> make[1]: *** [stage1-bubble] Error 2
>>> make: *** [all] Error 2
>>>
>>> Is it expected issue?
>>
>> Yes, that’s expected (it is not a bug).
>>
>>> I had impression that GCC works on Apple Silicon
>>> macs.
>>
>> There is an experimental branch here :
>> https://github.com/iains/gcc-darwin-arm64
>>
>> but it is not yet ready for inclusion in GCC master,
> Thanks for the reference.
> I'm trying to build from your master-wip-apple-si branch and it doesn't
> build too:
>
> The directory that should contain system headers does not exist:
> /usr/include
(this is not specific to Arm64 - it applies to building for x86_64 on
modern macOS).
These days (on macOS) there are no headers installed in /usr/include even
when the developer tools are installed.
So, you have to configure a path to the SDK [which contains the headers and
the library stubs] (from, say, an installation of the command line tools -
or from Xcode).
Two approaches:
1) [this is what I tend to use]
Install the command line tools.
Now there will be an SDK at
/Library/Developer/CommandLineTools/SDKs/MacOS.sdk
so you can configure with…
/path/to/source/configure —prefix=….
—with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOS.sdk ….
2) You can ask where the SDK is for an installation with Xcode only.
/path/to/source/configure —prefix=…. —with-sysroot=`xcrun —show-sdk-path` ….
====
In general, it is best not to add configuration options unles you know
*why* you’re adding them - but for modern macOS, it is a good idea to avoid
the default install path /usr/local … most people install now into /opt/…..
You can find general information on building GCC here :
https://gcc.gnu.org/install/
=====
My configure lines look like this:
/src-local/gcc-master/configure
--prefix=/opt/iains/aarch64-apple-darwin20/gcc-11-0-0
--build=aarch64-apple-darwin20
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
--disable-libstdcxx-pch --enable-languages=all
and you can see some test results here:
https://github.com/iains/gcc-darwin-arm64/issues/30
HTH,
Iain
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Building GCC on arm macOS
2021-02-17 13:50 ` Iain Sandoe
@ 2021-02-17 16:20 ` Roman Bolshakov
0 siblings, 0 replies; 5+ messages in thread
From: Roman Bolshakov @ 2021-02-17 16:20 UTC (permalink / raw)
To: Iain Sandoe; +Cc: gcc-help
On Wed, Feb 17, 2021 at 01:50:26PM +0000, Iain Sandoe wrote:
> Roman Bolshakov <r.bolshakov@yadro.com> wrote:
>
> > On Wed, Feb 17, 2021 at 10:35:59AM +0000, Iain Sandoe wrote:
> > > Roman Bolshakov <r.bolshakov@yadro.com> wrote:
> > >
> > > > stage1 of GCC build (master branch as of yesterday) fails with the error:
> > > >
> > > > *** Configuration aarch64-apple-darwin20.3.0 not supported
> > > > make[2]: *** [configure-stage1-gcc] Error 1
> > > > make[1]: *** [stage1-bubble] Error 2
> > > > make: *** [all] Error 2
> > > >
> > > > Is it expected issue?
> > >
> > > Yes, that’s expected (it is not a bug).
> > >
> > > > I had impression that GCC works on Apple Silicon
> > > > macs.
> > >
> > > There is an experimental branch here :
> > > https://github.com/iains/gcc-darwin-arm64
> > >
> > > but it is not yet ready for inclusion in GCC master,
>
> > Thanks for the reference.
> > I'm trying to build from your master-wip-apple-si branch and it doesn't
> > build too:
> >
> > The directory that should contain system headers does not exist:
> > /usr/include
>
> (this is not specific to Arm64 - it applies to building for x86_64 on modern
> macOS).
>
> These days (on macOS) there are no headers installed in /usr/include even
> when the developer tools are installed.
>
> So, you have to configure a path to the SDK [which contains the headers and
> the library stubs] (from, say, an installation of the command line tools -
> or from Xcode).
>
> Two approaches:
>
> 1) [this is what I tend to use]
>
> Install the command line tools.
> Now there will be an SDK at
> /Library/Developer/CommandLineTools/SDKs/MacOS.sdk
>
> so you can configure with…
> /path/to/source/configure —prefix=….
> —with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOS.sdk ….
>
> 2) You can ask where the SDK is for an installation with Xcode only.
>
> /path/to/source/configure —prefix=…. —with-sysroot=`xcrun —show-sdk-path` ….
>
> ====
>
> In general, it is best not to add configuration options unles you know *why*
> you’re adding them - but for modern macOS, it is a good idea to avoid the
> default install path /usr/local … most people install now into /opt/…..
>
> You can find general information on building GCC here :
> https://gcc.gnu.org/install/
>
> =====
>
> My configure lines look like this:
>
> /src-local/gcc-master/configure
> --prefix=/opt/iains/aarch64-apple-darwin20/gcc-11-0-0
> --build=aarch64-apple-darwin20
> --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> --disable-libstdcxx-pch --enable-languages=all
>
Thanks, Iain!
--with-sysroot helped. That's my config:
./configure --with-gmp=$(brew --prefix gmp) \
--with-mpfr=$(brew --prefix mpfr) \
--with-mpc=$(brew --prefix libmpc) \
--with-sysroot=$(xcrun -show-sdk-path)
I wonder if we should set --with-sysroot implicitly on modern macOS?
> and you can see some test results here:
>
> https://github.com/iains/gcc-darwin-arm64/issues/30
>
I see, there're test failures that should be fixed before merging the
port.
Regards,
Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-17 16:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 10:31 Building GCC on arm macOS Roman Bolshakov
2021-02-17 10:35 ` Iain Sandoe
2021-02-17 13:03 ` Roman Bolshakov
2021-02-17 13:50 ` Iain Sandoe
2021-02-17 16:20 ` Roman Bolshakov
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 read-only IMAP folder(s) and NNTP newsgroup(s).