Discussion:
[capnproto] Reg. Building for Android - Makefile tests issue
Amit S
2018-08-17 04:46:27 UTC
Permalink
Hi,


I am trying to build capnproto for Android.

I am able to cross compile the library partially. As in the `make` command
generates libcapnp, but it's not building libcapnp-josn* libraries.

The reason being, `make` command stops at execution of
`test_capnpc_middleman` as the test doesn't run on Linux machine since the
files are cross-compiled.

When I commented the steps inside the rule `test_capnpc_middleman`, I was
able to compile and build all the required shared libraries.

Any suggestions on how to skip the tests execution from `make` command?

or If required, I can submit a PR for targeting cross-compile build where
the test is not executed during make.

Please advice.
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
b***@gmail.com
2018-08-17 15:19:19 UTC
Permalink
Hi!

You can use CMake based build and pass -DBUILD_TESTING=NO option to disable
building of the tests. This also works with Android cmake toolchain.

Autotools based build seems to not have such an option.
Post by Amit S
Hi,
I am trying to build capnproto for Android.
I am able to cross compile the library partially. As in the `make` command
generates libcapnp, but it's not building libcapnp-josn* libraries.
The reason being, `make` command stops at execution of
`test_capnpc_middleman` as the test doesn't run on Linux machine since the
files are cross-compiled.
When I commented the steps inside the rule `test_capnpc_middleman`, I was
able to compile and build all the required shared libraries.
Any suggestions on how to skip the tests execution from `make` command?
or If required, I can submit a PR for targeting cross-compile build where
the test is not executed during make.
Please advice.
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
'Kenton Varda' via Cap'n Proto
2018-08-17 22:20:35 UTC
Permalink
Hi Amit,

When cross-compiling, you must first install capnp natively on the build
system. Then, you can configure the cross build to use the
already-installed version rather than the in-tree build using:

./configure --with-external-capnp

If you don't want to install `capnp` on the build system, you can compile
the binary and then set the CAPNP and CAPNPC_CXX environment variables to
point at the locations of capnp and capnpc-c++ respectively.

-Kenton
Post by Amit S
Hi,
I am trying to build capnproto for Android.
I am able to cross compile the library partially. As in the `make` command
generates libcapnp, but it's not building libcapnp-josn* libraries.
The reason being, `make` command stops at execution of
`test_capnpc_middleman` as the test doesn't run on Linux machine since the
files are cross-compiled.
When I commented the steps inside the rule `test_capnpc_middleman`, I was
able to compile and build all the required shared libraries.
Any suggestions on how to skip the tests execution from `make` command?
or If required, I can submit a PR for targeting cross-compile build where
the test is not executed during make.
Please advice.
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/capnproto.
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
Loading...