Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows release binaries #32

Open
kbarbary opened this issue Feb 5, 2016 · 8 comments
Open

Windows release binaries #32

kbarbary opened this issue Feb 5, 2016 · 8 comments

Comments

@kbarbary
Copy link

kbarbary commented Feb 5, 2016

Is there any hope of building and distributing Windows shared library binaries along with the source tarballs for each release? This would make it easier to support Windows in ERFA.jl. Ref: JuliaAstro/ERFA.jl#17

@timj
Copy link
Contributor

timj commented Feb 5, 2016

The C code in ERFA is extremely standards-compliant and should be trivial to build on Windows. It should not need a Unix environment. Someone who knows about windows and has a Microsoft compiler should find it very easy to do. It's more a case of finding a volunteer.

@kbarbary
Copy link
Author

kbarbary commented Feb 5, 2016

You're right. I was able to cross-compile using

i686-w64-mingw32-gcc -Isrc -o liberfa.dll -O3 -shared -static-libgcc src/*.c  # 32-bit
x86_64-w64-mingw32-gcc -Isrc -o liberfa.dll -O3 -shared -static-libgcc src/*.c  # 64-bit

Posted the binaries here for the time being: https://bintray.com/kbarbary/generic/erfa/1.2.0/view/files#files/

It might be nice to make this part of the release process. My autotools skills are not currently up to the task.

@mhvk
Copy link
Contributor

mhvk commented Aug 12, 2020

Am going through old issues to see if they are still relevant. Is this one still an issue given that we have pyerfa which (I think??) would come with the binary if one pip-installs it?

@laheller
Copy link

laheller commented Jan 17, 2023

Hi @timj @kbarbary @mhvk @mdboom @phn

I was able to build successfully ERFA and tests using only Visual Studio 2022. Did not use any cygwin, mingw or similar environments. Of course I had to slightly modify two header (erfa.h, erfaextra.h) and one source (erfaversion.c) file to build successfully everything.

I have two questions:

  1. Are you interested in adding Visual Studio build and native Windows OS support to this repo? When yes, maybe you can create a new branch here and I can submit a PR to it.
  2. If I am correct, the Linux build takes ERFA version and SOFA version strings from configure.ac file and provides them as variables in the config.h file. Is that correct? On my current Windows build I created this config.h manually, because there is no autotools directly on Windows.

BR,

Ladislav

@mhvk
Copy link
Contributor

mhvk commented Jan 17, 2023

@laheller - I thought we had changed/enabled CMake so that things would work under windows too, but I now see the relevant PR, #75, got stalled. Maybe you can have a look whether that would work for you? If so, all the more reason to actually merge this...

@laheller
Copy link

@mhvk
I would try it but the PR author's repo/branch does not exist anymore...

@mhvk
Copy link
Contributor

mhvk commented Jan 18, 2023

Hmm, hadn't realized that! You can still pull the PR with

git fetch upstream pull/75/head:pr-75
git checkout pr-75

(where upstream points to the liberfa/erfa repository)

(Not sure it won't need a rebase, though...)

@laheller
Copy link

@mhvk

OK, thanks for hint. Using this PR I was able to create a new Visual Studio solution and build library + tests. Everything works.

One note, that it only creates a static library (.lib file) but skips shared library (.dll file) creation. When I manually set the created project properties to produce shared library, it however creates but the result .dll file has no export symbols. This is due to missing __declspec(dllexport) keyword in header files at the function signatures.

Otherwise no issues.

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

No branches or pull requests

4 participants