SoftwareNetwork / sw

Software Manager. Build System, Build System Generator and Package Manager. C/C++ and other languages. Tools and libraries for Software Management.
https://software-network.org
Other
113 stars 24 forks source link

Build failure in primitives.command-0.3.1 #109

Closed pschlan closed 1 year ago

pschlan commented 1 year ago

Describe the bug Build fails when building primitives.command-0.3.1 with VS2019.

C:\Users\Patrick\workspace\sw>sw build org.sw.demo.google.tesseract.tesseract-master
[135/140] [pub.egorpugin.primitives.command-0.3.1]/src/command.cpp
[137/140] C:/Users/Patrick/.sw/storage/pkg/a0/ef/79bd/src/sdir/src/sw/driver/misc/delay_load_helper.cpp
[138/140] C:/Users/Patrick/.sw/storage/pkg/b4/5b/9b5b/src/sdir/sw.cpp
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:840, function execute1: When executing: [pub.egorpugin.primitives.command-0.3.1]/src/command.cpp
C:/Users/Patrick/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(142): error C2039: "contains" ist kein Member von "std::basic_string<char,std::char_traits<char>,std::allocator<char>>".
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xstring(4871): note: Siehe Deklaration von "std::basic_string<char,std::char_traits<char>,std::allocator<char>>"
C:/Users/Patrick/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): note: Siehe Verweis auf die gerade kompilierte Instanziierung "auto primitives::Command::setProgram::<lambda_1>::()::<lambda_1>::operator ()<const char(&)[6]>(_T1) const" der Funktions-Vorlage.
        with
        [
            _T1=const char (&)[6]
        ]
C:/Users/Patrick/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): error C3487: "bool": Alle R�ckgabeausdr�cke m�ssen in denselben Typ hergeleitet werden: Zuvor war es "void".
C:/Users/Patrick/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(144): error C3487: "bool": Alle R�ckgabeausdr�cke m�ssen in denselben Typ hergeleitet werden: Zuvor war es "void".
C:/Users/Patrick/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(144): error C2562: "primitives::Command::setProgram::<lambda_1>::()::<lambda_1>::operator ()": "void"-Funktion gibt einen Wert zur�ck
C:/Users/Patrick/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): note: Siehe Deklaration von "primitives::Command::setProgram::<lambda_1>::()::<lambda_1>::operator ()"
C:/Users/Patrick/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): error C2296: "||": Ung�ltig, da der linke Operand vom Typ "void" ist
C:/Users/Patrick/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): error C2297: "||": Ung�ltig, da der rechte Operand vom Typ "void" ist
command failed: exit code = 2
Total errors: 1

C:\Users\Patrick\workspace\sw>

Expected behavior Build should not fail

To Reproduce Steps to reproduce the behavior:

  1. Run sw build org.sw.demo.google.tesseract.tesseract-master

Information:

egorpugin commented 1 year ago

Hi,

Try VS2022.

pschlan commented 1 year ago

Will do.

Maybe https://github.com/SoftwareNetwork/sw/tree/b0.4.5/doc should be updated, it mentions 2017 or 2019 are supported.

pschlan commented 1 year ago

With VS 2022 it fails in another way:

[1164/1470] [org.sw.demo.gnu.nettle.nettle-3.8.0]/ecc-mul-g-eh.c
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:840, function execute1: When executing: [org.sw.demo.google.tesseract.libtesseract-master]/src/textord/devanagari_processing.cpp
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(130): error C2027: Verwendung des undefinierten Typs "Pixa"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\include\tesseract/baseapi.h(39): note: Siehe Deklaration von "Pixa"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(141): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(142): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(142): error C2660: "tesseract::ShiroRekhaSplitter::SplitWordShiroRekha": Funktion akzeptiert keine 4 Argumente
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(176): note: Siehe Deklaration von "tesseract::ShiroRekhaSplitter::SplitWordShiroRekha"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(142): note: bei Anpassung der Argumentliste "(tesseract::ShiroRekhaSplitter::SplitStrategy, tesseract::Image, int, Boxa *)"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(144): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(175): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(176): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(272): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(273): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(394): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
C:/Users/Patrick/.sw/storage/pkg/1d/13/e4d8/src/sdir/src/textord/devanagari_processing.cpp(395): error C2027: Verwendung des undefinierten Typs "Box"
C:\Users\Patrick\.sw\storage\pkg\1d\13\e4d8\src\sdir\src\textord\devanagari_processing.h(21): note: Siehe Deklaration von "Box"
command failed: exit code = 2
Total errors: 1

C:\Users\Patrick\workspace\sw>

Edit: However, a release version of tesseract works. So might be an issue on tesseract side.

egorpugin commented 1 year ago

Updated docs. thank you. Do not use tess master. Use release version.

pschlan commented 1 year ago

Thanks!