We don't allow references outside of the current directory and its
subdirectories in Soong. We require the directory with the sources to
opt-into being used by others, either by directly defining the modules, or
by defining filegroup modules that can be used in the src[s] fields via
":myfilegroup" (colon-prefixed module name). This way we can actually let
you control who uses files within your directory (via visibility), and
tools like `mma` and `atest` are more likely to be able to handle
"build/test everything in this directory" properly.

So in this case, either move the Android.bp up to the parent path (which
usually makes sense for parents, or for apps that have "src" / "jni" /
"res" dirs, as we do automatically look for files in the same directory for
some things), or define a filegroup in the parent and use it below (this
can be more useful if the same file is used by multiple children, though it
may make more sense to use a static library or something more specific).

That error is that you have multiple definitions of the same module, and is
unlikely to be related to just moving an Android.bp upwards (unless it was
below a `soong_namespace {}` definition, but that means you weren't using
that Android.bp in the first place).

- Dan


On Tue, Oct 15, 2019 at 8:27 AM ____ <akhireguri...@gmail.com> wrote:

> hello,
> say in a Android.bp file srcs:["../../../a.cpp"]
> I am getting the error Path is outside directory "../../../a.cpp"? How to
> overcome this?
>
> Later I tried declaring Android.bp in to a parent folder so that
> srcs:["a.cpp"] but then ,
> FAILED:
> build/make/core/base_rules.mk:325: error: /gps-noship/cacert_location:
> MODULE.TARGET.ETC.cacert_location.pem already defined by /prebuilt_HY11.
> 02:01:45 ckati failed with: exit status 1
>
> #### failed to build some targets (02:16 (mm:ss)) ####
>
> How to overcome these?
> Thanks in advance
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/75ea2ea6-f85b-4577-a98c-1fd42f867150%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/75ea2ea6-f85b-4577-a98c-1fd42f867150%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CALQgHd%3DXqqOGRCSHorr1UFV%3Dok%3DLHqEGmRrru9vGP%2BswDiZTxw%40mail.gmail.com.

Reply via email to