Repository navigation
Conversation
jdk-lib generates a recursive fileset of library files from
`<prefix>/lib`.
The `<prefix>/lib` may hold files that are not dynamic libraries such as
man page archives, e.g.:
% find /usr/local/lib -type d -name man
/usr/local/lib/perl5/5.42/perl/man
/usr/local/lib/perl5/site_perl/man
/usr/local/lib/node_modules/npm/node_modules/cssesc/man
/usr/local/lib/node_modules/npm/man
% find /usr/local/lib/perl5/5.42/perl/man -type f -name \*.so\*
% find /usr/local/lib/perl5/5.42/perl/man -type f -name \*.gz | head -3
/usr/local/lib/perl5/5.42/perl/man/man1/perlcygwin.1.gz
/usr/local/lib/perl5/5.42/perl/man/man1/perlform.1.gz
/usr/local/lib/perl5/5.42/perl/man/man1/perlnumber.1.gz
One of the problems is that perl5 uses colon in man pages:
% find /usr/local/lib/perl5/5.42/perl/man -type f -name \*.gz | grep : | head -3
/usr/local/lib/perl5/5.42/perl/man/man3/Encode::JP.3.gz
/usr/local/lib/perl5/5.42/perl/man/man3/Test2::Event::Plan.3.gz
/usr/local/lib/perl5/5.42/perl/man/man3/Test::Builder.3.gz
Bazel target names (including files in the fileset) does not allow
columns, leading to errors like this:
ERROR: /home/user/.cache/bazel/_bazel_example/2edd7b3f68d10f544e2471e3b7360f76/external/rules_java++toolchains+local_jdk/BUILD.bazel:51:10: @@rules_java++toolchains+local_jdk//:jdk-lib: invalid label 'lib/perl5/5.42/perl/man/man3/App::Cpan.3.gz' in element 14608 of attribute 'srcs' of 'filegroup': invalid target name ':Cpan.3.gz': target names may not contain ':'
This change excludes `**/man/**` folders from jdk-lib.
NO_ISSUE
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Signed CLA |
|
Wouldn't this only match if you set JAVA_HOME to |
|
I don't have JAVA_HOME configured in my environment: It runs on FreeBSD 15.1: Bazel 9.3.0 is installed using pkg(8) and it picks up openjdk21: These packages install under |
|
Bazel state: |
|
I'm not familiar with FreeBSD, but it looks like even with this PR Bazel would still glob and potentially digest all of |
|
I imagine what's happening is I would recommend not using the local jdk (set If that's not an option, either put the jdk bin directory earlier in your |
Indeed, it does glob everything from
I believe you refer to hermetic builds that are controlled via https://bazel.build/docs/bazel-and-java#hermetic-testing This PR attempts to fix non-hermetic builds, which is fine to use in certain setups. As of java setup: A bit more elaborate Java configuration info: I suspect |
|
The problem is the presence of the javavm wrapper. You'll want to set the |
|
Thanks for the tip. Indeed, Bazel now works: |
jdk-lib generates a recursive fileset of library files from
<prefix>/lib.The
<prefix>/libmay hold files that are not dynamic libraries such as man page archives, e.g.:One of the problems is that perl5 uses colon in man pages:
Bazel target names (including files in the fileset) does not allow columns, leading to errors like this:
This change excludes
**/man/**folders from jdk-lib.NO_ISSUE