Eclipse error during remote debug session: sh: locale: not found - c++

I'm really hoping to get an answer on this. I am using Eclipse to remote debug a C++ program on a (minimal) linux machine. I am aware that the linux machine does not have the locale binary installed. First off, the error received is the following in Eclipse after pressing the debug or run button:
org.eclipse.remote.core.exception.RemoteConnectionException: sh:
locale: not found
After the first run, successive runs do not display the error, only the first run. If I restart the linux machine, the error will come back for the first run again.
What is most obvious is that Eclipse, or the running program is calling locale on the linux machine and it is not available, not installed.
This machine is quite minimal and doesn't even have a package manager - it's an embedded system. So I tried to install "locales", "locale" as well as "locale-all" using multistrap when building the linux image. None worked.
When using debian repositories, multistrap returns
E: Unable to locate packages locales
So I guess my real questions are:
1) What debian package supplies "locale" found in /usr/bin/locale? How
can I install it without adding a lot of of overhead on an ARM system? (assuming no package manager)
2) Where is the source code for locale?
And third,
3) In Eclipse, can I prevent the running program or Eclipse from
calling locale? This is preferred.
After scouring the forums, I found one guy that said he got the same issue and "manually fixed it", however he did not provide the fix.. Hope to get some help!
That reference can be found https://www.eclipse.org/forums/index.php/t/1081283/
Thanks,

I had the same, so I changed the encoding to ISO-8859-1 in the debug settings.

Related

"Program File does not exist" while trying to debug with Eclipse/OpenOCD

I recently got a nrf51 bluetooth module and I am trying to debug it with Eclipse Mars. I installed the required toolchain as well as OpenOCD (I am using STLink v2 to debug the board).
While running openOCD and arm-none-eabi-gdb in console, everything works fine. The OpenOCD server starts up and I am able to connect with the gdb tool.
However, when trying to start a debug session with Eclipse, it throws the error "Exception occurred during launch. Reason: Program file does not exist". The build process finishes normally. It's the first time I used Eclipse for C/C++ development and the first time after years I used Eclipse at all so I don't even have an idea what could be wrong.
I tried messing around with the project settings without luck. Can anyone give me a hint?
I should mention, I used an already existing Makefile since I tried compiling one of the nordic SDK examples. I Changed it so the resulting files are ready for debugging.
In past I've used Segger's Jlink programmer and the JlinkExe (A pre-built binary) for Linux platform to program Nordic Bluetooth module such as NRF51 and it worked seamlessly. There are some very good documentation on using GNU toolchain with NRF51 series SOC and in case you get your hands on Segger's Jlink, I would recommend you to use that for programming. Meanwhile, this thread in the Nordic's developer zone seem to be very much similar to your problem. Maybe you'll be find some clues there.

Installation wxWidgets with mingw64

I try to get wxWidgets installed on a Windows7 x64 Machine but wxWidgets Installation doesn't even work, I cannot get a Hello World App running.
I found out there are several ways to get the library installed and I tried some of them (with Cygwin and the included mingw64 compiler, with mingw64 using diffrent settings), all the time I get Errors while building the library. Could somebody point me out what's wrong with my current setup (which was also my first try) or show another solution?
First I installed mingw64 with the online installer to c:/mingw64. I tried some different setups concerning Version and Threads, but ended up with 4.9.2, x86_64, posix Threads, sjlj Exceptions.
Then I downloaded MYSYS from sourceforge.net and extracted it to C:/mysys.
Then I created a folder C:/wxWidgets and mounted it as /wxWidgets, downloaded the wxWidgets 3.0.2 source and put in into my mysys-home folder.
From /wxWidgets I executed: /home/Martin/wxWidgets-3.0.2/configure --host=x86_64-w64-mingw32 --disable-shared --enable-monolithic
The configure did his job without errors though some libraries couldn't be found and built-in libraries were taken instead (jpeg, png, regex, tiff, expat).
Then I executed make and it ran for some minutes and suddenly crashed. The only output was make: *** [monolib_any.o] Error 1
The last executed command was /wxWidgets/bk-make-pch ./.pch/wxprec_monolib -D__WXMSW__ ...
Right before, there is an note concerning POSIX paths: "CYGWIN environment variable option "nodosfilewarning" turns off this warning...
All the other tries ended up like this one, make suddenly hung up. Any help appreciated.
If the make/compile process really dies without any other error messages, the most likely explanations are that either it runs out of memory (but even then normally there would be some error message) or some hardware problem, it's really not supposed to do this on a working machine.
So my advice would be to run some hardware diagnostics. If this shows nothing, run make -n and execute the command used to compile any.cpp by hand by copy and pasting it.

How to configure Arch Linux to set executable bits during Tycho build for Eclipse RCP

In relation to my other question concerning cross-platform Tycho builds of an Eclipse RCP-based application, I have managed to get the build to produce the desired results (products including OS-specific executable launchers with the executable bits set) on a virtual machine running Xubuntu.
I have now switched from Xubuntu to Arch Linux running on a VirtualBox machine. The build works just fine, and the products are built as expected, but the executable bits aren't set anymore.
How can I configure ArchLinux for this to work correctly?
EDIT: Yes, I sudo.
This seems to be caused by a bug similar to Eclipse Bug #368089 for systems where the locale is not US English UTF-8. In my case it was de_DE.UTF-8.
To fix this, simply switch locale before the build as follows.
export LANG=en_US.UTF-8
Thanks to Jan Sievers and the great Tycho User List (an immensely helpful resource for everyone working with Tycho) for providing a quick solution.

Configuring Eclipse for MinGW

I am using Eclipse Juno with MinGW (latest version) on my Win7-Laptop.
My example code is successfully built within the IDE, but I can neither run nor debug it!
When I choose Run as=>Local C/C++-Application, I get
Launch failed. Binary not found.
However, there IS an exe-file as a result of the build process!
When I call cmd.exe, navigate to the source directory and call this built exe (a.out.exe), it works without problems!
I guess this is due to wrong/missing configuration of eclipse, but I couldn't find useful info on that so far.
This thread mentions environment variables. I added MinGW and Msys to my PATH variable (that's why I can compile) but I can't run my software in eclipse!
So, what can be done to enable debugging?
I have made a little tutorial.
how to set all for Eclipse have a look it's here https://stackoverflow.com/a/12169583/1322642
Hope it can help you a little bit.

How to do remote debugging with Eclipse CDT without gdbserver?

We're using the Eclipse CDT 5 C++ IDE on Windows to develop a C++ application on a remote AIX host.
Eclipse CDT has the ability to perform remote debugging using gdbserver. Unfortunately, gdbserver is not supported on AIX.
Is anyone familiar with a way to debug remotely using Eclipse CDT without gdbserver? Perhaps using an SSH shell connection to gdb?
finally I got gdb run remotly anyhow now. At the Bug-symbol on the taskbar I took Debug Configurations - GDB Hardware Debugging.
In Main C/C++ Applications I set the full path on the Samba share of the executable (X:\abin\vlmi9506). I also set a linked folder on X:\abin in the project. Then I modified my batch-script in GDB Setup. It's not directly calling gdb in the plink-session but a unix-shell-script, which opens gdb. By this I have the possibility to set some unix environment-variables for the program before doing debug. The call in my batch:
plink.exe prevoax1 -l suttera -pw XXXXX -i /proj/user/dev/suttera/vl/9506/test/vlmi9506ddd.run 20155 dev o m
In the unix script I started gdb with the command line params from eclipse, that I found in my former tryals. The call in the shell command looks like this:
gdb -nw -i mi -cd=$LVarPathExec $LVarPathExec/vlmi9506
Then IBM just gives gdb 6.0 for AIX. I found version 6.8 in the net at http://www.perzl.org/aix/index.php?n=Main.Gdb. Our Admin installed it.
I can now step through the program and watch variables. I even can write gdb-commands directly in the console-view. yabadabadooooooo
Hope that helps to others as well. Can not tell, what was really the winner-action.
But each answer gives more new questions. Now I got 3 of them.
When I start the debug config I have to click restart in the toolbar to come really in the main procedure. Is it possible to come directly in main without restarting?
On AIX our programs are first preprocessed for embedded sql. The preprocessed c-source is put in another directory. When I duble-click the line to set a breakpoint, I get the warning "unresolved breakpoint" and in the gdb-console I see, that the break is set to the preprocessed source which is wrong. Is it possible to set the breakpoints on the right source?
We are using CICS on AIX. With the xldb-Debugger and the CDCN-command of CICS we manage that debugging is started, when we come in our programs. Is it possible to get that remotely (in plink) with gdb-eclipse as well?
I wouldn't normally take a shot in the dark on a question I can't really test the answer to, but since this one has sat around for a day, I'll give it a shot. It seems from looking at:
http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_Debugging_with_CDT.3F
...that even if the CDT has changed since that wiki page was made, you should still be able to change the debug command to:
ssh remotehost gdb
instead of using TM which uses gdbserver. This will probably be slightly slower than the TM remote debugging since that actually uses a local gdb, but on the other hand this way you won't have to NFS or SMB mount your source code to make it available to the local debugger (and if you're on a LAN it probably won't matter anyhow).
There's also a reference TCF implementation for linux, which you may or may not have any luck recompiling for AIX, but it allows for remote debugging if gdbserver is otherwise not available:
http://wiki.eclipse.org/DSDP/TM/TCF_FAQ
tried also to remotly debug an aix-appl with windows eclipse-cdt-gdb.
Got blocked at the end with unix/windows path-problems. Maybe my result can help u a little further - maybe you already got it work. I'm interested in your comment. asked on eclipse news portal- following the answer of martin oberhuber (thanks again) tried dsp dd (also blocked with path problem) and set an request in eclipse bugzilla.
here the link to news:
http://www.eclipse.org/newsportal/article.php?id=406&group=eclipse.dsdp.tm
Here my bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=252758
At the moment we still debug localy with xldb but I am trying ddd-gdb at the moment. At least locally gdb is running.