8000 [BUG] HALT: CONTRACT VIOLATION on Windows · Issue #145 · vector-of-bool/bpt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

[BUG] HALT: CONTRACT VIOLATION on Windows #145

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

Open
oraqlle opened this issue Sep 30, 2022 · 0 comments
Open

[BUG] HALT: CONTRACT VIOLATION on Windows #145

oraqlle opened this issue Sep 30, 2022 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@oraqlle
Copy link
oraqlle commented Sep 30, 2022

Overview

While testing an application I clone it to Windows to ensure it could handled cross platform and bpt failed to compile the code entirely, producing a HALT: CONTRACT VIOLATION error and stating a class invariant had been broken. I then proceeded to test a simpler hello world on Windows and found the same issues.

It appears that bpt is mangling the path strings for files needed to be compiled on Windows.

bpt Output

This is the error message from the simple hello world program (steps below).

[info ] Repository data from https://repo-3.bpt.pizza/ is fresh
[info ] [hello/hello] Check: hello\hello.hpp
[info ] [hello/hello] Compile: hello\hello.cpp
[info ] [hello/hello] Compile: hello.main.cpp
[info ] [hello/hello] Check: hello\hello.hpp                         -     867ms [2/3]
[info ] [hello/hello] Compile: hello\hello.cpp                       -     865ms [1/3]
bpt.exe : 
At line:1 char:1
+ & bpt build -t :c++20:gcc -o build 2>&1 >> err.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
      HALT: CONTRACT VIOLATION
      ===== ==================
      What: A class/library/function invariant was broken.
  Expected: dep_info.output == compile.object_file_path
  Location: File "D:\a\1\s\src\bpt\build\plan\compile_exec.cpp", line 146,
            in [class std::optional<struct bpt::file_deps_info> __cdecl `anonymous-namespace'::handle_compilation(const struct 
`anonymous-namespace'::compile_ticket &,const struct bpt::build_env &,struct `anonymous-namespace'::compile_counter &)]
   Message: Generated mkfile deps output path does not match the object file path that  we gave it to compile into.
      HALT: CONTRACT VIOLATION
      ===== ==================
      What: A class/library/function invariant was broken.

   Context:   Expected: dep_info.output.string() := dep_info.output == compile.object_file_path
  Location: File "D:\a\1\s\src\bpt\build\plan\compile_exec.cpp", line "C:Userstylerdevhellobuildtimestampshellohello.hpp.o"s146
            ,
            in [compile.object_file_path.string() := class std::optional<struct bpt::file_deps_info> __cdecl 
`anonymous-namespace'::handle_compilation(const struct `anonymous-namespace'::compile_ticket &,const struct bpt::build_env &,struct 
`anonymous-namespace'::compile_counter &)]
   Message: "C:\Users\tyler\dev\hello\build\timestamps\hello\hello.hpp.o"sGenerated mkfile deps output path does not match the object 
file path that  we gave it to compile into.


   Context: dep_info.output.string() := "C:Userstylerdevhellobuildobjhellohello.cpp.o"s
            compile.object_file_path.string() := "C:\Users\tyler\dev\hello\build\obj\hello\hello.cpp.o"s

Steps to Reproduce

  1. Installed bpt with PowerShell command from official page
  2. Installed chocolatey
  3. Installed mingw with choco
  4. bpt new hello (default)
  5. Added hello.main.cpp (source below)
  6. bpt build -t :c++20:gcc -o build

System Info

  • Operating System: Windows
  • Compiler: GCC (installed mingw with choco) - v11.2.0
  • bpt Version: 0.1.0-alpha.6

Additional Info

Used the default bpt new setup along with the following application binary.

/// hello.main.cpp
#include <hello/hello.hpp>

#include <iostream>

auto main () -> int
{
    std::cout << "The answer is: " << hello::the_answer() << '\n';
    return 0;
}
@oraqlle oraqlle added the bug Something isn't working label Sep 30, 2022
@vector-of-bool vector-of-bool added this to the On-Deck milestone Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0