Created attachment 228947 [details] updated port files
I updated the existing port from 2020.2.3 to 2021.2.3 and ran it locally.
Created attachment 229084 [details] git diff patch diff of port
Tested patch on FreeBSD 12.3-STABLE (built 2021-11-01); 1) Patch may have inadvertently removed recently added CPE info see; https://cgit.freebsd.org/ports/commit/java/intellij/Makefile?id=70f6a3fd1b1c356e6144c8303406fa91359c284d 2) % portlint -A WARN: Makefile: [44]: use tab (not space) to make indentation Hoping we can get this updated version (2021.2.3) into ports soon as the current version (2020.2.3) doesn't support builds using JDK 17 :-(
Not sure if it's obvious or not, but IntelliJ 2021.2.3 failed to start for me because I had JAVA_HOME set to the JDK 17 (/usr/local/openjdk17), switching JAVA_HOME back to JDK 11 (/usr/local/openjdk11) worked fine!
Note: Just found that I can keep my as JAVA_HOME=/usr/local/openjdk17 and still run IntelliJ using JDK 11 by setting the following env var: IDEA_JDK=/usr/local/openjdk11
Hi - as this is my first patch, I need some guidance. Were you making those changes? Going forward, once I see the changes you've done, I can continue to incorporate those in future updates. I hope to monitor the website for updates and publish patches more frequently.
(In reply to a52ca063 from comment #6) I haven't made any changes, just providing some feedback for your patch regarding a couple of minor things I noticed! :-) Hopefully the maintainer of this port can take a peek also and provide some additional guidance.
Anyone getting segvs? % IDEA_JDK=/usr/local/openjdk11 idea WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.intellij.util.lang.UrlClassLoader (file:/usr/local/share/intellij-ultimate/lib/util.jar) to field java.lang.ClassLoader.classLoaderValueMap WARNING: Please consider reporting this to the maintainers of com.intellij.util.lang.UrlClassLoader WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2021-12-18 13:27:22,754 [ 87] WARN - llij.ide.plugins.PluginManager - id redefinition ([row,col,system-id]: [2,3,"product classpath"]) 2021-12-18 13:27:25,357 [ 2690] WARN - tor.impl.FontFamilyServiceImpl - Couldn't access required runtime API, will fall back to basic logic of font selection # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x000025e838cbf046, pid=91019, tid=120050 # # JRE version: OpenJDK Runtime Environment (11.0.13+8) (build 11.0.13+8-1) # Java VM: OpenJDK 64-Bit Server VM (11.0.13+8-1, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64) # Problematic frame: # V [libjvm.so+0xebf046][thread 120028 also had an error] JVM_RaiseSignal+0x3d15c6
(In reply to Kevin Bowling from comment #8) Works without issues on my machine, here is the logs from starting the IDE and opening a project; % IDEA_JDK=/usr/local/openjdk11 idea WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.intellij.util.lang.UrlClassLoader (file:/usr/local/share/intellij/lib/util.jar) to field java.lang.ClassLoader.classLoaderValueMap WARNING: Please consider reporting this to the maintainers of com.intellij.util.lang.UrlClassLoader WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2021-12-19 00:05:04,055 [ 2448] WARN - tor.impl.FontFamilyServiceImpl - Couldn't access required runtime API, will fall back to basic logic of font selection 2021-12-19 00:05:05,428 [ 3821] WARN - tellij.ide.SystemHealthMonitor - issue detected: bundled.jre.version.message (ignored) 2021-12-19 00:05:54,120 [ 52513] WARN - #com.intellij.ui.jcef.JBCefApp - JCEF runtime library is not a JBR module (Use JBR bundled with the IDE % java -version openjdk version "11.0.13" 2021-10-19 OpenJDK Runtime Environment (build 11.0.13+8-1) OpenJDK 64-Bit Server VM (build 11.0.13+8-1, mixed mode) OS: FreeBSD 12.3-STABLE (built Wed 1st Dec)
Has the port maintainer provided any feedback?
No, I emailed the maintainer separately and haven't received any response.
Okay. I've set the maintainer timeout flag.
Okay, what are the next steps and is anything needed on my end?
I don't know what the next step is. I presume this bug will go into a report somewhere. The port maintainer should already be aware this port is out of date, from his portscout RSS feed (https://portscout.freebsd.org/bsam@freebsd.org.html).
Latest version is now 2021.2.4 from the 2021.2.x releaes, or alternatievly 2021.3.2 from the 2021.3.x releases. Any chance we can get some prgress on this ticket, as the older versions of IntelliJ do not support Java 17.
I haven't received a response from the maintainer. I will look to bump intellij, it's been awhile since I've looked at this, so it may take me some time to update :(.
Created attachment 232233 [details] patch intellij to 2021.3.2
I updated the patch to 2021.3.2. Please review.
The fonts are blurry for me - I vaguely recall that JDK11 and newer replaced fonts so I need to manually copy them to make them sharp. The IDE works, but is difficult to use with fonts that are not sharp.
I think the Makefile patch has accidently removed the CPE info lines, e.g. USES= cpe python:run shebangfix CPE_VENDOR= jetbrains CPE_PRODUCT= ${PORTNAME}_idea Also the Makefile diff is showing lots of extraneous changes due to the removal of whitespace (TAB), which should be kept in place.
Created attachment 232349 [details] updated patch As per the comments, I have added the tabs back and the other variables that were inadvertently removed.
Created attachment 232393 [details] Suggested patch/diff Have attached a suggested patch based on your one, changes include; Makefile ========= Added BUILD_TYPE, BUILD_VERSION_ BUILDMARKER vars (based off of Makefile of intellij-ultimate port) Removed line in the do-install section; ${WRKSRC}/plugins/android/lib/libwebp/ \ Added removal of these files in the do-install section; ${WRKSRC}/plugins/cwm-plugin/quiche-native/ \ ${WRKSRC}/plugins/webp/lib/libwebp/ Regenerated pkg-plist
Created attachment 234123 [details] Update to 2022.1.1 (In reply to James Wright from comment #22) I created a patch updates the port to 2022.1.1 based on this one. Please help test. If this works fine, I think we can update it with maintainer-timeout.
(In reply to Li-Wen Hsu from comment #23) OS: FreeBSD 12.3-STABLE (built 2022/05/01) JDK: openjdk11-11.0.15+10.1 The patch for version 2022.1.1 seem to work fine for me, with the only issue that the following error is emitted when exiting the IDE; 2022-05-23 00:02:31,996 [ 42418] SEVERE - #c.i.o.v.n.RefreshQueueImpl - null org.jetbrains.concurrency.AsyncPromiseKt$CANCELED$1 2022-05-23 00:02:32,000 [ 42422] SEVERE - #c.i.o.v.n.RefreshQueueImpl - IntelliJ IDEA 2022.1.1 Build #IC-221.5591.52 2022-05-23 00:02:32,002 [ 42424] SEVERE - #c.i.o.v.n.RefreshQueueImpl - JDK: 11.0.15; VM: OpenJDK 64-Bit Server VM; Vendor: OpenJDK BSD Porting Team 2022-05-23 00:02:32,004 [ 42426] SEVERE - #c.i.o.v.n.RefreshQueueImpl - OS: FreeBSD
Maintainer reset.
I can confirm that the patch from attachment 234123 [details] builds using poudriere on 13.1 stable amd64. However when I try to run it I get the following error: OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.intellij.util.lang.PathClassLoader"). To use archived non-system classes, this property must not be set Error: LinkageError occurred while loading main class com.intellij.idea.Main java.lang.ExceptionInInitializerError: null
I forgot to add that the error occurs when using openjdk17. It seems to work when using openjdk11. Not sure why that is an issue.
Created attachment 235140 [details] Updated patch for 2022.1.3 Updated the patch for the latest release (2022.1.3)
*** Bug 268267 has been marked as a duplicate of this bug. ***
Created attachment 240386 [details] patch to update to 2022.2.4 attempt to update to 2022.2.4
Created attachment 240395 [details] updated patch to 2022.2.4 updated patch to 2022.2.4
Latest is now 2022.3.3, with 2023.1.1 forthcoming, thus all existing patches obsoleted.
That is incorrect, please see if you can download this file: https://download-cdn.jetbrains.com/idea/ideaIC-2022.3.3-no-jbr.tar.gz If not, then that is why I provided 2022.2.4. Intellij has NOT released the download without jbr, so the latest without jbr is: https://download-cdn.jetbrains.com/idea/ideaIC-2022.2.4-no-jbr.tar.gz Please revalidate 2022.2.4.
In addition, I have also tried all the versions in between and jetbrains has only released up to 2022.2.4 without jbr.
-no-jbr is merely an option when building from source, see https://github.com/archlinux/svntogit-community/blob/packages/intellij-idea-community-edition/trunk/enable-no-jdr.patch JetBrains sources available on GitHub; they tag everything as [product]/[build id] so 22.3.3 would be idea/223.8836.41.
Offical release versions can be viewed here; https://www.jetbrains.com/idea/download/other.html However, it appears that 2.2.x and 2.3.x releases no longer list "Linux without JBR" links, even though the downloads do actually exist for the 2.2.x releases. e.g. the following isn't available as a link on the page, but is available here; https://download.jetbrains.com/idea/ideaIC-2022.2.4-no-jbr.tar.gz Perhaps JetBrains are no longer building and packaging the "no-jbr" packages with the 2.3.x versions, and we instead have to build IntelliJ from sources like Arch is doing?
Discovered this comment on the JetBrains tracker suggesting they indeed no longer package the no-jbr versions; https://youtrack.jetbrains.com/issue/IDEA-309170 "That's correct; starting from 2022.3, we're no longer providing no-JBR distributions and corresponding patches. I'll check what we can do to make the user experience better."
Yes - I agree, I was hoping to get to that. The most recent invalidation is frustrating, combined with it taking this long to see no update is just difficult to comprehend. I'm a bit discouraged by the process at the moment, otherwise, I would have taken a week to bang it out. Yes, Arch has an example, but we've been chasing this for 1.5 years now. If someone can convert the Arch sample to FreeBSD and post that here, I will happily test it. Otherwise, I probably won't pick it up until the 2nd week of April.
I had a crack at building from source, it's not really an option like I thought. The build process immediately unconditionally downloads some artefacts for jps-bootstrap, which can be worked around with MASTER_SITES/DISTFILES grouping and extraction, but they appear to be Linux binaries. It appears that even for previous versions where JetBrains provided no-jbr archives, that jps-bootstrap part still ran. Might be able to nuke the jbr directory after extraction but I haven't had a chance to try yet.
Would it be possible to share whatever you have, perhaps attached here, privately, on github, etc.? Perhaps that will be enough encouragement to get me looking at it. Divide and conquer.
Created attachment 240866 [details] update intellij 2022.3.3 patch Updates IntelliJ to 2022.3.3 from the jetbrains distribution package, and removes the bundled JBR during install. Note that IntelliJ 2022.3.3 now requires Java 17, so you may have to update your IDEA_JDK env var if already set: IDEA_JDK=/usr/local/openjdk17 Tested on FreeBSD 13.2-STABLE, throws a couple of warnings during loading and exiting, but otherwise seems to work ok.
Created attachment 240869 [details] updated patch for current intellij in ports The earlier patch doesn't match the version of intellij in the ports tree. I updated that along with the plist.
This built and runs for me. Thanks James. One comment, this has been there before with the earlier ports, but on my machines, I make this change so the fonts are smooth: printf '%s\n' '-Dawt.useSystemAAFontSettings=on' >> /usr/local/share/intellij/bin/idea.vmoptions printf '%s\n' '-Dswing.aatext=true' >> /usr/local/share/intellij/bin/idea.vmoptions printf '%s\n' '-Dsun.java2d.xrender=true' >> /usr/local/share/intellij/bin/idea.vmoptions gsed -i 's/^-Dsun.java2d.xrender=false/-Dsun.java2d.xrender=true/' /usr/local/share/intellij/bin/idea64.vmoptions printf '%s\n' '-Dawt.useSystemAAFontSettings=on' >> /usr/local/share/intellij/bin/idea64.vmoptions printf '%s\n' '-Dswing.aatext=true' >> /usr/local/share/intellij/bin/idea64.vmoptions Should that be done directly here? Or, is it just me that has terrible fonts with the default port as it is?
(In reply to a52ca063 from comment #42) Thanks for updating it, i inadvertently generated the diff against our previous version rather than the version in ports! I think there is an a line in the Makefile that needs to be added to your patch to remove some other native libs; Makefile (around line 48) ${WRKSRC}/plugins/cwm-plugin/quiche-native/ \ Also need to update the pkg-plist because those files also need removing from there, sorry!
(In reply to a52ca063 from comment #43) The fonts have always looked fine (smooth) here without any additional changes, so not what is going on with that, i'll check again later today!
Created attachment 240888 [details] Updated java/intellij 2022.3.3 patch Updated patch for upgrade to 2022.3.3, including following fixes; 1) Fixed JNA loading error by adding dependency on devel/jna 2) Fixed Terminal window errors by including dependency on devel/jetbrains-pty4j 3) Removed old JRE8 workaround of setting of sun.java2d.xrender=false Tested on FreeBSD 13.2-STABLE (amd64) IDE can load, build, run, and debug Java projects with no issues encountered so far.
(In reply to James Wright from comment #46) Additional Note: The fixes for JNA and PTY4J were borrowed from the devel/jetbrains-webstorm port; https://cgit.freebsd.org/ports/tree/devel/jetbrains-phpstorm/Makefile Perhaps we should consider renaming this port to jetbrains-intellij or jetbrains-idea in the future for consistency with the other Jetbrains IDEs?
Added the update diff to Phabricator for review/comment; https://reviews.freebsd.org/D39112
The updated patch worked for me.
Created attachment 240951 [details] intellij-2022.3.3-20230318.diff Updated diff to disable IDE auto updates and indicate they are managed via FreeBSD Ports.
The latest patch also built and ran for me. Thanks James.