I have ust started using debugger but it shows this error on pressing move to cursor on codebocks.
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\anand\software\installed\CodeBlocks\dp\
Adding source dir: C:\anand\software\installed\CodeBlocks\dp\
Adding file: C:\anand\software\installed\CodeBlocks\dp\bin\Debug\dp.exe
Changing directory to: C:/anand/software/installed/CodeBlocks/dp/.
Set variable: PATH=.;C:\MinGW\bin;C:\MinGW;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\HashiCorp\Vagrant\bin;C:\Users\Yash\AppData\Local\Microsoft\WindowsApps
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/anand/software/installed/CodeBlocks/dp/bin/Debug/dp.exe
failed
I had a similar problem with not being able to start the debugger and it turned out I forgot to install it in the first place. Check whether you have gdb present in your system -- if you're running on Windows and using MinGW then look into C:/MinGW/bin for gdb.exe
Related
I am trying to debug a Fortran Console application from Eclipse under Windows 10.
Building and running work fine, using the compiler from MSYS2.
However, starting the debugger yields:
Error in final launch sequence:
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Error creating process /c/Windows/system32/E:/till/uni/wasa/wasa_git/WASA-SED/E:/till/uni/wasa/wasa_git/WASA-SED/wasa_dbg.exe, (error 2).
The gdb.exe is found correctly, but it seems as if the path to the binary is prepended with /c/Windows/system32/ and one time too many the actual path E:/till/uni/wasa/wasa_git/WASA-SED, which obviously causes gdb to fail.
I tried using absolute, relative, and no paths to the binary in the debug configuration settings, all with the same result.
How can I fix this? Thanks in advance.
For me, the problem seems to be related to the version of gdb that I use.
I had used an instance from a recent MSYS2 distribution (i.e. GNU gdb (GDB) 11.1), which produced the error above.
Falling back on an older version (GNU gdb (GDB) 7.9.1) worked as expected.
I solved this by prepending the PATH-variable with the path to the old MSYS2 directory:
SET PATH=c:\mingw4eclipse\bin\;c:\mingw4eclipse\mingw_64\bin\;%PATH%
Putting this into batch file that then calls Eclipse ensures that no other workflows (using the newer MSYS2) are affected.
I have followed esp-idf guideline to install and test to build the hello world and blink sample code but both the code met this problem.
Visual studio try to build hello world
> Executing task: ninja <
ninja: error: loading 'build.ninja': The system cannot find the file specified.
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1.
I have tested all the ways I can find to fix it but I'm not sure anything I missed or not.
This is one of the way that I test but also met some problem.
cmd try to run the command below
C:\Espressif\frameworks\esp-idf-v4.4>python -m pip install --user -r %IDF_PATH%/requirements.txt
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
This possible problem is the python environment is exist so I cannot do this command, but I try many ways to disabled or deactivated it still cannot.
python path
system environment
After trying to debug this for a long time, I made a backup copy of the entire project folder, then just went hog-wild deleting files. I deleted almost every file I didn't author. Only left the main/CMakeLists.txt, main/component.mk, main/main.c, main/main.h, .gitignore, CMakeLists.txt, and Makefile. Then I ran idf.py set-target esp32 and idf.py -p /dev/ttyACM0 flash monitor and it worked fine again.
VS Code & ESP-IDF on Ubuntu 20.04.05 LTS
Check if the compiler is properly selected. If you don't select a proper c/c++ compiler, then you might get this error. I had mingw in my system, but vs code did not auto detect the compiler. Then I manually added mingw and selected it for compilation after which this issue was resolved.
What worked for me after updating to the new stable release (v5.0) was
Go to the folder S:\esp\esp-idf\esp-idf-v5.0
Run command prompt at this directory and execute install.bat and later export.bat
After trying to build the program in VSCode the error "ninja: error: loading 'build.ninja'" shows up.
Update the path in the ESP-IDF extension in VSCode using ESP-IDF:Configure Paths
locate your project folder e.g. "V:\simpleTest_using_EspIDF_v5_0"
Open command prompt and execute: idf.py build
Now it builds also in VSCode using the Espressif IDF extension.
You not have a build.ninja file. Find this file on proje
I'm trying to build Tensorflow 1.14 on Windows using VS 2017 with LTCG (link time code generation) enabled. I'm hitting this crash partway through the build:
external/bazel_tools/tools/def_parser/def_parser.exe bazel-out/x64_windows-opt/bin/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def _sparse_feature_cross_op.so #bazel-out/x64_windows-opt/bin/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def-0.params
ERROR: E:/tensorflow/tensorflow/contrib/layers/BUILD:22:1: DefParser tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def failed (Exit -1073741819): def_parser.exe failed: error executing command
My environment is:
Tensorflow version: 1.14 (no source edits). Retrieved from https://github.com/tensorflow/tensorflow.git, branch r1.14
Visual Studio version: VS 2017
Bazel version: 0.25.2
Steps:
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC
set BAZEL_VC_FULL_VERSION=14.16.27023
set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
python .\configure.py
<Use all of the defaults>
bazel build -s --config=opt --copt=/GL --linkopt=/LTCG //tensorflow/tools/pip_package:build_pip_package
I've tried various versions of bazel (0.21, 0.26, 0.27, 0.28) and also tried with VS 2019 while changing the BAZEL_* environment variables, but I'm still hitting the same error. I've run the external/bazel_tools/tools/def_parser/def_parser.exe bazel-out/x64_windows-opt/bin/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def _sparse_feature_cross_op.so #bazel-out/x64_windows-opt/bin/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def-0.params command locally and it does crash with the -1073741819 error code.
Has anyone had experience building Tensorflow with LTCG, or using Bazel with LTCG?
TF 1.14 requires Bazel 0.24.1, AFAIK it doesn't work with newer Bazel versions (>= 0.25).
I don't know what the problem could be, but I can tell you how to debug it.
You'll need to get Bazel 0.24.1's sources, add debug logging to the DEF parser, build Bazel from source, and use the resulting binary to build TensorFlow.
To do so:
download the Bazel 0.24.1 release
download and extract the 0.24.1 sources OR git clone Bazel's GitHub tree and check out the 0.24.1 tag
add debug logging / printf calls to third_party/def_parser/* as you see fit
with the 0.24.1 release binary, run bazel build //src:bazel.exe in the patched source tree
use the resulting bazel-bin\src\bazel.exe to build TensorFlow
if you need to add more debug logging, repeat steps 3..5
I just tried to build TF 2.2 with MSVC 2019 v142 toolset (exact version 14.25.28610) with /GL and /LTCG options and I got the same error, but in a slightly different place. Here is my cmd line:
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC
bazel build --config=opt --config=windows --compilation_mode=opt --strip=always --copt="/MT" --copt="/Oy" --copt="/fp:fast" --copt="/GL" --linkopt="/DEBUG:NONE" --linkopt="/LTCG" --linkopt="/NODEFAULTLIB:msvcrt.lib" --linkopt="/NODEFAULTLIB:vcruntime.lib" --local_ram_resources=6512 --subcommands //tensorflow/tools/lib_package:libtensorflow > out.log 2>&1
I had to specify the MSVC tools folder directly, because Bazel kept trying to use the older version, details in this issue.
This is where it fails:
SUBCOMMAND: # //tensorflow:tf_custom_op_library_additional_deps.dll [action 'DefParser tensorflow/tf_custom_op_library_additional_deps.dll.gen.def', configuration: e5dbf2de175ef0b99efae20c93576efaae21f61b49e23200be8ee726f25b19c6]
cd C:/users/roman.kruglov/_bazel_roman.kruglov/e5u6xdzn/execroot/org_tensorflow
SET PATH=C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\WINDOWS;C:\WINDOWS\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0
SET PYTHON_BIN_PATH=C:/Users/roman.kruglov/AppData/Local/Programs/Python/Python37/python.exe
SET PYTHON_LIB_PATH=C:/Users/roman.kruglov/AppData/Local/Programs/Python/Python37/lib/site-packages
SET RUNFILES_MANIFEST_ONLY=1
SET TF2_BEHAVIOR=1
SET TF_CONFIGURE_IOS=0
SET TF_ENABLE_XLA=1
external/bazel_tools/tools/def_parser/def_parser.exe bazel-out/x64_windows-opt/bin/tensorflow/tf_custom_op_library_additional_deps.dll.gen.def tf_custom_op_library_additional_deps.dll #bazel-out/x64_windows-opt/bin/tensorflow/tf_custom_op_library_additional_deps.dll.gen.def-0.params
ERROR: C:/data_d/git/test/tensorflow/tensorflow/BUILD:750:1: DefParser tensorflow/tf_custom_op_library_additional_deps.dll.gen.def failed (Exit -1073741819)
My conjecture currently is - it happens because with /GL enabled cl.exe produces a different format of output. As specified here, .obj files produced with /GL will not be available to such linker utilities as EDITBIN and DUMPBIN. I guess this DefParser tool just can't read that output. I'll try to rebuild without Global Optimization on and share my findings.
I guess it's just not feasible.
P.S. Just a heads up. I tried to build with /GL and stuff numerous times with no luck. I managed to build without /GL and stuff numerous times. There are several posts in the internet with similar attempts all failing with roughly the same symptoms.
Thus I conclude that my conjecture was true and it's not possible to build TF with global optimizations or link time code generation, etc. I guess the same stands true for Linux, because using lto there changes output object files format as well.
When trying to debug the installation process of a msi installer using CDB as,
cdb -g -G -logo c:\log.log c:\temp\abc.msi
I get the following error saying
"Cannot execute abc.msi", Win32 error On193
"%1 is not a valid Win32 application."
Debuggee initialization failed, Win32 error On193
"%1 is not a valid Win32 application"
There are no spaces in the path to the installer either.
You can use Image File Execution Options (IFEO) to have the OS launch a debugger and then have the debugger launch the debuggee. Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options create a key called msiexec.exe. In that new key create a REG_SZ value named Debugger and set that to <path_to_cdb> -g -G -logo c:\log.log c:\temp\abc.msi
Note: I normally use this with windbg.exe instead of cdb.exe. I think cdb.exe may need a command prompt already so try with windbg.exe or ntsd.exe.
Note2: You may want to remove the -g option so that you have a chance to set some breakpoints before execution begins.
You can find more info on IFEO in the debugger.chm help file that comes with Debugging Tools for Windows.
during debuging with QtCreator I cannot browser my own source code. I build qt sources with the debug option and as you can see the filenames of the qt source code itself are visible and I can browse them with no problem. But somehow the CONFIG+=debug has no effect on my build.
build output:
Running build steps for project tcpconnector...
Starting: "/usr/local/Trolltech/Qt-4.7.4-DEBUG/bin/qmake" /home/user1/server/src-server/server.pro -r -spec linux-g++-64 CONFIG+=debug
The process "/usr/local/Trolltech/Qt-4.7.4-DEBUG/bin/qmake" exited normally.
Starting: "/usr/bin/make"
...
In the screenshot from the QtCreator debugger you can see that my own code Server::deleteDuplicateConnection is grayed out.
Like written in the comment. This just seemed to be a random phenomenon.