-
-
Notifications
You must be signed in to change notification settings - Fork 18
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 support via msys2 #18
Changes from all commits
92c891b
aea3b32
f175c5f
120e6e8
579a963
6ad1532
457925e
6f60045
d878f8a
0066642
ce12268
ab28343
4b24bb3
dc1b3cd
a3d4330
26187e3
430d481
422c20b
5ad6403
a43b03b
23f20da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This file was automatically generated by conda-smithy. To update a component of this | ||
# file, make changes to conda-forge.yml and/or recipe/meta.yaml, and run | ||
# "conda smithy rerender". | ||
|
||
environment: | ||
|
||
BINSTAR_TOKEN: | ||
# The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. | ||
secure: ipv/06DzgA7pzz2CIAtbPxZSsphDtF+JFyoWRnXkn3O8j7oRe3rzqj3LOoq2DZp4 | ||
|
||
matrix: | ||
- CONFIG: win_c_compilervs2008cxx_compilervs2008 | ||
CONDA_INSTALL_LOCN: C:\Miniconda36-x64 | ||
|
||
- CONFIG: win_c_compilervs2015cxx_compilervs2015 | ||
CONDA_INSTALL_LOCN: C:\Miniconda36-x64 | ||
|
||
|
||
# We always use a 64-bit machine, but can build x86 distributions | ||
# with the TARGET_ARCH variable. | ||
platform: | ||
- x64 | ||
|
||
install: | ||
# If there is a newer build queued for the same PR, cancel this one. | ||
- cmd: | | ||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/master/recipe/ff_ci_pr_build.py', 'ff_ci_pr_build.py')" | ||
ff_ci_pr_build -v --ci "appveyor" "%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%" "%APPVEYOR_BUILD_NUMBER%" "%APPVEYOR_PULL_REQUEST_NUMBER%" | ||
del ff_ci_pr_build.py | ||
|
||
# Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) | ||
- cmd: rmdir C:\cygwin /s /q | ||
|
||
# Add path, activate `conda` and update conda. | ||
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat | ||
- cmd: conda.exe update --yes --quiet conda | ||
|
||
- cmd: set PYTHONUNBUFFERED=1 | ||
|
||
# Add our channels. | ||
- cmd: conda.exe config --set show_channel_urls true | ||
- cmd: conda.exe config --remove channels defaults | ||
- cmd: conda.exe config --add channels defaults | ||
- cmd: conda.exe config --add channels conda-forge | ||
|
||
# Configure the VM. | ||
- cmd: conda.exe install -n root --quiet --yes conda-forge-ci-setup=1 | ||
- cmd: run_conda_forge_build_setup | ||
|
||
# Skip .NET project specific build phase. | ||
build: off | ||
|
||
test_script: | ||
- conda.exe build recipe -m .ci_support\%CONFIG%.yaml --quiet | ||
deploy_script: | ||
- cmd: upload_or_check_non_existence .\recipe conda-forge --channel=main -m .ci_support\%CONFIG%.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
c_compiler: | ||
- vs2008 | ||
cxx_compiler: | ||
- vs2008 | ||
fortran_compiler: | ||
- flang | ||
zip_keys: | ||
- - c_compiler | ||
- cxx_compiler |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
c_compiler: | ||
- vs2015 | ||
cxx_compiler: | ||
- vs2015 | ||
fortran_compiler: | ||
- flang | ||
zip_keys: | ||
- - c_compiler | ||
- cxx_compiler |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
mkdir build | ||
cd build | ||
|
||
rem rm /mingw-w64/bin/make.exe | ||
bash -c "CXXDEFS=-DCOIN_USE_MUMPS_MPI_H ADD_CXXFLAGS='-I/mingw-w64/include -L/mingw-w64/lib -L/mingw-w64/bin' ../configure --build=x86_64-w64-mingw32 --disable-linear-solver-loader --with-blas-lib='-lopenblas' --with-mumps-lib='-ldmumps -lmumps_common -lpord -lgfortran' --enable-dependency-linking --prefix=/mingw-w64" | ||
rem cp /mingw-w64/bin/mingw32-make.exe /mingw-w64/bin/make.exe | ||
make clean | ||
make test | ||
cd src\Interfaces | ||
make libipopt.dll | ||
cd ..\.. | ||
rem rm /mingw-w64/bin/make.exe | ||
|
||
make install | ||
bash -c "/usr/bin/install -m 644 src/Interfaces/libipopt.dll /mingw-w64/bin" | ||
|
||
|
||
if errorlevel 1 exit 1 | ||
|
||
:: Add more build steps here, if they are necessary. | ||
|
||
:: See | ||
:: http://docs.continuum.io/conda/build.html | ||
:: for a list of environment variables that are set during the build process. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/src/Interfaces/Makefile.in b/src/Interfaces/Makefile.in | ||
index 1c6d8a0..b79f8d0 100644 | ||
--- a/src/Interfaces/Makefile.in | ||
+++ b/src/Interfaces/Makefile.in | ||
@@ -479,6 +479,10 @@ clean-libLTLIBRARIES: | ||
libipopt.la: $(libipopt_la_OBJECTS) $(libipopt_la_DEPENDENCIES) | ||
$(CXXLINK) -rpath $(libdir) $(libipopt_la_LDFLAGS) $(libipopt_la_OBJECTS) $(libipopt_la_LIBADD) $(LIBS) | ||
|
||
+libipopt.dll: $(libipopt_la_OBJECTS) $(libipopt_la_DEPENDENCIES) | ||
+ $(CXXLINK) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -static-libgcc -static-libstdc++ -shared -o $@ \ | ||
+-Wl,-rpath,$(libdir) $(libipopt_la_LDFLAGS) $(libipopt_la_OBJECTS) -static -lipopt -ldmumps -lmumps_common -lopenblas -lgfortran | ||
+ | ||
mostlyclean-compile: | ||
-rm -f *.$(OBJEXT) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,49 +6,56 @@ | |
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
fn: {{ name }}-{{ version }}.tar.gz | ||
url: http://www.coin-or.org/download/pkgsource/{{ name }}/{{ name }}-{{ version }}.tgz | ||
sha256: {{ sha256 }} | ||
patches: | ||
- ipopt.patch | ||
|
||
- ipopt.patch # [not win] | ||
- dll_makefile.patch # [win] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. configure with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure that I have a Windows-compatible There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You do. I wrote the patches upstream that enabled it, 5ish years ago. |
||
build: | ||
number: 0 | ||
skip: True # [win] | ||
number: 0 | ||
number: 2 | ||
features: | ||
- blas_{{ variant }} | ||
- blas_{{ variant }} # [not win] | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('fortran') }} | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
host: | ||
- ampl-mp | ||
- ampl-mp # [not win] | ||
- mumps | ||
- metis | ||
- scotch | ||
- blas 1.1 {{ variant }} | ||
- openblas | ||
- metis 5.1.* # [not win] | ||
- scotch # [not win] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's no direct dependency on scotch on unix either |
||
- gcc # [osx] | ||
- blas 1.1 {{ variant }} # [not win] | ||
- openblas 0.2.20|0.2.20.* # [not win] | ||
- m2w64-openblas # [win] | ||
- posix # [win] | ||
- patch # [win] | ||
|
||
run: | ||
- ampl-mp | ||
- ampl-mp # [not win] | ||
- mumps | ||
- metis | ||
- scotch | ||
- blas 1.1 {{ variant }} | ||
- openblas | ||
- metis 5.1.* # [not win] | ||
- scotch # [not win] | ||
- libgfortran # [not win] | ||
- blas 1.1 {{ variant }} # [not win] | ||
- openblas 0.2.20|0.2.20.* # [not win] | ||
- m2w64-openblas # [win] | ||
|
||
test: | ||
files: | ||
- test | ||
- cpp_example.cpp | ||
- cpp_example.hpp | ||
- MyNLP.cpp | ||
- MyNLP.hpp | ||
- mytoy.nl | ||
|
||
requires: | ||
- toolchain | ||
- toolchain # [not win] | ||
- m2w64-toolchain # [win] | ||
- posix # [win] | ||
|
||
about: | ||
home: https://projects.coin-or.org/Ipopt/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
g++ -I%LIBRARY_PREFIX%/mingw-w64/include/coin -c -o cpp_example.o cpp_example.cpp | ||
g++ -I%LIBRARY_PREFIX%/mingw-w64/include/coin -c -o MyNLP.o MyNLP.cpp | ||
g++ -L%LIBRARY_PREFIX%/mingw-w64/bin -L%LIBRARY_PREFIX%/mingw-w64/lib -lipopt -lstdc++ -I%LIBRARY_PREFIX%/mingw-w64/include/coin -o cpp_example.exe cpp_example.o MyNLP.o | ||
|
||
cpp_example.exe | grep -q "Optimal Solution" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disabling the linear solver loader is a bad idea - that's important functionality if you care at all about performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take another look. I was getting unrelenting segmentation faults trying to get the linear solver loader to work, but I'm fully willing to admit the possibility of user error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be picky about finding the runtime libraries IIRC, and how the solver you're trying to load was built. I've forgotten what the status is of HSL providing Windows binaries to academic users. Dynamically loading the MKL version of Pardiso may also be flaky