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

Weird exception #8

Closed
EugW opened this issue Aug 10, 2019 · 14 comments
Closed

Weird exception #8

EugW opened this issue Aug 10, 2019 · 14 comments

Comments

@EugW
Copy link

EugW commented Aug 10, 2019

How to fix? I want to build tesseract dll
Exception in file D:\dev\cppan2\client2\src\sw\core\sw_context.cpp:69, function setHostPrograms: TODO: unimplemented

@egorpugin
Copy link
Contributor

egorpugin commented Aug 10, 2019

  1. How do you invoke sw?
  2. Do you have VS installed?
  3. What is VS version?
  4. Run sw --trace ... rest of your args and send output.

@EugW
Copy link
Author

EugW commented Aug 10, 2019

  1. sw build org.sw.demo.google.tesseract.tesseract-master
  2. No

@egorpugin
Copy link
Contributor

egorpugin commented Aug 10, 2019

Oh, you have to install VS. The latest is better (VS2019).

@EugW
Copy link
Author

EugW commented Aug 10, 2019

Ok, thanks

@EugW
Copy link
Author

EugW commented Aug 10, 2019

What is wrong now?
[82/83] "[org.sw.demo.google.tesseract.tesseract-master]/[config]"
Exception in file D:\dev\cppan2\client2\src\sw\builder\command.cpp:583, function execute1: When executing: "[org.sw.demo.google.tesseract.tesseract-master]/[config]"
C:/Users/Evgeny/.sw/storage/pkg/b4/5b/9b5b/src/sdir/sw.cpp(79): error C2039: 'TargetOS': is not a member of 'sw::TargetSettings'
C:\Users\Evgeny.sw\storage\pkg\bf\cf\4c87\src\sdir\src\sw/core/settings.h(36): note: see declaration of 'sw::TargetSettings'
Exception in file D:\dev\primitives\src\command\src\command.cpp:820, function execute1: command failed: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe" "@C:\Users\Evgeny\AppData\Local\Temp\sw\sw.client.sw\rsp\698c-884b-b5ab-a7c0.rsp", exit code = 2

@egorpugin
Copy link
Contributor

Working on it, please wait a bit (~30 mins).

@egorpugin
Copy link
Contributor

Should be ok now.

  1. git pull tesseract changes.
  2. Upgrade sw sw --self-upgrade or (download it manually)
  3. Try to build, works for me locally.

@EugW
Copy link
Author

EugW commented Aug 10, 2019

should I have a git repository cloned? The instructions on the tesseract wiki are so incomprehensible, not a word about Visual Stduio, nor about cloning the repository
Just download and run. Pff

@EugW
Copy link
Author

EugW commented Aug 10, 2019

I did what you said, but that didn't help

  1. cloned tesseract repo in "tesseract"
  2. sw self upgrade
  3. tried build

D:\Evgeny\Documents\DEV\sw\tesseract>sw --trace build org.sw.demo.google.tesseract.tesseract-master

Starting sw...
Checking remote version
Detected target: com.Microsoft.VisualStudio.VC.cl-19.16.27032.1
Detected program: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe
Detected target: com.Microsoft.VisualStudio.VC.link-19.16.27032.1
Detected program: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\link.exe
Detected target: com.Microsoft.VisualStudio.VC.lib-19.16.27032.1
Detected program: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\lib.exe
Detected target: com.Microsoft.VisualStudio.VC.ml-19.16.27032.1
Detected program: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\ml64.exe
Detected target: com.Microsoft.VisualStudio.VC.libcpp-19.16.27032.1
Detected target: com.Microsoft.VisualStudio.VC.ATLMFC-19.16.27032.1
Detected target: com.Microsoft.VisualStudio.VC.cl-19.16.27032.1
Detected program: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x86\cl.exe
Detected target: com.Microsoft.VisualStudio.VC.link-19.16.27032.1
Detected program: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x86\link.exe
Detected target: com.Microsoft.VisualStudio.VC.lib-19.16.27032.1
Detected program: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x86\lib.exe
Detected target: com.Microsoft.VisualStudio.VC.ml-19.16.27032.1
Detected program: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x86\ml.exe
Detected target: com.Microsoft.VisualStudio.VC.libcpp-19.16.27032.1
Detected target: com.Microsoft.VisualStudio.VC.ATLMFC-19.16.27032.1
Detected target: com.Microsoft.VisualStudio.VC.libcpp-15.9.28307.770
Detected target: com.Microsoft.VisualStudio.VC.ATLMFC-15.9.28307.770
Detected target: com.Microsoft.VisualStudio.VC.libcpp-15.9.28307.770
Detected target: com.Microsoft.VisualStudio.VC.ATLMFC-15.9.28307.770
Detected target: com.Microsoft.Windows.SDK.ucrt-10.0.17763.0
Detected target: com.Microsoft.Windows.SDK.ucrt-10.0.17763.0
Detected target: com.Microsoft.Windows.SDK.ucrt-10.0.17763.0
Detected target: com.Microsoft.Windows.SDK.ucrt-10.0.17763.0
Detected target: com.Microsoft.Windows.SDK.um-10.0.17763.0
Detected target: com.Microsoft.Windows.SDK.um-10.0.17763.0
Detected target: com.Microsoft.Windows.SDK.um-10.0.17763.0
Detected target: com.Microsoft.Windows.SDK.um-10.0.17763.0
Detected target: com.Microsoft.Windows.rc-10.0.10011.16384
Detected program: C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\rc.exe
Detected target: com.Microsoft.Windows.SDK.ucrt-10.0.18362.0
Detected target: com.Microsoft.Windows.SDK.ucrt-10.0.18362.0
Detected target: com.Microsoft.Windows.SDK.ucrt-10.0.18362.0
Detected target: com.Microsoft.Windows.SDK.ucrt-10.0.18362.0
Detected target: com.Microsoft.Windows.SDK.um-10.0.18362.0
Detected target: com.Microsoft.Windows.SDK.um-10.0.18362.0
Detected target: com.Microsoft.Windows.SDK.um-10.0.18362.0
Detected target: com.Microsoft.Windows.SDK.um-10.0.18362.0
Detected target: com.Microsoft.Windows.rc-10.0.10011.16384
Detected program: C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\rc.exe
build id 00000201E3948260 performing void __cdecl sw::SwBuild::load(void)
build id 00000201E3948590 overriding state from 0 to 3
build id 00000201E3948590 performing void __cdecl sw::SwBuild::loadPackages(void)
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 1
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading pub.egorpugin.primitives.templates-master
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 2
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.sw.client.driver.cpp-0.3.1
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.lexxmark.winflexbison.bison-master
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 3
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.nlohmann.json-3.7.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.google.protobuf.protoc-3.9.1
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 4
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.boost.date_time-1.70.1
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.google.grpc.grpc_cpp_plugin-1.22.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 5
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.xz_utils.lzma-5.2.4
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.nanopb-0.3.9
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 6
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.bzip2-1.0.8
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.openssl.ssl-1.1.1.3
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 7
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.madler.zlib-1.2.11
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.madler.zlib-1.2.11
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 8
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.facebook.zstd.zstd-1.4.2
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.c_ares-1.15.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 9
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.python.lib-3.7.3
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.ragel-6.10.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 10
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.sqlite3-3.29.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 11
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading pub.egorpugin.libuv-1.30.1
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 12
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.expat-2.2.7
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 13
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.rbock.sqlpp11_connector_sqlite3-develop
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 14
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.rbock.sqlpp11-develop
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 15
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading pub.egorpugin.llvm_project.llvm.support_lite-master
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 16
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.preshing.junction-master
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 17
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.preshing.turf-master
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 18
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.microsoft.gsl-2.0.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 19
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.aleksey14.rhash-1.3.6
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 20
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.google.breakpad.client.windows.handler-master
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 21
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.badger.curl.libcurl-7.65.2
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 22
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.gnu.gss-1.0.3
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 23
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.nghttp2-1.39.1
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 24
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.libssh2-1.9.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 25
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.openldap.ldap_r-2.4.48
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 26
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.gnu.gettext.intl-0.19.8
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 27
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.gnu.iconv.libiconv-1.16.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 28
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.imageworks.pystring-1.1.3
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 29
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.libarchive.libarchive-3.4.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 30
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.gnu.nettle.nettle-3.4.1
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 31
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.lz4-1.8.3
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 32
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.xmlsoft.libxml2-2.9.9
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 33
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.oberhumer.lzo.lzo-2.10.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 34
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.HowardHinnant.date.date-2.4.1
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 35
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.fmt-5.3.0
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 36
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) loading org.sw.demo.jbeder.yaml_cpp-master
build id 00000201E3948590 void __cdecl sw::SwBuild::loadPackages(const struct sw::TargetMap &) round 37
build id 00000201E3948590 performing void __cdecl sw::SwBuild::prepare(void)
build id 00000201E3948590 performing void __cdecl sw::SwBuild::execute(struct sw::ExecutionPlan &) const
[82/83] "[org.sw.demo.google.tesseract.tesseract-master]/[config]"
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe" "@C:\Users\Evgeny\AppData\Local\Temp\sw\sw.client.sw\rsp\fe5c-ca3d-2667-aff7.rsp"
Exception in file D:\dev\cppan2\client2\src\sw\builder\command.cpp:583, function execute1: When executing: "[org.sw.demo.google.tesseract.tesseract-master]/[config]"
C:/Users/Evgeny/.sw/storage/pkg/b4/5b/9b5b/src/sdir/sw.cpp(79): error C2039: 'TargetOS': is not a member of 'sw::TargetSettings'
C:\Users\Evgeny.sw\storage\pkg\bf\cf\4c87\src\sdir\src\sw/core/settings.h(36): note: see declaration of 'sw::TargetSettings'
Exception in file D:\dev\primitives\src\command\src\command.cpp:820, function execute1: command failed: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe" "@C:\Users\Evgeny\AppData\Local\Temp\sw\sw.client.sw\rsp\fe5c-ca3d-2667-aff7.rsp", exit code = 2

UPD:
This happens if you write last failed command
D:\Evgeny\Documents\DEV\sw\tesseract>"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe" "@C:\Users\Evgeny\AppData\Local\Temp\sw\sw.client.sw\rsp\fe5c-ca3d-2667-aff7.rsp"
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27032.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

cl : Command line error D8022 : cannot open 'C:\Users\Evgeny\AppData\Local\Temp\sw\sw.client.sw\rsp\fe5c-ca3d-2667-aff7.rsp'

D:\Evgeny\Documents\DEV\sw\tesseract>

@egorpugin
Copy link
Contributor

egorpugin commented Aug 10, 2019

You should run sw build
Result dll will be in .sw/out/... dir.

@EugW
Copy link
Author

EugW commented Aug 10, 2019

Yeah! That worked. Thank you so much

@EugW EugW closed this as completed Aug 10, 2019
@egorpugin
Copy link
Contributor

egorpugin commented Aug 10, 2019

That dll will probably require other dlls when in use. (They are located in C:\Users\Evgeny\.sw\storage\pkg\...)
I will think how to build them statically.

@egorpugin
Copy link
Contributor

egorpugin commented Aug 10, 2019

Ok, I've added such option -static-dependencies.
sw -static-dependencies build
With it libtesseract.dll will contain all deps in it.
Update sw to get this feature.
sw --self-upgrade

@longchengz
Copy link

I try sw build ,but throw an exception.
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:849, function execute1: When executing: [org.sw.demo.gnome.glib.gobject-2.80.2]/gobject/gsignalgroup.c

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

3 participants