[odb-users] Support for ODB on QNX

Juan Pablo Samper jp.samper at apex.ai
Wed Aug 19 20:00:10 EDT 2020


Hi Boris,

As you suggested, I pointed config.cxx to the QNX compiler:

bpkg create \
    -d qnx-aarch64 cc \
   config.cxx=ntoaarch64-g++ \
   config.cc.coptions=-O3 \
   config.install.root=$(realpath install-qnx)

and I get the following error:

qnx-aarch64-qcc/build/root.build:3:7: error: cxx and bin module target
mismatch
  info: cxx target is aarch64-nto-qnx7.0.0
  info: bin target is aarch64-nto-qnx7.0.0

When I run with -V and --verbose 6, I see:

cxx @/home/jp.samper/workspace/odb_ws/odb-build/qnx-aarch64-qcc/
...
    target     aarch64-nto-qnx7.0.0 (aarch64-unknown-nto-qnx7.0.0)
...
bin @/home/jp.samper/workspace/odb_ws/odb-build/qnx-aarch64-qcc/
  target     aarch64-nto-qnx7.0.0

which could explain the mismatch.

Is there a way to work around this? I tried manually giving it cxx.target
and/or bin.target, but it says I can't override.

W.R.T side note:
I think a note in the FAQ like the reply above would be enough to get
someone started.
I guess I just assumed cross-compiling wouldn't be that simple: as a sanity
check, I tried with aarch64-linux-gnu-g++, and as you claimed, it just
worked :)

Best,
JP

On Wed, Aug 19, 2020 at 7:20 AM Boris Kolpackov <boris at codesynthesis.com>
wrote:

> Juan Pablo Samper <jp.samper at apex.ai> writes:
>
> > Are there any guidelines for cross-compiling ODB using build2?
>
> It should just work (I know, famous last words) provided your cross-
> compiler is sane (which it should be). Specifically, the build is
> already split into two configurations: the ODB compiler (which you
> would build natively for host) and the runtime libraries (which you
> would cross-build for target). So just point config.cxx to your
> cross-compiler for the latter and see what happens.
>
> But let me know if there are any issues, I would definitely be
> interested in ironing them out.
>
>
> > (Side note: Maybe a link here https://build2.org/faq.xhtml#cross?)
>
> You mean from the odb/build2-install.xhtml instructions? Seeing that
> this FAQ entry doesn't say much other than "it's expected to work",
> maybe a note alone the above lines would be more useful?
>


-- 

Juan Pablo Samper

Software Tooling and Infrastucture

Apex.AI

www.apex.ai


More information about the odb-users mailing list