Bug 262614 - devel/bazel 5.0.0 does not compile java codes because java tool chain not supported by bazel community.
Summary: devel/bazel 5.0.0 does not compile java codes because java tool chain not sup...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-17 09:40 UTC by Ulas SAYGIN
Modified: 2024-07-27 18:25 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (aehlig)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulas SAYGIN 2022-03-17 09:40:19 UTC
hi,
you can easyly compile devel/bazel on port tree but after successful compile and install, you can not use bazel to compile java code or java project because, bazel needs freebsd java tool chain and bazel community does not support tool chain for FreeBSD OS. I learned from their people, i need to compile bazel from source.
in this case , we need to do something to support our FreeBSD by creating tool chain rather than compiling bazel from source. in this case, bazel port is useless for java jdk toolchain needed projects not only for java project but also c++ projects such as envoy proxy!

i hope someone will take care of the support because compiling bazel from source is not compiling successfull that means there is no bazel for freebsd at all.
Comment 1 Ulas SAYGIN 2022-03-17 10:46:04 UTC
When i try to compile version bazel-5.0.0-dist.zip and bazel-6.0.0-pre.20220310.1-dist.zip 

it gave error i also reported on github.

https://github.com/bazelbuild/bazel/issues/15064

https://github.com/bazelbuild/bazel/issues/15063
Comment 2 Klaus Aehlig 2022-03-19 15:40:40 UTC
I'm not sure, I understand which changes to the bazel port (or otherwise to FreeBSD) you want to happen.

You mentioned that you learned that you need to compile bazel from source---well, this is precisely what this port does. I'm not surprised that you get compilation errors when trying to do so without patching the sources; after all, the patches in the files subdirectory of the port are there for a reason. If you have any concrete suggestions how to improve on them, please let me know.

You mentioned that FreeBSD is (as a matter of fact: no longer) supported by the bazel community. Well, I guess, we have to respect their choice of which operating systems to test on and which failures to consider release critical. Of course, this port is also unofficial in the sense that it is managed by the FreeBSD project and not the bazel project (even though the author used to be a bazel developer at the time its creation), but that's the nature of ports anyway. Of course, if you find an active bazel developer who wants to take over maintainership of this port, I'm more than happy to pass it on.
Comment 3 Ulas SAYGIN 2022-03-19 16:06:49 UTC
(In reply to Klaus Aehlig from comment #2)
Thank you for you help and your ideas. i agree with youabout respecting their choices and i also think, supporting bsd will not hurt anyone because they support apple macos, which seems freebsd to me and in this case, we may think if this software works on macos ,it should work with FreeBSD also without altering code completely to run on FreeBSD. some modification may needed like you said.
i am ok with that. but one problem is always facing that, the documentation of softwares are not good and i dont know the cause of problem and i couldnt find any solution to improve anything.

my expectation from bazel port, after successfully installation with the help of the patches. when i want to install java project, i cant compile it.
it seems that port is not completely compile openjdk tool chain like you said.
or somehow there is problem. i couldnt find the reason.

even i tried to use bazel on HardenedBSD and lucky or unluckly i couldnt decide this but i found bug on openjdk and HardenedBSD team helped and finally they found their hardening settings needs to be changed for openjdks and they did.
you may see my bug report on bazel issues about bazel example java project compilation error.

https://github.com/bazelbuild/bazel/issues/15057

i couldnt even compile java projects. that is the problem i am facing and i cant validate the port compiles java tool chain correctly and integrate with bazel to use it.

now my first problem seems this, because i cant pass java tool chain requirement to compile envoy or any java project.
Comment 4 Ulas SAYGIN 2022-03-19 16:09:44 UTC
I cant use bazel to compile any java projects or needs java tool chain to compile on FreeBSD and i also tested HardenedBSD. thats i am looking for solution.
Comment 5 Michael Osipov 2022-04-11 07:16:29 UTC
Google's general policy is NOT to support FreeBSD with any of their products. They aren't a good OSS player.
Comment 6 Ulas SAYGIN 2022-04-16 10:04:01 UTC
(In reply to Michael Osipov from comment #5)
thank you for information. i didnt know that but why they do this?
don't they use freebsd for their system?
how we can reach their policy document because i kind of not liking it.
it is not right thing for big google.
Comment 7 Ulas SAYGIN 2022-04-16 10:05:43 UTC
(In reply to Michael Osipov from comment #5)
which products they have widely used by people. i dont get it.
why people abonden freebsd and like linux and macos.
macos also unix OS. i dont get the mind. apple uses some part of freebsd.
Comment 8 Michael Osipov 2022-04-17 22:08:02 UTC
Google is totally driven by commercial interests, they aren't the salvation army. They see little or no benefit in supporting any *BSD. Ask the Chromium port maintainers, Google constantly refused to upstream provided patches for *BSD.

See for yourself:
* https://groups.google.com/a/chromium.org/g/chromium-dev/c/b57hDs8yE4g/m/5tXefZ74AQAJ
* https://github.com/freebsd/chromium#readme
* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246387#c2

Basically, they claim to do OSS, but at the end this isn't good citizenship.
Comment 9 Ulas SAYGIN 2022-04-23 07:56:11 UTC
(In reply to Michael Osipov from comment #8)
Thank you for information. i am shocked but i dont understand but i think they support macos :) not sure about all products. macos has a part of freebsd and can we use their ports or their patches if it is compatible. macos network stack comes from  freebsd if i am not wrong.
it may make easy things for some part of ports , maybe.

it is not good to see this, and i wonder does FreeBSD not funded? by big corporations?
Comment 10 Michael Osipov 2022-04-25 07:14:25 UTC
(In reply to Ulas SAYGIN from comment #9)

Why? Because if it doesn't smell dollars, they don't touch it.
Comment 11 Zsolt Udvari freebsd_committer freebsd_triage 2024-07-27 18:25:14 UTC
Current version is 5.4.1.