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

Help with Heisenberg installation #9

Open
IntuitionQuant opened this issue Apr 25, 2023 · 6 comments
Open

Help with Heisenberg installation #9

IntuitionQuant opened this issue Apr 25, 2023 · 6 comments
Assignees

Comments

@IntuitionQuant
Copy link

IntuitionQuant commented Apr 25, 2023

Hi profitviews,

I appreciate that you share the algo-trading platform written in C++. I have been trying to install it on my PC with Windows 11, but cannot do it.

  1. Your steps involved with conan is written for conan version 1.x. I am not sure how to revise it in the current conan version 2.x. I installed the older version. It seems to have solved the problem.
  2. Step 15. conan install ../ --build missing --profile windows-msvc does not work. Several components are not building. I attached the picture shown in my PowerShell.

Screenshot 2023-04-25 181028

Screenshot 2023-04-25 181126

Any clue or help is deeply appreciated.

@Twon Twon self-assigned this Apr 29, 2023
@Twon
Copy link
Collaborator

Twon commented Apr 29, 2023

You should be using Conan 1.59 for now. The Conan 2 migration is ongoing but not yet complete as far as I know. This means many packages have not yet been migrated across to Conan 2, and until the migration is complete support is experimental.

As for the build errors, b2 is the boost build system, so Conan is failing while trying to build Boost 1.78 but the image you've attached does not contain the actual error, but is just a downstream exception caused by an earlier error in the build process. Can you attach the whole build log (i.e pipe the output of Conan to a text file, for example on my system I execute "conan install ../ --profile=C:\Users\antpe.conan\profiles\vs17-x64-debug --build=missing 2>&1 > build.log" to capture the log) and add it to this issue to I can see the actual cause of the error.

However, I've advice trying to update the version of boost to 1.81 by bumping the version in the conan.txt file at the root of the repository.

@IntuitionQuant
Copy link
Author

IntuitionQuant commented Apr 30, 2023

Thanks for your reply. Here is the log file. I have Boost_1.81.0 but the build is still using boost/1.78.0.

Please let me know how I can proceed. Thanks again.
build.log

@Twon
Copy link
Collaborator

Twon commented Apr 30, 2023

Thanks, I see the problem now. Your Conan profile file is missing the C++ language version setting. You can see this at the top of the log file:

Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=Visual Studio
compiler.runtime=MDd
compiler.version=17
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

Without it then it will default to C++03 which is not recent enough to build the Boost libraries which required C++11 support. You can see this in the Boost output when it's trying to detect C++ features. Without the required features then it fails to build targets that require them. Note this project uses C++20, so this would always have failed eventually. You need to add this setting file (usually in ~/.conan/profiles/default unless you've created a profile of a different name)

compiler.cppstd=20

With this, your profile should look as:

Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=Visual Studio
compiler.runtime=MDd
compiler.version=17
compiler.cppstd=20
os=Windows
os_build=Windows
[options]
[build_requires]
[env]

Try this and let me know how you get on.

@IntuitionQuant
Copy link
Author

Thanks for your reply. I added the C++ version to both the default and the windows-msvc profiles (as in the build instructions). It still does not work. I attached the build log file here (build2.log).
build2.log

@Twon
Copy link
Collaborator

Twon commented May 1, 2023

Ok, so I've compared this to my machine where this works: build.log

There is a number of suspicious things in your log, but without knowing your exact set up its hard to debug the cause:

  • Even though you've defined compiler.cppstd=20 you build fails to build any C++11 component:
    - cxx11_auto_declarations  : no [2]
    - cxx11_constexpr          : no [2]
    - cxx11_defaulted_functions : no [2]
    - cxx11_final              : no [2]
    - cxx11_hdr_mutex          : no [2]
    - cxx11_hdr_tuple          : no [2]
    - cxx11_lambdas            : no [2]
    - cxx11_noexcept           : no [2]
    - cxx11_nullptr            : no [2]
    - cxx11_rvalue_references  : no [2]
    - cxx11_template_aliases   : no [2]
    - cxx11_thread_local       : no [2]
    - cxx11_variadic_templates : no [2]
    - cxx11_auto_declarations  : no [3]
    - cxx11_constexpr          : no [3]
    - cxx11_defaulted_functions : no [3]
    - cxx11_final              : no [3]
    - cxx11_hdr_mutex          : no [3]
    - cxx11_hdr_tuple          : no [3]
    - cxx11_lambdas            : no [3]
    - cxx11_noexcept           : no [3]
    - cxx11_nullptr            : no [3]
    - cxx11_rvalue_references  : no [3]
    - cxx11_template_aliases   : no [3]
    - cxx11_thread_local       : no [3]
    - cxx11_variadic_templates : no [3]
warning: Boost.Json was explicitly requested, but will not be built, because it requires C++11.
note: To enable C++11 support, use the 'cxxstd=11' command line argument.
    - cxx11_unified_initialization_syntax : no [2]
    - cxx11_hdr_initializer_list : no [2]
    - cxx11_hdr_chrono         : no [2]
    - cxx11_numeric_limits     : no [2]
    - cxx11_hdr_array          : no [2]
    - cxx11_hdr_atomic         : no [2]
    - cxx11_hdr_type_traits    : no [2]
    - cxx11_allocator          : no [2]
    - cxx11_explicit_conversion_operators : no [2]
    - gcc visibility           : no [3]
    - sfinae_expr              : no [3]
    - cxx11_unified_initialization_syntax : no [3]
    - cxx11_hdr_initializer_list : no [3]
    - cxx11_hdr_chrono         : no [3]
    - cxx11_numeric_limits     : no [3]
    - cxx11_hdr_array          : no [3]
    - cxx11_hdr_atomic         : no [3]
    - cxx11_hdr_type_traits    : no [3]
    - cxx11_allocator          : no [3]
    - cxx11_explicit_conversion_operators : no [3]
    - cxx11_static_assert      : no [2]
  • You appear to be building with MSVC 14,3 wich came out around 2015 and will never support C++20
notice: will use 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64\cl.exe' for msvc, condition <toolset>msvc-14.3
  • Your Conan dependencies appear to pull in nasm and strawberryperl, no idea why but your system configuration differs from those we tested on.
    nasm/2.15.05 from 'conancenter' - Cache
    strawberryperl/5.32.1.1 from 'conancenter' - Cache

At this point perhaps you could share some information about your system setup as it appears to deviate from anything we have seen from users before. What tools do you have installed? Do you have the latest MSVC for C++20 support? Any info here is going to increase the chances we can solve this.

Cheers!

@IntuitionQuant
Copy link
Author

Thanks. I am using VS 2022 community. VS code is my Python IDE.

I am very interested in applying C++ to back-testing and portfolio optimization. I found that the resources for quant investment with C++ is really scarce compared with Python. I appreciate if you could share a crash course/self-learning recourse.

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

No branches or pull requests

2 participants