cappuccino / cappuccino

Web Application Framework in JavaScript and Objective-J
https://cappuccino.dev/
GNU Lesser General Public License v2.1
2.2k stars 333 forks source link

bootstrap.sh incorrectly parses Java version #3068

Closed dboris closed 1 month ago

dboris commented 1 month ago

I have installed openjdk8 from macports, which should be compatible with Cappuccino 1.0. Running the bootstrap.sh script from the starter package (or from the github url), results in error:

./bootstrap.sh 
Error: Narwhal is not compatible with your version of OpenJDK: OpenJDK Runtime Environment (build 1.8.0_372-root_2024_04_08_16_24-b00).
Please upgrade to OpenJDK >= 6b18 or switch to the Sun JVM. Then re-run bootstrap.sh.
cappbot commented 1 month ago

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

enquora commented 1 month ago

This error message appears to be from a non-current branch - is this an installation from source? which commit hash is the most current one, if so?

dboris commented 1 month ago

This was from the CappuccinoStarter-1.0.0.zip download, but it also appears if I run the install script:

curl https://raw.githubusercontent.com/cappuccino/cappuccino/v1.0.0/bootstrap.sh >/tmp/cb.sh && bash /tmp/cb.sh
Error: Narwhal is not compatible with your version of OpenJDK: OpenJDK Runtime Environment (build 1.8.0_372-root_2024_04_08_16_24-b00).
Please upgrade to OpenJDK >= 6b18 or switch to the Sun JVM. Then re-run bootstrap.sh.
mrcarlberg commented 1 month ago

It looks like the version check is broken. Will it work for you if you download the bootstrap.sh script manually and remove the version check in the script?

Remember that the Narwhal version is deprecated and we are in the process of moving to the Node version. Check here for more information on the Node version and how to use it.

enquora commented 1 month ago

This is resolved in master (commit fb20463449363dc6fdc7e8222726075ae1f3ef4b). It has been generally agreed that a final release for the narwhal branch isn't justified, and that a source code installation from master should be used rather than the the last public release. Note also that since that release, several breaking changes to CPBox (and possible other AppKit controls) have occurred. These are in both the 'master' and 'node' branches.

Help is available in the Gitter channel Both the Master and Node branches are currently usable, with the following caveats:

dboris commented 1 month ago

If I remember correctly, even when installed from the node branch, objjc was erroring because narwhal cannot be found. Cannot verify that at the moment because I have narwhal installed.

cappbot commented 1 month ago

Milestone: Someday. Label: #acknowledged. What's next? A reviewer should examine this issue.

enquora commented 1 month ago

I've confirmed both that installation for current master (narwhal) and node branches works. Installation of the node branch from source requires running dist/cappuccino/bin/jake sudo-install to symlink the objective-c and cappuccino binaries into /usr/local/bin, and the presence of python2 at /usr/bin/python, for XcodeCapp to work.

The default branch will be transitioned to 'node' over the coming week. The above caveats will remain for a handful of weeks while python2 code in XcodeCapp is removed in favour of native Objective-C replacements.

In addition, XcodeCapp (node branch) will not currently compile under Xcode 15. A patch for this was applied to the narwhal branch late March, and will be merged into the node branch over the coming week.

If help is needed doing any of this immediately, please ask in the Gitter forum.

Is there any reason to keep this open?

dboris commented 1 month ago

No, closing.