Skip to content

Commit

Permalink
openjdk: symlink to /bin before adding the lib symlink.
Browse files Browse the repository at this point in the history
  • Loading branch information
korli committed Nov 1, 2018
1 parent c58668b commit 8adae0e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dev-lang/openjdk/openjdk-1.8.u40_b27.recipe
Expand Up @@ -10,7 +10,7 @@ license. OpenJDK is the official Java SE 8 reference implementation."
HOMEPAGE="https://openjdk.java.net/"
COPYRIGHT="2015 Oracle and/or its affiliates."
LICENSE="GNU GPL v2"
REVISION="4"
REVISION="5"
SOURCE_URI="https://bitbucket.org/hamishm/haiku-jdk8u/get/6e3a7c2446ea.zip"
CHECKSUM_SHA256="68cb8171d84b1a0c12e20b2ecc968a12ed8f64d39858a6e3af9e287877c2245e"
SOURCE_DIR="hamishm-haiku-jdk8u-6e3a7c2446ea"
Expand Down Expand Up @@ -200,16 +200,16 @@ INSTALL()
# set up the cacerts link
ln -sf $dataDir/ssl/java/cacerts $jdkDir/jre/lib/security/

# workaround: libstdc++.so.6 and its dependencies needed to load libjvm.so
mkdir -p $jdkDir/bin/lib
ln -sf $libDir/libstdc++.so.6 $libDir/libgcc_s.so.1 $libDir/libroot.so \
$jdkDir/bin/lib/

# symlink the executables to binDir
mkdir -p $prefix/bin
symlinkRelative -s $jdkDir/bin/* $prefix/bin
# TODO: We should probably link only a subset.

# workaround: libstdc++.so.6 and its dependencies needed to load libjvm.so
mkdir -p $jdkDir/bin/lib
ln -sf $libDir/libstdc++.so.6 $libDir/libgcc_s.so.1 $libDir/libroot.so \
$jdkDir/bin/lib/

# create a profile.d file that sets up JAVA_HOME
jdkProfile=$dataDir/profile.d/openjdk.sh
mkdir -p $(dirname $jdkProfile)
Expand Down

7 comments on commit 8adae0e

@korli
Copy link
Contributor Author

@korli korli commented on 8adae0e Nov 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@waddlesplash it seems the openjdk 1.7 package was obsoleted, and the 1.8 requires it to rebuild.

Ideally the 1.7 package would be renamed to openjdk17 for instance with a conflict with openjdk, and the recipe would depend on cmd:java >= 1.7. We probably don't care for now...

@korli
Copy link
Contributor Author

@korli korli commented on 8adae0e Nov 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with https://review.haiku-os.org/#/c/haiku/+/649/ the symlinks for libstdc++.so.6 and its dependencies can be removed.

@waddlesplash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It requires it only due to a version constraint in this recipe. Humdinger almost got 1.8 to build with 1.8, but failed only due to the "out of memory" error that was not fixed until the patch added in revision 3. So we should theoretically be able to change that constraint now.

@korli
Copy link
Contributor Author

@korli korli commented on 8adae0e Nov 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but the current package is broken. The new one won't work on the builder anyway because it uses an older haiku. The recipe would need a constraint on the requires haiku version.

@waddlesplash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but the current package is broken. The new one won't work on the builder anyway because it uses an older haiku. The recipe would need a constraint on the requires haiku version.

I'm confused. The existing package may be broken, but this fixes that, doesn't it? So I need to delete 1.8 and add 1.7 back again to the builder, and then add the server VM patch, but after that it should work, yes?

@korli
Copy link
Contributor Author

@korli korli commented on 8adae0e Nov 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a fix for the oom. If you have one then please.

@mmlr
Copy link
Member

@mmlr mmlr commented on 8adae0e Nov 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't inject packages by putting them into the packages repo as they will get obsoleted. Supplying initial packages for cyclic dependencies is done through the set of initial packages which is in buildmaster/initial-packages inside the buildmaster instance by default.

Please sign in to comment.