yandex / yatool

Yatool is a cross-platform distribution, building, testing, and debugging toolkit focused on monorepositories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot build anything under windows

rus084 opened this issue · comments

I tryed to build simple c++ program under linux and it works
But i cannot do same on windows

  1. i got error "ConfigureError: Could not determine custom compiler version: clang-cl.exe"
  2. I tryed to pass compiler via --cxx-compiler flag, but it doesnt work, i got same error
  3. then i tryed to build under "Developer Command Prompt for VS 2022" and it still doesnt work with same error
  4. i tryed to set USE_CLANG_CL = "no" in ya.conf file, after that i got multiple errors like this:
    Error[-WBadIncl]: in $B/util/charset/util-charset.lib: could not resolve include file: $S/contrib/libs/cxxsupp/libcxxmsvc/include/__utility/forward.h included from here: $S/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h
    Seems there is no files in https://github.com/yandex/yatool/tree/main/contrib/libs/cxxsupp/libcxxmsvc

Hello!
I don't have access to any Windows host currently, so I can't show a guaranteed working example. But it seems to me that you need to add a build option -DOS_SDK=local. This option will tell the build system to use the SDK from your local system.

Hello!
I set -DOS_SDK=local and got same errors:

Error[-WBadIncl]: in $B/contrib/libs/cxxsupp/libcxxmsvc/libs-cxxsupp-libcxxmsvc.lib: could not resolve include file: $S/contrib/libs/cxxsupp/libcxxmsvc/include/__algorithm/in_out_result.h included from here: $S/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h

But when i set compiler via --cxx-compiler flag, i got another error:

Traceback (most recent call last):
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 2614, in <module>
    main()
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 2608, in main
    build.print_build()
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 623, in print_build
    self._print_other_settings(compiler)
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 750, in _print_other_settings
    cuda = Cuda(self)
           ^^^^^^^^^^
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 2353, in __init__
    if self.cuda_host_compiler.value:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 2290, in value
    self._value = self.calculate_value()
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 2295, in calculate_value
    return self.auto if not callable(self.auto) else self.auto()
                                                     ^^^^^^^^^^^
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 2495, in auto_cuda_host_compiler
    return self.cuda_windows_host_compiler()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\rus08\Documents\yatool\build\ymake_conf.py", line 2508, in cuda_windows_host_compiler
    'Y_SDK_Version': self.build.tc.sdk_version,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GnuToolchainOptions' object has no attribute 'sdk_version'

Why its try to use CUDA compiler when i pass clang compiler?

this is my ya,make file:

PROGRAM(test-proj)

SRCS(
    main.cpp
)
END()