Skip to content

fix: fix to enable wcslib 8 support in apple and upgrade gradle#27

Merged
pdowler merged 4 commits into
opencadc:mainfrom
at88mph:wcslib-8-support
Apr 24, 2026
Merged

fix: fix to enable wcslib 8 support in apple and upgrade gradle#27
pdowler merged 4 commits into
opencadc:mainfrom
at88mph:wcslib-8-support

Conversation

@at88mph

@at88mph at88mph commented Apr 23, 2026

Copy link
Copy Markdown
Member

Changes

  • Gradle: Wrapper updated from 6.8.3 to 8.14.3 (cadc-wcs/gradle/wrapper/gradle-wrapper.properties).
  • Java: sourceCompatibility / targetCompatibility set to 11 in cadc-wcs/build.gradle and cadc-wcs/build-jni.gradle.
  • Versions: Library versions bumped to 2.3.0 (main + JNI subproject); cadc-wcs/build.gradle cadc-util range updated to [1.12.5,2.0.0).
  • macOS / WCSlib 8:
    • Resolve libwcs.dylib from /opt/homebrew/lib if /usr/local/lib is missing.
    • Add C include paths /opt/homebrew/include and /usr/local/include for macOS builds.
    • Add resource binary cadc-wcs/src/main/resources/libwcsLibJNI.8.dylib (wcslib 8 JNI).
  • Gradle API / plugins: Remove legacy maven (and application) from JNI build; use maven-publish only; modernize generateJniHeaders (tasks.register, destinationDirectory, absolute paths for -h/-d); classes.dependsOn('generateJniHeaders').
  • Publishing: opencadc.gradle — maven-publish publication from components.java, and an install task that depends on publishToMavenLocal.

@pdowler

pdowler commented Apr 23, 2026

Copy link
Copy Markdown
Member

If you could also spruce up cadc-erfa to support apple, that would be useful (actually, it is failing CI)

Is the gradle wrapper update sufficiently useful? We're nominally supporting gradle 6-8 so updating the wrapper means we'll soon lose 6-7 support, which migth hurt some contributors -- this is a more general question, but this build does have it's extra complexity so might be justified here but not everywhere

@at88mph

at88mph commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

I just noticed that the CI is failing, yes. I'll get on that now.

The motivation to update the wrapper is to support the de-facto JDK 21 LTS. We can still support JDK 11 with this configuration, so I was thinking that the impact would be minimal. I don't see shedding JDK 1.8 support as having an impact, but maybe you know more about who relies on that still?

@pdowler

pdowler commented Apr 23, 2026

Copy link
Copy Markdown
Member

minimum java 11 is our current goal and my reading of the landscape is that JDK11 (temurin) will be around and supported for many years. Having said that, it is also true that we've seen zero issues (afaik) running java 21 for quite a while now, so I don't think there's much of a barrier for contributors.

Let's go ahead with java 21 and gradlew 8 here in wcs.git and decide soon if we can/should do that across the board.

personally, I do use temurin-17-jdk to run my IDE because I didn't want the hassle of upgrading to the one that works well with 21 (just lots of annoying UI changes)

@at88mph

at88mph commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

ERFA needs to be built from source, and the latest is 2.0.1 which is what is now built into that cadc-erfa/src/main/resources for the JNI linked Apple library only. The .so file in there is still linked to liberfa.so.1 on whatever system it's running on.

@pdowler

pdowler commented Apr 23, 2026

Copy link
Copy Markdown
Member

The current base docker images are fedora 42 which has erfa-2.0.1 and that provides /lib64/liberfa.so.1 (don't know why it's like that). Jeff built the apple lib so maybe that one needs a rebuild? I know the linux one works because it is used in caom2 code

Unlike cadc-wcs, that lib hasn't changed since forever so we've never done a version upgrade or had to support multiple versions... so maybe we don't need to do anything other than fix whatever was broken in the CI (which does not include building JNI binding libs)

@at88mph

at88mph commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

Good! That's done, then.

Comment thread cadc-wcs/build.gradle Outdated
}
group = 'org.opencadc'
version = '2.2.0'
version = '2.3.0'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this can be 2.2.1 since we are only adding apple support, not a new wcslib major version

Comment thread cadc-wcs/build-jni.gradle Outdated
Comment thread cadc-erfa/build-jni.gradle Outdated
@at88mph

at88mph commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

Thanks, done. I'm not sure why the build-jni.gradle has a version either.

@pdowler pdowler merged commit e3eb067 into opencadc:main Apr 24, 2026
1 check passed
@at88mph at88mph deleted the wcslib-8-support branch May 15, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants