* Building rpi armv6 toolchain on macOS
@ 2017-03-09 12:15 Etan Kissling
2017-03-09 18:21 ` Alexey Neyman
0 siblings, 1 reply; 7+ messages in thread
From: Etan Kissling @ 2017-03-09 12:15 UTC (permalink / raw)
To: crossgcc
Hi,
I'm trying to build a toolchain that supports cross compilation for the Raspberry Pi Zero W.
This requires building for ARMv6 (same as for the old Raspberry Pi 1).
The official repository contains a crosstool-ng config file here:
https://github.com/raspberrypi/tools/blob/master/configs/arm-rpi-4.9.3-linux-gnueabihf.config
Unfortunately, only Linux binaries are provided in the repo. So for macOS I need to start from this config.
The changes I did to the config file so far are:
Undefine CT_CONFIGURE_has_xz
Set CT_LOCAL_TARBALLS_DIR / CT_WORK_DIR / CT_PREFIX_DIR to reside on case-sensitive file systems
CT_EXTRA_CFLAGS_FOR_HOST="-fbracket-depth=512"
This fixes "[ERROR] /tmp/ct-ng/fs/.build/src/gcc-4.9.3/gcc/config/arm/neon.md:3486:10917: fatal error: bracket nesting level exceeded maximum of 256".
CT_WANTS_STATIC_LINK=n
CT_CC_GCC_STATIC_LIBSTDCXX=n
These two fix errors during initial sanity checking.
I'm currently stuck at the step "Installing C library headers & start files" where I get these errors during assembly of ../ports/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S:
ccL1wvil.s: Assembler messages:
ccL1wvil.s:70: Error: invalid constant (ae) after fixup
ccL1wvil.s:143: Error: invalid constant (ff) after fixup
I tried with -mthumb (which leads to "conftest.c:14:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI")
and with -nostartfiles (which lets assembly work for this file but doesn't work on the next one (../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S)
The complete build logs can be found here:
https://scriptreactor.com/rpi1-fixup-error.build.log
https://scriptreactor.com/rpi1-fixup-error-nostartfiles.build.log (with -nostartfiles)
Any idea on what could be tried next?
Xcode version: 8.2.1 (8C1002)
maxOS version: 10.12.3 (16D32)
crosstool-ng installed via "brew install crosstool-ng --with-grep"
Thanks for any input!
Etan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building rpi armv6 toolchain on macOS
2017-03-09 12:15 Building rpi armv6 toolchain on macOS Etan Kissling
@ 2017-03-09 18:21 ` Alexey Neyman
2017-03-11 21:06 ` Etan Kissling
0 siblings, 1 reply; 7+ messages in thread
From: Alexey Neyman @ 2017-03-09 18:21 UTC (permalink / raw)
To: Etan Kissling, crossgcc
I have reproduced your issue on current master with the following
changes to .config (extracted .config from your build.log with "ct-ng
extractconfig < build.log > .config"):
- set CT_OBSOLETE=y
- ct-ng oldconfig
- set GCC to 4.9.4 and kernel to 4.1.38 (latest on 4.9.x and 4.1.x branches)
However, I noted that you have set "Patches origin" option to "none".
This prohibits crosstool-ng from applying any patches it has for any
packages. In your configuration, setting it to "bundled" makes the build
succeed (on master).
You can try to find out which of the patches fixes your issue. Likely it
is one in patches/glibc/2.19, patches/binutils/2.25.1 or patches/gcc/4.9.4.
As a side note, I'd recommend using master on macos rather than 1.22 -
there has been a lot of macos fixes since.
Regards,
Alexey.
On 03/09/2017 04:15 AM, Etan Kissling wrote:
> Hi,
>
> I'm trying to build a toolchain that supports cross compilation for the Raspberry Pi Zero W.
> This requires building for ARMv6 (same as for the old Raspberry Pi 1).
>
> The official repository contains a crosstool-ng config file here:
> https://github.com/raspberrypi/tools/blob/master/configs/arm-rpi-4.9.3-linux-gnueabihf.config
> Unfortunately, only Linux binaries are provided in the repo. So for macOS I need to start from this config.
>
> The changes I did to the config file so far are:
> Undefine CT_CONFIGURE_has_xz
> Set CT_LOCAL_TARBALLS_DIR / CT_WORK_DIR / CT_PREFIX_DIR to reside on case-sensitive file systems
> CT_EXTRA_CFLAGS_FOR_HOST="-fbracket-depth=512"
> This fixes "[ERROR] /tmp/ct-ng/fs/.build/src/gcc-4.9.3/gcc/config/arm/neon.md:3486:10917: fatal error: bracket nesting level exceeded maximum of 256".
> CT_WANTS_STATIC_LINK=n
> CT_CC_GCC_STATIC_LIBSTDCXX=n
> These two fix errors during initial sanity checking.
> I'm currently stuck at the step "Installing C library headers & start files" where I get these errors during assembly of ../ports/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S:
> ccL1wvil.s: Assembler messages:
> ccL1wvil.s:70: Error: invalid constant (ae) after fixup
> ccL1wvil.s:143: Error: invalid constant (ff) after fixup
>
> I tried with -mthumb (which leads to "conftest.c:14:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI")
> and with -nostartfiles (which lets assembly work for this file but doesn't work on the next one (../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S)
>
> The complete build logs can be found here:
> https://scriptreactor.com/rpi1-fixup-error.build.log
> https://scriptreactor.com/rpi1-fixup-error-nostartfiles.build.log (with -nostartfiles)
>
> Any idea on what could be tried next?
>
> Xcode version: 8.2.1 (8C1002)
> maxOS version: 10.12.3 (16D32)
> crosstool-ng installed via "brew install crosstool-ng --with-grep"
>
> Thanks for any input!
>
> Etan
>
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building rpi armv6 toolchain on macOS
2017-03-09 18:21 ` Alexey Neyman
@ 2017-03-11 21:06 ` Etan Kissling
2017-03-11 22:40 ` Alexey Neyman
2017-03-12 0:03 ` Josh Branning
0 siblings, 2 replies; 7+ messages in thread
From: Etan Kissling @ 2017-03-11 21:06 UTC (permalink / raw)
To: Alexey Neyman; +Cc: crossgcc
Thanks for the quick reply!
With the master build, I run into an error quite quickly (following instructions from crosstool-ng.org).
[DEBUG] ==> Executing: 'mkdir' '-p' '/build'
[ALL ] mkdir: /build: Permission denied
- Full log: https://scriptreactor.com/rpi1-master-build.log
Any idea what's going on here?
Trying out with your adjusted settings on 1.22 for now. Will take a while ^^
> On 9 Mar 2017, at 19:21, Alexey Neyman <stilor@att.net> wrote:
>
> I have reproduced your issue on current master with the following changes to .config (extracted .config from your build.log with "ct-ng extractconfig < build.log > .config"):
>
> - set CT_OBSOLETE=y
> - ct-ng oldconfig
> - set GCC to 4.9.4 and kernel to 4.1.38 (latest on 4.9.x and 4.1.x branches)
>
> However, I noted that you have set "Patches origin" option to "none". This prohibits crosstool-ng from applying any patches it has for any packages. In your configuration, setting it to "bundled" makes the build succeed (on master).
>
> You can try to find out which of the patches fixes your issue. Likely it is one in patches/glibc/2.19, patches/binutils/2.25.1 or patches/gcc/4.9.4.
>
> As a side note, I'd recommend using master on macos rather than 1.22 - there has been a lot of macos fixes since.
>
> Regards,
> Alexey.
>
>
> On 03/09/2017 04:15 AM, Etan Kissling wrote:
>> Hi,
>>
>> I'm trying to build a toolchain that supports cross compilation for the Raspberry Pi Zero W.
>> This requires building for ARMv6 (same as for the old Raspberry Pi 1).
>>
>> The official repository contains a crosstool-ng config file here:
>> https://github.com/raspberrypi/tools/blob/master/configs/arm-rpi-4.9.3-linux-gnueabihf.config
>> Unfortunately, only Linux binaries are provided in the repo. So for macOS I need to start from this config.
>>
>> The changes I did to the config file so far are:
>> Undefine CT_CONFIGURE_has_xz
>> Set CT_LOCAL_TARBALLS_DIR / CT_WORK_DIR / CT_PREFIX_DIR to reside on case-sensitive file systems
>> CT_EXTRA_CFLAGS_FOR_HOST="-fbracket-depth=512"
>> This fixes "[ERROR] /tmp/ct-ng/fs/.build/src/gcc-4.9.3/gcc/config/arm/neon.md:3486:10917: fatal error: bracket nesting level exceeded maximum of 256".
>> CT_WANTS_STATIC_LINK=n
>> CT_CC_GCC_STATIC_LIBSTDCXX=n
>> These two fix errors during initial sanity checking.
>> I'm currently stuck at the step "Installing C library headers & start files" where I get these errors during assembly of ../ports/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S:
>> ccL1wvil.s: Assembler messages:
>> ccL1wvil.s:70: Error: invalid constant (ae) after fixup
>> ccL1wvil.s:143: Error: invalid constant (ff) after fixup
>>
>> I tried with -mthumb (which leads to "conftest.c:14:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI")
>> and with -nostartfiles (which lets assembly work for this file but doesn't work on the next one (../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S)
>>
>> The complete build logs can be found here:
>> https://scriptreactor.com/rpi1-fixup-error.build.log
>> https://scriptreactor.com/rpi1-fixup-error-nostartfiles.build.log (with -nostartfiles)
>>
>> Any idea on what could be tried next?
>>
>> Xcode version: 8.2.1 (8C1002)
>> maxOS version: 10.12.3 (16D32)
>> crosstool-ng installed via "brew install crosstool-ng --with-grep"
>>
>> Thanks for any input!
>>
>> Etan
>>
>>
>>
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building rpi armv6 toolchain on macOS
2017-03-11 21:06 ` Etan Kissling
@ 2017-03-11 22:40 ` Alexey Neyman
2017-03-12 0:03 ` Josh Branning
1 sibling, 0 replies; 7+ messages in thread
From: Alexey Neyman @ 2017-03-11 22:40 UTC (permalink / raw)
To: Etan Kissling; +Cc: crossgcc
You skipped the first two steps (CT_OBSOLETE + 'ct-ng oldconfig'),
didn't you?
Regards,
Alexey.
On 03/11/2017 01:06 PM, Etan Kissling wrote:
> Thanks for the quick reply!
>
> With the master build, I run into an error quite quickly (following instructions from crosstool-ng.org).
> [DEBUG] ==> Executing: 'mkdir' '-p' '/build'
> [ALL ] mkdir: /build: Permission denied
> - Full log: https://scriptreactor.com/rpi1-master-build.log
>
> Any idea what's going on here?
>
> Trying out with your adjusted settings on 1.22 for now. Will take a while ^^
>
>> On 9 Mar 2017, at 19:21, Alexey Neyman <stilor@att.net> wrote:
>>
>> I have reproduced your issue on current master with the following changes to .config (extracted .config from your build.log with "ct-ng extractconfig < build.log > .config"):
>>
>> - set CT_OBSOLETE=y
>> - ct-ng oldconfig
>> - set GCC to 4.9.4 and kernel to 4.1.38 (latest on 4.9.x and 4.1.x branches)
>>
>> However, I noted that you have set "Patches origin" option to "none". This prohibits crosstool-ng from applying any patches it has for any packages. In your configuration, setting it to "bundled" makes the build succeed (on master).
>>
>> You can try to find out which of the patches fixes your issue. Likely it is one in patches/glibc/2.19, patches/binutils/2.25.1 or patches/gcc/4.9.4.
>>
>> As a side note, I'd recommend using master on macos rather than 1.22 - there has been a lot of macos fixes since.
>>
>> Regards,
>> Alexey.
>>
>>
>> On 03/09/2017 04:15 AM, Etan Kissling wrote:
>>> Hi,
>>>
>>> I'm trying to build a toolchain that supports cross compilation for the Raspberry Pi Zero W.
>>> This requires building for ARMv6 (same as for the old Raspberry Pi 1).
>>>
>>> The official repository contains a crosstool-ng config file here:
>>> https://github.com/raspberrypi/tools/blob/master/configs/arm-rpi-4.9.3-linux-gnueabihf.config
>>> Unfortunately, only Linux binaries are provided in the repo. So for macOS I need to start from this config.
>>>
>>> The changes I did to the config file so far are:
>>> Undefine CT_CONFIGURE_has_xz
>>> Set CT_LOCAL_TARBALLS_DIR / CT_WORK_DIR / CT_PREFIX_DIR to reside on case-sensitive file systems
>>> CT_EXTRA_CFLAGS_FOR_HOST="-fbracket-depth=512"
>>> This fixes "[ERROR] /tmp/ct-ng/fs/.build/src/gcc-4.9.3/gcc/config/arm/neon.md:3486:10917: fatal error: bracket nesting level exceeded maximum of 256".
>>> CT_WANTS_STATIC_LINK=n
>>> CT_CC_GCC_STATIC_LIBSTDCXX=n
>>> These two fix errors during initial sanity checking.
>>> I'm currently stuck at the step "Installing C library headers & start files" where I get these errors during assembly of ../ports/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S:
>>> ccL1wvil.s: Assembler messages:
>>> ccL1wvil.s:70: Error: invalid constant (ae) after fixup
>>> ccL1wvil.s:143: Error: invalid constant (ff) after fixup
>>>
>>> I tried with -mthumb (which leads to "conftest.c:14:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI")
>>> and with -nostartfiles (which lets assembly work for this file but doesn't work on the next one (../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S)
>>>
>>> The complete build logs can be found here:
>>> https://scriptreactor.com/rpi1-fixup-error.build.log
>>> https://scriptreactor.com/rpi1-fixup-error-nostartfiles.build.log (with -nostartfiles)
>>>
>>> Any idea on what could be tried next?
>>>
>>> Xcode version: 8.2.1 (8C1002)
>>> maxOS version: 10.12.3 (16D32)
>>> crosstool-ng installed via "brew install crosstool-ng --with-grep"
>>>
>>> Thanks for any input!
>>>
>>> Etan
>>>
>>>
>>>
>>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building rpi armv6 toolchain on macOS
2017-03-11 21:06 ` Etan Kissling
2017-03-11 22:40 ` Alexey Neyman
@ 2017-03-12 0:03 ` Josh Branning
2017-03-12 1:04 ` Alexey Neyman
1 sibling, 1 reply; 7+ messages in thread
From: Josh Branning @ 2017-03-12 0:03 UTC (permalink / raw)
To: crossgcc
On 11/03/17 21:06, Etan Kissling wrote:
> Thanks for the quick reply!
>
> With the master build, I run into an error quite quickly (following instructions from crosstool-ng.org).
> [DEBUG] ==> Executing: 'mkdir' '-p' '/build'
> [ALL ] mkdir: /build: Permission denied
> - Full log: https://scriptreactor.com/rpi1-master-build.log
>
> Any idea what's going on here?
Are you running crosstool-ng as root? And do you have permission to
write to the / directory? I'm guessing not. (If not, then I suggest
changing the build directory instead of running as root.)
Josh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building rpi armv6 toolchain on macOS
2017-03-12 0:03 ` Josh Branning
@ 2017-03-12 1:04 ` Alexey Neyman
2017-03-12 12:14 ` Etan Kissling
0 siblings, 1 reply; 7+ messages in thread
From: Alexey Neyman @ 2017-03-12 1:04 UTC (permalink / raw)
To: Josh Branning, crossgcc
On 03/11/2017 04:03 PM, Josh Branning wrote:
> On 11/03/17 21:06, Etan Kissling wrote:
>> Thanks for the quick reply!
>>
>> With the master build, I run into an error quite quickly (following
>> instructions from crosstool-ng.org).
>> [DEBUG] ==> Executing: 'mkdir' '-p' '/build'
>> [ALL ] mkdir: /build: Permission denied
>> - Full log: https://scriptreactor.com/rpi1-master-build.log
>>
>> Any idea what's going on here?
>
> Are you running crosstool-ng as root? And do you have permission to
> write to the / directory? I'm guessing not. (If not, then I suggest
> changing the build directory instead of running as root.)
As the error states, he *is not* running it as root. Moreover, running
as root IS NOT RECOMMENDED - crosstool-ng is quite explicit about it.
The problem is that he took a config from 1.22 and tried to run it on
master without upgrading it through the regular procedure for
kconfig-based system ("oldconfig"). In master, build directory is set
using a value of an auxiliary variable, CT_BUILD_TOP_DIR, that isn't set
in the config unless it is upgraded.
Regards,
Alexey.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building rpi armv6 toolchain on macOS
2017-03-12 1:04 ` Alexey Neyman
@ 2017-03-12 12:14 ` Etan Kissling
0 siblings, 0 replies; 7+ messages in thread
From: Etan Kissling @ 2017-03-12 12:14 UTC (permalink / raw)
To: Alexey Neyman; +Cc: Josh Branning, crossgcc
Got me :-)
With bundled patches and master, it runs through for me now as well, even without my original changes.
The oldconfig was the only step I missed ^^ Thanks for pointing out my mistake there!
> On 12 Mar 2017, at 02:04, Alexey Neyman <stilor@att.net> wrote:
>
> On 03/11/2017 04:03 PM, Josh Branning wrote:
>> On 11/03/17 21:06, Etan Kissling wrote:
>>> Thanks for the quick reply!
>>>
>>> With the master build, I run into an error quite quickly (following instructions from crosstool-ng.org).
>>> [DEBUG] ==> Executing: 'mkdir' '-p' '/build'
>>> [ALL ] mkdir: /build: Permission denied
>>> - Full log: https://scriptreactor.com/rpi1-master-build.log
>>>
>>> Any idea what's going on here?
>>
>> Are you running crosstool-ng as root? And do you have permission to write to the / directory? I'm guessing not. (If not, then I suggest changing the build directory instead of running as root.)
> As the error states, he *is not* running it as root. Moreover, running as root IS NOT RECOMMENDED - crosstool-ng is quite explicit about it.
>
> The problem is that he took a config from 1.22 and tried to run it on master without upgrading it through the regular procedure for kconfig-based system ("oldconfig"). In master, build directory is set using a value of an auxiliary variable, CT_BUILD_TOP_DIR, that isn't set in the config unless it is upgraded.
>
> Regards,
> Alexey.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-03-12 12:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09 12:15 Building rpi armv6 toolchain on macOS Etan Kissling
2017-03-09 18:21 ` Alexey Neyman
2017-03-11 21:06 ` Etan Kissling
2017-03-11 22:40 ` Alexey Neyman
2017-03-12 0:03 ` Josh Branning
2017-03-12 1:04 ` Alexey Neyman
2017-03-12 12:14 ` Etan Kissling
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).