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

Build on Windows #3

Closed
ocefpaf opened this issue Apr 11, 2016 · 19 comments · Fixed by #78
Closed

Build on Windows #3

ocefpaf opened this issue Apr 11, 2016 · 19 comments · Fixed by #78

Comments

@ocefpaf
Copy link
Member

ocefpaf commented Apr 11, 2016

See Unidata/netcdf-fortran#48 (comment)

@pelson
Copy link
Member

pelson commented Apr 11, 2016

Maybe we can get some help from those in that issue? It would be time well spent for everybody's benefit.

@ocefpaf
Copy link
Member Author

ocefpaf commented Jun 20, 2016

We are now using cmake on Linux and OS X. The issue with Windows is the Fortran compiler. I don't think we have a proper solution for Fortran on Windows yet.

Ping @gillins, @patricksnape, and @mingwandroid for your opinions and comments on the Fortran issue.

@mingwandroid
Copy link

mingwandroid commented Jun 20, 2016

IMHO conda install -c msys2 m2w64-toolchain is the current best solution for Fortran.

@ocefpaf
Copy link
Member Author

ocefpaf commented Jun 20, 2016

IMHO conda install -c msys2 m2w64-toolchain is the current best solution for Fortran.

I will play with that. I believe that having msys2 in conda-forge will be very valuable. How difficult would that be?

@mingwandroid
Copy link

Not really difficult, it's just a question of time, something I've not got a lot of. Originally I was pushing for them to be part of defaults or rather, linked to defaults as a metachannel; actually they are in two places at present, msys2 and r!

The recipes are just unpack / repack scripts. They could be imported without much bother. Because of the rolling nature of MSYS2 there does need to be some centralized control so there's an msys2-conda-epoch package which manages dragging everything up to the correct contemporary versions.

I haven't managed to find time to tidy up my script that talks to pacman (pyalpm and libalpm really) and creates the recipes yet. It needs to be part of conda skeleton IMHO.

@ocefpaf
Copy link
Member Author

ocefpaf commented Jun 20, 2016

Originally I was pushing for them to be part of defaults

👍

Can you point me to your recipes? I might give it a try...

@mingwandroid
Copy link

@MuellerSeb
Copy link
Member

ping.

@MuellerSeb
Copy link
Member

Is there any progress here? It would be really nice having windows support.

@beckermr
Copy link
Member

beckermr commented Jan 20, 2020

looks like not. If you want to try it, please do! Simply fork the repo and make a PR. Lot's of people on this thread can help solve problems as they arise!

@jaimergp
Copy link
Member

jaimergp commented May 17, 2020

I am trying my best on #52 with the msys2 compilers. Apparently it's missing some symbols:

[ 35%] Linking Fortran executable tst_f77_v2.exe
../fortran/libnetcdff.a(nf_v2compat.c.obj):nf_v2compat.c:(.rdata$.refptr.ncerr[.refptr.ncerr]+0x0): undefined reference to `ncerr'
../fortran/libnetcdff.a(nf_v2compat.c.obj):nf_v2compat.c:(.rdata$.refptr.ncopts[.refptr.ncopts]+0x0): undefined reference to `ncopts'
collect2.exe: error: ld returned 1 exit status

This is the same issue observed in this other attempt. As in that case, our CMake does not find netcdf.h. Any ideas?

--

edit: If I enable CFLAGS/LDFLAGS, CMake finds netcdf.h but the ncerr error remains. Note that I can't specify any libraries on CFLAGS or the linker will fail during CMake:

set "LDFLAGS=-L%LIBRARY_PREFIX%/lib -Wl,-rpath,%LIBRARY_PREFIX%/lib"
:: Left out: `-lcurl -lhdf5 -lhdf5_hl -ldf -lmfhdf`
set "CFLAGS=-fPIC -I%LIBRARY_PREFIX%/include"

@MuellerSeb
Copy link
Member

The referenced issue is marked for v1.5.3, and there is already a related pull request. Maybe this will work with the next release that is hopefully coming soon.

@MuellerSeb
Copy link
Member

Maybe the new release helps:
https://github.com/Unidata/netcdf-fortran/releases/tag/v4.5.3

@jaimergp
Copy link
Member

jaimergp commented Jun 3, 2020

Thanks for the heads up! I'll wait until the regro PR is merged before integrating those changes.

@jaimergp
Copy link
Member

jaimergp commented Jun 19, 2020

Unfortunately the same error is still present on v4.5.3 :(

@MuellerSeb
Copy link
Member

MuellerSeb commented Jul 30, 2020

Some new hope:
Unidata/netcdf-fortran#268

@jaimergp
Copy link
Member

It was merged, so now it's a matter of time until v4.5.4!

@jaimergp jaimergp mentioned this issue Mar 9, 2021
5 tasks
@MuellerSeb
Copy link
Member

@jaimergp v4.5.4 is out 🎉

@xylar
Copy link
Contributor

xylar commented Jan 20, 2022

I'm building 4.5.4 without Windows first: #69. Feel free to follow up with a PR to add Windows.

@zklaus zklaus mentioned this issue Jan 25, 2023
5 tasks
@xylar xylar closed this as completed in #78 Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants