Lots of 'Disallowed PATH tool "manpath"...' when building Android Q

1,028 views
Skip to first unread message

Michael Goffioul

unread,
Nov 14, 2019, 6:55:01 PM11/14/19
to Android Building
I'm using Fedora 30 to build AOSP. Since Android Q, when building, the terminal output is littered with hundreds of messages like the following:

17:23:06 Disallowed PATH tool "manpath" used: []string{"manpath"}

I've looked almost everywhere, but I can't find where "manpath" is actually used. Has anybody encountered the same problem?

Thanks,
Michael.

Dan Willemsen

unread,
Nov 18, 2019, 12:40:52 PM11/18/19
to Android Building
If you check out/soong.log, there should be trace logs that include the parent processes all the way up to ninja.

It sounds like one of the existing tools that we allow through is always trying to call manpath? Let me know what you find, we've definitely been shrinking this list on master.

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@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-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/c9a8a0ea-2492-4e7f-9816-11b9b91f6696%40googlegroups.com.

Michael Goffioul

unread,
Nov 18, 2019, 12:50:10 PM11/18/19
to android-...@googlegroups.com
Yes, I've already looked into that, but there's not much of a trace, e.g.:

2019/11/18 11:22:34.837088 build/soong/ui/build/sandbox_linux.go:86: [prebuilts/build-tools/linux-x86/bin/nsjail -H android-build -e -u nobody -g nobody -B / --disable_clone_newcgroup -- /bin/bash -c if [ $(hostname) == "android-build" ]; then echo "Android" "Success"; else echo Failure; fi]
2019/11/18 11:22:34.877084 build/soong/ui/build/path.go:105: Disallowed PATH tool "manpath" used: []string{"manpath"}
2019/11/18 11:22:34.877237 build/soong/ui/build/path.go:107: See https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools for more information.

I've a feeling that it's coming from bash itself. I've looked into the local and system profile/bashrc and anything I could think of, but I can't really pinpoint where it's coming from.

Colin Cross

unread,
Nov 18, 2019, 1:48:42 PM11/18/19
to android-...@googlegroups.com
I was able to reproduce this on Fedora 30, it's something to do with the environment BASH_ENV=/usr/share/Modules/init/bash, which is causing arbitrary bash code that can use any binary to be run on every non-interactive bash shell startup.

Dan Willemsen

unread,
Nov 18, 2019, 2:16:35 PM11/18/19
to Android Building
I've created a change to empty out the BASH_ENV environment variable during the build: https://android-review.googlesource.com/c/platform/build/soong/+/1168864

- Dan

Michael Goffioul

unread,
Nov 18, 2019, 2:38:31 PM11/18/19
to android-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages