[Picolibc] meson and ninja
Larry Doolittle
ldoolitt at recycle.lbl.gov
Tue Apr 28 15:40:07 PDT 2020
Keith -
Thanks for the prompt response! Maybe we're in the same time zone. ;-)
On Tue, Apr 28, 2020 at 01:57:10PM -0700, Keith Packard wrote:
> The meson.build file says >= 0.50. Meson *should* complain about having
> the wrong version when you try to run it, but ...
Maybe meson-0.49.2 crashed before it got to the version test.
I get a python stack dump starting with
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 112, in run
return options.run_func(options)
proceeding through about 37 intermediate entries to
File "/usr/lib/python3/dist-packages/mesonbuild/mparser.py", line 405, in __init__
self.subdir = token.subdir
AttributeError: 'TernaryNode' object has no attribute 'subdir'
> You can build for a single architecture, but there's no current way to
> specify a shorter list of architectures. So, if you only need these two,
> you could just build both of them separately. I've included a shell
> script and cross compile configuration file that builds for rv32imac;
> feel free to edit this as you like.
Nice, that's a big help. The key entry is -Dmultilib=false.
The cross-foo.txt file you posted defines
cpu_family = 'riscv'
That triggers a warning from meson
Unknown CPU family riscv, please report this at https://github.com/mesonbuild/meson/issues/new
which seemed odd to me.
Referring to meson github issue #5950, I changed it to riscv32.
But that broke the picolibc ninja build!
[930/1037] Linking target test/printf/scanf
FAILED: test/printf/scanf
followed by a large number of
... undefined reference to `__iob'
error messages.
Is this easily explainable?
I can restore build success by adding riscv32 entries to
the five meson.build files that have riscv entries.
Plus cp test-riscv.ld test-riscv32.ld (?).
> If you think it would be useful, I could add a way to specify a subset
> of the desired architectures.
That could come in handy, and I do see that in git master now.
- Larry
More information about the Picolibc
mailing list