* [Buildroot] blackfin and micropython
@ 2015-09-21 4:25 Chris Packham
2015-09-21 7:13 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Chris Packham @ 2015-09-21 4:25 UTC (permalink / raw)
To: buildroot
Hi,
I'm just looking at the micropython build failures and the blackfin
ones have have me a bit stumped.
The ones currently showing up[1] are format specifier errors. The code
in question[2] doesn't look particularly bad and other
architectures/compilers aren't complaining I guess it is getting
confused with the math around const byte * and unsigned int. I can
work around that issue by adding -Wno-error=format to CFLAGS for
BR2_bfin. But that leads to the next issue.
modffi.c:87: error: expected specifier-qualifier-list before ?ffi_closure?
modffi.c: In function ?mod_ffi_callback?:
modffi.c:248: error: ?mp_obj_fficallback_t? has no member named ?clo?
I think these are because nothing defines FFI_CLOSURES. ffitarget.h
for bfin seems a lot sparser than for other architectures so I'm
thinking that's the problem.
I notice python, python3 and guile are not available for bfin. Not
that they explicitly exclude it but probably because of on of the
other dependencies they all have.
I'm not really familiar with bfin so I'm wondering if I should pursue
the libffi angle to try and get something that builds. Or look at the
dependencies of python/python3 and make micropython unavailable for
bfin.
Any thoughts/guidance?
Thanks,
Chris
--
[1] - http://autobuild.buildroot.org/results/cd2/cd21ee5ca3ca441aa2941e8d2729afa99d0403f0/build-end.log
[2] - https://github.com/micropython/micropython/blob/master/py/showbc.c#L294
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] blackfin and micropython
2015-09-21 4:25 [Buildroot] blackfin and micropython Chris Packham
@ 2015-09-21 7:13 ` Thomas Petazzoni
2015-09-21 8:51 ` [Buildroot] [PATCH] micropython: Disable for Blackfin Chris Packham
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-09-21 7:13 UTC (permalink / raw)
To: buildroot
Chris,
On Mon, 21 Sep 2015 16:25:54 +1200, Chris Packham wrote:
> I'm just looking at the micropython build failures and the blackfin
> ones have have me a bit stumped.
>
> The ones currently showing up[1] are format specifier errors. The code
> in question[2] doesn't look particularly bad and other
> architectures/compilers aren't complaining I guess it is getting
> confused with the math around const byte * and unsigned int. I can
> work around that issue by adding -Wno-error=format to CFLAGS for
> BR2_bfin. But that leads to the next issue.
>
> modffi.c:87: error: expected specifier-qualifier-list before ?ffi_closure?
> modffi.c: In function ?mod_ffi_callback?:
> modffi.c:248: error: ?mp_obj_fficallback_t? has no member named ?clo?
>
> I think these are because nothing defines FFI_CLOSURES. ffitarget.h
> for bfin seems a lot sparser than for other architectures so I'm
> thinking that's the problem.
>
> I notice python, python3 and guile are not available for bfin. Not
> that they explicitly exclude it but probably because of on of the
> other dependencies they all have.
Python is not available because it depends on BR2_USE_MMU as it uses
fork().
Guile is not available, because it depends on libatomic, which is not
available on Blackfin.
None of these seem to apply to Micropython. However, it would be fine
for me if you did:
# libffi doesn't provide the closure implementation on Blackfin
depends on !BR2_bfin
And that's it. The number of Blackfin developers using the mainline
Buildroot seems very limited, so I don't think it's worth the effort
fixing all packages, especially when the fix is non-trivial.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] micropython: Disable for Blackfin
2015-09-21 7:13 ` Thomas Petazzoni
@ 2015-09-21 8:51 ` Chris Packham
2015-09-21 9:22 ` Baruch Siach
0 siblings, 1 reply; 5+ messages in thread
From: Chris Packham @ 2015-09-21 8:51 UTC (permalink / raw)
To: buildroot
There are two problems building micropython for Blackfin. The first is
some printf format specifier warnings/errors that seem to be triggered
only for that architecture/compiler. This could be worked around by
specifying CFLAGS=-Wno-error=format.
The second problem is that libffi doesn't provide the closure
implementation on Blackfin. There is no known workaround for this issue.
For now disable micropython on Blackfin.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
package/micropython/Config.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/micropython/Config.in b/package/micropython/Config.in
index c62b3ab..4664494 100644
--- a/package/micropython/Config.in
+++ b/package/micropython/Config.in
@@ -1,6 +1,8 @@
config BR2_PACKAGE_MICROPYTHON
bool "micropython"
select BR2_PACKAGE_LIBFFI
+ # libffi doesn't provide the closure implementation on Blackfin
+ depends on !BR2_bfin
depends on BR2_TOOLCHAIN_HAS_THREADS
help
Micro Python is a lean and fast implementation of the Python 3
--
2.5.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] micropython: Disable for Blackfin
2015-09-21 8:51 ` [Buildroot] [PATCH] micropython: Disable for Blackfin Chris Packham
@ 2015-09-21 9:22 ` Baruch Siach
2015-09-22 4:18 ` [Buildroot] [PATCHv2] " Chris Packham
0 siblings, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2015-09-21 9:22 UTC (permalink / raw)
To: buildroot
Hi Chris,
On Mon, Sep 21, 2015 at 08:51:57PM +1200, Chris Packham wrote:
> There are two problems building micropython for Blackfin. The first is
> some printf format specifier warnings/errors that seem to be triggered
> only for that architecture/compiler. This could be worked around by
> specifying CFLAGS=-Wno-error=format.
>
> The second problem is that libffi doesn't provide the closure
> implementation on Blackfin. There is no known workaround for this issue.
>
> For now disable micropython on Blackfin.
>
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
> package/micropython/Config.in | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/micropython/Config.in b/package/micropython/Config.in
> index c62b3ab..4664494 100644
> --- a/package/micropython/Config.in
> +++ b/package/micropython/Config.in
> @@ -1,6 +1,8 @@
> config BR2_PACKAGE_MICROPYTHON
> bool "micropython"
> select BR2_PACKAGE_LIBFFI
> + # libffi doesn't provide the closure implementation on Blackfin
> + depends on !BR2_bfin
Please add the same dependency to the comment below. No need to repeat the
explanation there. The reason is that the comment is useless when the package
is disabled for the current architecture.
baruch
> depends on BR2_TOOLCHAIN_HAS_THREADS
> help
> Micro Python is a lean and fast implementation of the Python 3
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCHv2] micropython: Disable for Blackfin
2015-09-21 9:22 ` Baruch Siach
@ 2015-09-22 4:18 ` Chris Packham
0 siblings, 0 replies; 5+ messages in thread
From: Chris Packham @ 2015-09-22 4:18 UTC (permalink / raw)
To: buildroot
There are two problems building micropython for Blackfin. The first is
some printf format specifier warnings/errors that seem to be triggered
only for that architecture/compiler. This could be worked around by
specifying CFLAGS=-Wno-error=format.
The second problem is that libffi doesn't provide the closure
implementation on Blackfin. There is no known workaround for this issue.
For now disable micropython on Blackfin.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
Changes since v1:
- Supress comment section on bfin also
- Re-order depends to list !BR2_bfin last
package/micropython/Config.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/micropython/Config.in b/package/micropython/Config.in
index c62b3ab..dae41b7 100644
--- a/package/micropython/Config.in
+++ b/package/micropython/Config.in
@@ -2,6 +2,8 @@ config BR2_PACKAGE_MICROPYTHON
bool "micropython"
select BR2_PACKAGE_LIBFFI
depends on BR2_TOOLCHAIN_HAS_THREADS
+ # libffi doesn't provide the closure implementation on Blackfin
+ depends on !BR2_bfin
help
Micro Python is a lean and fast implementation of the Python 3
programming language that is optimised to run on a microcontroller.
@@ -10,3 +12,4 @@ config BR2_PACKAGE_MICROPYTHON
comment "micropython needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
+ depends on !BR2_bfin
--
2.5.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-22 4:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 4:25 [Buildroot] blackfin and micropython Chris Packham
2015-09-21 7:13 ` Thomas Petazzoni
2015-09-21 8:51 ` [Buildroot] [PATCH] micropython: Disable for Blackfin Chris Packham
2015-09-21 9:22 ` Baruch Siach
2015-09-22 4:18 ` [Buildroot] [PATCHv2] " Chris Packham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox