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

[WIP] fix windows CI #372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

[WIP] fix windows CI #372

wants to merge 2 commits into from

Conversation

erip
Copy link

@erip erip commented Feb 20, 2022

Per actions/runner-images/issues/2667

There is certainly a more elegant way to do this, but environment variables in GitHub Actions are weird.

@erip erip changed the title fix windows per https://github.com/actions/virtual-environments/issues/2667 fix windows CI Feb 20, 2022
@kpu
Copy link
Owner

kpu commented Feb 21, 2022

Thanks for looking at this! Now Windows CI can't find boost:

CMake Error at C:/Program Files/CMake/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR program_options system
  thread unit_test_framework) (Required is at least version "1.41.0")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.22/Modules/FindBoost.cmake:2375 (find_package_handle_standard_args)
  CMakeLists.txt:85 (find_package)

(The Ubuntu failure was just package management being annoying, I'll fix that.)

@erip
Copy link
Author

erip commented Feb 21, 2022

Hmm, this is the same error as on master. I'll need to dig a bit more to understand this. I may be passing the wrong boost root.

Edit, yes, it seems like the x86_64 bit is required... cf marian's CI script. That is probably a good reference to make this PR less fragile.

@erip erip force-pushed the hotfix/fix-windows-ci branch 2 times, most recently from c7c8b70 to 90f7ae5 Compare February 21, 2022 12:15
@erip
Copy link
Author

erip commented Feb 21, 2022

Fixing the path is a good start, but it seems like the linker is failing to load optimized.lib on Windows. I'm not sure what this is -- some intermediate build artifact in release mode? Some poking around suggests this can happen when a list isn't expanded appropriately in cmake (say, by strifigying lists) which can break the search path. However, removing quotes here breaks everything in all platforms 🙀

Locally on my Mac:

CMake Error at util/CMakeLists.txt:38 (add_library):
  Target "kenlm_util" links to target
  "$<BUILD_INTERFACE:Boost::program_options" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?


CMake Error at util/CMakeLists.txt:38 (add_library):
  Target "kenlm_util" links to target "Boost::unit_test_framework>" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?

@kpu
Copy link
Owner

kpu commented Feb 21, 2022

I'm not sure what's up with the mac

# We need boost
find_package(Boost 1.41.0 REQUIRED COMPONENTS
  program_options
  system
  thread
  unit_test_framework
)

Do you want me to merge this on the basis that windows at least goes further before failing?

@erip erip changed the title fix windows CI [WIP] fix windows CI Feb 21, 2022
@erip
Copy link
Author

erip commented Feb 21, 2022

No, I'd like this to be merged once CI is green. I've marked it a WIP in case it wasn't obvious that this is a WIP. I'll spend more time trying to figure this out.

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

Successfully merging this pull request may close these issues.

2 participants