Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
run: pip install --pre meson ninja
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: configure
run: meson setup builddir --fatal-meson-warnings -Ddefault_library=static
run: meson setup builddir --fatal-meson-warnings -Ddefault_library=shared
- name: build
run: ninja -C builddir
- name: check
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ liberfa = library(
'xy06.c', 'xys00a.c', 'xys00b.c', 'xys06a.c', 'zp.c', 'zpv.c', 'zr.c',
'erfaversion.c', 'erfadatextra.c',
dependencies: libm,
vs_module_defs: '../windows/erfa.def',
version: soversion,
install: true,
)
Expand Down
256 changes: 256 additions & 0 deletions windows/erfa.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
VERSION 0.1
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this version? Just of the .def file?

As I mentioned, ideally this file is generated automatically. How did you create it? Might that be transferable? (If not, we can do this as follow-up.)

Copy link
Author

Choose a reason for hiding this comment

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

@mhvk

This is just the DLL versioning, a kind of metadata that we can add to the final DLL during the build and it can be displayed using the dumpbin /HEADERS erfa.dll command and has nothing to do with the erfa/sofa versions.

Copy link
Member

Choose a reason for hiding this comment

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

shouldn't it match the soversion then?

Copy link
Author

Choose a reason for hiding this comment

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

@avalentino
If the soversion is defined somewhere, then yes.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is defined in meson.build (and configure.ac, but let's not worry about that...):

erfa/meson.build

Lines 10 to 20 in 1d9738b

# The historic versions use libtool-compatible versioning.
# This uses some gnarly math to define ABI versions, which we replicate here.
# The general formula is:
# libtool: C:R:A
# -soname: (C - A).A.R
libtool_version = [9, 1, 8]
soversion = '@0@.@1@.@2@'.format(
libtool_version[0] - libtool_version[2],
libtool_version[2],
libtool_version[1],
)

I wonder if this file can be generated automatically by meson (maybe with help of a script)...

Copy link
Contributor

@eli-schwartz eli-schwartz Nov 28, 2025

Choose a reason for hiding this comment

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

The question is what are you going to parse and what rules to apply. :) The header file? All symbols that have the word "erfa" in them?

Copy link
Contributor

Choose a reason for hiding this comment

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

@eli-schwartz - in our case I think ls src/*.c basically gives us what we need (strip .c, capitalize first character, and prefix with era). I think that should not be too difficult to do from meson (if just by calling out to some few-line script), but will admit my meson-fu is quite lacking (still too used to make...).

But I was asking mostly since @laheller presumably made this file one way or another, so perhaps he already used some handy one-liner. If not, I'll have a look myself, and push either to this PR or do a follow-up. If it turns out to be less easy than I think, I can always adjust the scripts that do the translation of sofa to erfa, at https://github.com/liberfa/erfa-fetch, to also create this file.

Copy link
Author

Choose a reason for hiding this comment

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

@mhvk
If you ask, how I made the DEF file:
I used the .NET version of the libclang library to parse the erfa.h and erfaextra.h headers to easily get the C function names (+ the whole signature needed for the C# wrapper).

EXPORTS
eraCal2jd
eraEpb
eraEpb2jd
eraEpj
eraEpj2jd
eraJd2cal
eraJdcalf
eraAb
eraApcg
eraApcg13
eraApci
eraApci13
eraApco
eraApco13
eraApcs
eraApcs13
eraAper
eraAper13
eraApio
eraApio13
eraAtcc13
eraAtccq
eraAtci13
eraAtciq
eraAtciqn
eraAtciqz
eraAtco13
eraAtic13
eraAticq
eraAticqn
eraAtio13
eraAtioq
eraAtoc13
eraAtoi13
eraAtoiq
eraLd
eraLdn
eraLdsun
eraPmpx
eraPmsafe
eraPvtob
eraRefco
eraEpv00
eraMoon98
eraPlan94
eraFad03
eraFae03
eraFaf03
eraFaju03
eraFal03
eraFalp03
eraFama03
eraFame03
eraFane03
eraFaom03
eraFapa03
eraFasa03
eraFaur03
eraFave03
eraBi00
eraBp00
eraBp06
eraBpn2xy
eraC2i00a
eraC2i00b
eraC2i06a
eraC2ibpn
eraC2ixy
eraC2ixys
eraC2t00a
eraC2t00b
eraC2t06a
eraC2tcio
eraC2teqx
eraC2tpe
eraC2txy
eraEo06a
eraEors
eraFw2m
eraFw2xy
eraLtp
eraLtpb
eraLtpecl
eraLtpequ
eraNum00a
eraNum00b
eraNum06a
eraNumat
eraNut00a
eraNut00b
eraNut06a
eraNut80
eraNutm80
eraObl06
eraObl80
eraP06e
eraPb06
eraPfw06
eraPmat00
eraPmat06
eraPmat76
eraPn00
eraPn00a
eraPn00b
eraPn06
eraPn06a
eraPnm00a
eraPnm00b
eraPnm06a
eraPnm80
eraPom00
eraPr00
eraPrec76
eraS00
eraS00a
eraS00b
eraS06
eraS06a
eraSp00
eraXy06
eraXys00a
eraXys00b
eraXys06a
eraEe00
eraEe00a
eraEe00b
eraEe06a
eraEect00
eraEqeq94
eraEra00
eraGmst00
eraGmst06
eraGmst82
eraGst00a
eraGst00b
eraGst06
eraGst06a
eraGst94
eraPvstar
eraStarpv
eraFk425
eraFk45z
eraFk524
eraFk52h
eraFk54z
eraFk5hip
eraFk5hz
eraH2fk5
eraHfk5z
eraStarpm
eraEceq06
eraEcm06
eraEqec06
eraLteceq
eraLtecm
eraLteqec
eraG2icrs
eraIcrs2g
eraEform
eraGc2gd
eraGc2gde
eraGd2gc
eraGd2gce
eraD2dtf
eraDat
eraDtdb
eraDtf2d
eraTaitt
eraTaiut1
eraTaiutc
eraTcbtdb
eraTcgtt
eraTdbtcb
eraTdbtt
eraTttai
eraTttcg
eraTttdb
eraTtut1
eraUt1tai
eraUt1tt
eraUt1utc
eraUtctai
eraUtcut1
eraAe2hd
eraHd2ae
eraHd2pa
eraTpors
eraTporv
eraTpsts
eraTpstv
eraTpxes
eraTpxev
eraA2af
eraA2tf
eraAf2a
eraAnp
eraAnpm
eraD2tf
eraTf2a
eraTf2d
eraRx
eraRy
eraRz
eraCp
eraCpv
eraCr
eraP2pv
eraPv2p
eraIr
eraZp
eraZpv
eraZr
eraRxr
eraTr
eraRxp
eraRxpv
eraTrxp
eraTrxpv
eraRm2v
eraRv2m
eraPap
eraPas
eraSepp
eraSeps
eraC2s
eraP2s
eraPv2s
eraS2c
eraS2p
eraS2pv
eraPdp
eraPm
eraPmp
eraPn
eraPpp
eraPpsp
eraPvdpv
eraPvm
eraPvmpv
eraPvppv
eraPvu
eraPvup
eraPvxpv
eraPxp
eraS2xpv
eraSxp
eraSxpv
eraVersion
eraVersionMajor
eraVersionMinor
eraVersionMicro
eraSofaVersion
eraGetLeapSeconds
eraSetLeapSeconds