-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openjdk@8 1.8.0-432 #194719
base: master
Are you sure you want to change the base?
openjdk@8 1.8.0-432 #194719
Conversation
ff25870
to
68bd427
Compare
Why is the on_arm do
depends_on "openjdk@21"
end
on_intel do
depends_on "openjdk@8"
end I printed the content of the #!/bin/bash
export JAVA_HOME="${JAVA_HOME:-/usr/local/opt/openjdk@8/libexec/openjdk.jdk/Contents/Home}"
exec "${JAVA_HOME}/bin/java" -jar "/usr/local/Cellar/embulk/0.11.5/libexec/embulk-0.11.5.jar" "$@" It seems that the P.S. def install
java_version = Hardware::CPU.intel? ? "1.8" : "21"
libexec.install "embulk-#{version}.jar"
bin.write_jar_script libexec/"embulk-#{version}.jar", "embulk", java_version:
end |
fed29db
to
68bd427
Compare
0b8bfc0
to
68bd427
Compare
79c16e8
to
bd657e1
Compare
16477cb
to
d3955dd
Compare
14edc3f
to
e34a3cd
Compare
e34a3cd
to
6864d32
Compare
d4705ea
to
724e806
Compare
724e806
to
4f8cde5
Compare
a7b00bb
to
440c14a
Compare
440c14a
to
bff87d7
Compare
The I believe the To clarify the changes in this PR, since JNF (JavaNativeFoundation.framework) is incomplete in macOS Sonoma or newer (but
|
I opened an issue: Homebrew/brew#18695 |
Did you try the header thing I suggested? I ask because in theory it should still be possible to link against system JNF as the linker information does still ship with the SDK - only the headers were removed: resource("JavaNativeFoundation").stage(buildpath/"JNF")
args << "--with-extra-cflags=-isystem #{buildpath/"JNF/apple/JavaNativeFoundation"}" |
Not yet, as I don’t know where to download these headers. However, there’s an error that might indicate it won’t necessarily work: |
That was using the resource you already have. The test I ran locally was: $ clang -arch x86_64 -isystem $(/usr/libexec/java_home)/include -isystem $(/usr/libexec/java_home)/include/darwin -isystem openjdk-iTunesOpenJDK-1014.0.2.12.1/apple/JavaNativeFoundation/ -framework JavaNativeFoundation test.m (java_home stuff not needed in an OpenJDK build - just was because I was running it from outside) #include <JavaNativeFoundation/JavaNativeFoundation.h>
int main()
{
printf("%f\n", JNFJavaMillisToNSTimeInterval(978307210000)); // should equal 10.0
return 0;
} $ ./a.out
10.000000
$ otool -L a.out
a.out:
/System/Library/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation (compatibility version 1.0.0, current version 84.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2) |
3dae490
to
77955fd
Compare
@Bo98 Hi, I have tried, but it still doesn't work, whether it's
From the error log above, it seems that it will look for headers in framework 'JavaNativeFoundation' rather than those provided by What did I mainly change? ↓↓↓ if OS.mac?
# Work around Xcode 16 bug: https://bugs.openjdk.org/browse/JDK-8340341
ENV.append_to_cflags("-mllvm -enable-constraint-elimination=0") if DevelopmentTools.clang_build_version == 1600
args += %w[
--with-toolchain-type=clang
--with-zlib=system
]
# NOTE: Since macOS Sonoma or newer do not include the required headersfor JNF (JavaNativeFoundation.framework),
# so we will use the headers provided at https://github.com/apple/openjdk.
if MacOS.version >= :sonoma
resource "JavaNativeFoundation" do
url "https://github.com/apple/openjdk/archive/refs/tags/iTunesOpenJDK-1014.0.2.12.1.tar.gz"
sha256 "e8556a73ea36c75953078dfc1bafc9960e64593bc01e733bc772d2e6b519fd4a"
stage do
jnf_headers_search_path = Pathname.pwd/"apple/JavaNativeFoundation/JavaNativeFoundation"
args += %W[
--with-extra-cflags=-isystem#{jnf_headers_search_path}
--with-extra-cxxflags=-isystem#{jnf_headers_search_path}
]
end
end
ldflags << "-Wl,-rpath,#{MacOS.sdk_path}/System/Library/Frameworks"
end
#......
end |
133c53c
to
34e252c
Compare
34e252c
to
3a03359
Compare
172dd0a
to
b069910
Compare
b069910
to
2448cc0
Compare
Looks like there's one part that doesn't accept |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?