-
-
Notifications
You must be signed in to change notification settings - Fork 16
Windows shared builds #25
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
Changes from 8 commits
ca05db8
5fd94d5
e6f11f9
0ace809
cb48ebf
eed7a97
23f8279
87b4dc6
dc32fd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,17 @@ | ||
| @echo on | ||
|
|
||
| mkdir build | ||
| cd build | ||
| cmake -GNinja ^ | ||
| -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ | ||
| -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ | ||
| -DCMAKE_BUILD_TYPE=Release ^ | ||
| .. | ||
| -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ | ||
| -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ | ||
| -DCMAKE_BUILD_TYPE=Release ^ | ||
| -DBUILD_SHARED_LIBS=ON ^ | ||
| .. | ||
| if %ERRORLEVEL% neq 0 exit 1 | ||
|
|
||
| cmake --build . | ||
| if %ERRORLEVEL% neq 0 exit 1 | ||
|
|
||
| cmake --build . --target install | ||
| if %ERRORLEVEL% neq 0 exit 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ source: | |
| - remove-4221.patch # [win] | ||
|
|
||
| build: | ||
| number: 0 | ||
| number: 1 | ||
| run_exports: | ||
| - {{ pin_subpackage("abseil-cpp", max_pin="x.x") }} | ||
|
|
||
|
|
@@ -26,10 +26,32 @@ requirements: | |
| - cmake | ||
| - ninja | ||
|
|
||
| {% set absl_libs = [ | ||
| "base", "civil_time", "cord", "cordz_functions", "cordz_handle", "cordz_info", | ||
| "cordz_sample_token", "examine_stack", "exponential_biased", "failure_signal_handler", | ||
| "flags", "flags_commandlineflag", "flags_config", "flags_marshalling", "flags_parse", | ||
| "flags_private_handle_accessor", "flags_program_name", "flags_reflection", "flags_usage", | ||
| "hash", "hashtablez_sampler", "int128", "log_severity", "low_level_hash", "periodic_sampler", | ||
| "random_distributions", "random_seed_gen_exception", "random_seed_sequences", "raw_hash_set", | ||
| "scoped_set_env", "spinlock_wait", "stacktrace", "status", "statusor", "strerror", "strings", | ||
| "symbolize", "synchronization", "time", "time_zone" | ||
| ] %} | ||
| test: | ||
| commands: | ||
| - test -f $PREFIX/lib/libabsl_base${SHLIB_EXT} # [not win] | ||
| - if not exist %LIBRARY_LIB%\\absl_base.lib exit 1 # [win] | ||
| # windows | ||
| - if not exist %LIBRARY_LIB%\\abseil_dll.lib exit 1 # [win] | ||
| - if not exist %LIBRARY_BIN%\\abseil_dll.dll exit 1 # [win] | ||
|
|
||
| # absl_libs | ||
| {% for each_lib in absl_libs %} | ||
| # presence of shared libs | ||
| - test -f $PREFIX/lib/libabsl_{{ each_lib }}${SHLIB_EXT} # [unix] | ||
| - if not exist %LIBRARY_LIB%\\absl_{{ each_lib }}.lib exit 1 # [win] | ||
| # absence of static libs | ||
| - test ! -f $PREFIX/lib/libabsl_{{ each_lib }}.a # [unix] | ||
| # TODO: do we want to get rid of the static windows libs? | ||
| # - if exist %LIBRARY_LIB%\\absl_{{ each_lib }}.lib exit 1 # [win] | ||
|
Member
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. On Windows, you will always have
Member
Author
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 had to learn already that
Member
Author
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. It seems there's only one DLL (plus its import lib) being created on windows with
Contributor
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. It's been some time since I last looked at the abseil build system, but my recollection was that on Windows only static builds were supported. Has this changed in the last year or so?
Member
Author
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. Seems so.
Contributor
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 am probably being paranoid, and I understand that this would be additional work for you, but would it be possible to have a small tests that checks (on Windows) that the DLL actually works (i.e., compile and run a small executable which calls functions that have been compiled in the DLL)? I am asking because I am a bit scared by some of the statements in the abseil docs regarding dynamics libraries: https://abseil.io/about/compatibility But in any case, thanks a lot for working on this! Dynamic libraries are definitely the way to go for a distribution like conda, it would be great to have this PR merged.
Member
Author
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. Yeah, AFAICT those warnings are for systems that cannot track ABI as comprehensively as conda(-forge) can. I have an open PR that directly inspired this need. Not sure if a 5-line How does that sound?
Contributor
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 would be personally more in favour of pulling the trigger and merge this PR directly, and perhaps roll it back later in case it turns out it breaks existing packages. But certainly @xhochy has a better feeling than I do about whether this course of action is appropriate for conda-forge as a whole, so I'll leave the decision to him. |
||
| {% endfor %} | ||
|
|
||
| about: | ||
| home: https://github.com/abseil/abseil-cpp | ||
|
|
||
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.
The bot will probably choke on this, I've seen several feedstock stop autoupdate because they had such a pattern. Could you put this into a test script?
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.
Hm, I'd almost be tempted to rather fix the bot. I like this idiom for testing, keeps things nicely visible in
meta.yaml.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.
So it's mostly about the version updates? I've looked here (and other places in that repo), and it sounds like it'd just need some extra handling for
{% ... %}cases.