gdb : cannot execute: Undefined error: 0 - gdb

I've installed gdb as per the following steps:
brew install homebrew/dupes/gdb
follow instructions exactly as per http://sourceware.org/gdb/wiki/BuildingOnDarwin
However when I try run inside gdb, I get:
...
(gdb) run
Starting program: /Users/snowch/tmp/myc/main
/bin/bash: /Users/snowch/tmp/myc/main: Permission denied
/bin/bash: line 0: exec: /Users/snowch/tmp/myc/main: cannot execute: Undefined error: 0
During startup program exited with code 126.
I've tried reinstalling gdb and creating and signing with a new certificate. Still no joy.
Any ideas?

Related

MinGW pacman -Sys Unable to lock database

To start Code and Compile C++, must install a compiler. For my case, it is MSYS2 through which MinGW is available. According to the installation guild mentioned on the website, I installed the software without any errors. Now I was supposed to update the package database and base packages by entering pacman -Sys but it has shown an error
error: failed to synchronize all databases (unable to lock database)
After searching online for a solution I found that deleting/removing the db.lck will work, for that, I used this command rm /var/lib/pacman/db.lck
but it showed another error. Right now there is no solution to this on the internet.
I've also pasted the terminal output of MSYS2 MSYS for refernce.
$ pacman -Sys
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
VIRAT#DESKTOP-97BS0AB MSYS ~
$ rm /var/lib/pacman/db.lck
rm: cannot remove '/var/lib/pacman/db.lck': No such file or directory
VIRAT#DESKTOP-97BS0AB MSYS ~
$ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied
VIRAT#DESKTOP-97BS0AB MSYS ~
$ pacman -Su
error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied
VIRAT#DESKTOP-97BS0AB MSYS ~
$
As I found there 2 solutions for this error. Try both :
Solution : 1
C:\Users\your_account_name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2 64bit
Run "MSYS2 MSYS" as administrator
Run the command : pacman -Syu
Solution - 2 :
C:\msys64\var\lib\pacman ( Go to the downloaded folder)
Delete the "db.lck" file
RESOURCES :
For solution 1 : Mr. Padro's (https://stackoverflow.com/users/18910613/pedro) solution helped me.
For solution 2
https://www.reddit.com/r/archlinux/comments/nvrny2/pacman_error_failed_to_synchronize_all_databases/
Try to run MSYS app under administrator privilege... worked for me

Running autotools in Windows (MinGW)

I am trying to build the shapelib from source on Windows. The library uses autotools. I have MinGW installed with the appropriate packages. When I run
C:\MinGW\msys\1.0\bin\sh autogen.sh
it outputs
autogen.sh: line 4: readlink: command not found
autogen.sh: line 4: dirname: command not found
**Error**: Directory `' does not look like the top-level package directory
I don't expect readlink to work with Windows so I just skipped right to
C:\MinGW\msys\1.0\bin\sh configure
However, that also throws errors
configure: line 478: sed: command not found
configure: line 477: expr: command not found
configure: line 478: sed: command not found
configure: line 492: sed: command not found
: error: cannot create .lineno; rerun with a POSIX shell
Is there any hope of getting this to compile on windows? Am I missing something obvious? I double checked and the sed package is installed.
Problem solved. My MinGW install was corrupted. I removed MinGw and installed it again. Now autogen.sh runs fine.

{Yocto} "opkg_install_cmd: Cannot install package <package_name>." Errors

I am working with YOCTO project and running into the problem that made the build progress fail. The failure was at a last task do_rootfs
Below is the error log:
ERROR: Unable to install packages. Command '/home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/tmp/sysroots/x86_64-linux/usr/bin/opkg-cl -f /home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/tmp/work/iwg21m-poky-linux-gnueabi/core-image-weston/1.0-r0/opkg.conf -o /home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/tmp/work/iwg21m-poky-linux-gnueabi/core-image-weston/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version install locale-base-en-us locale-base-en-gb' returned 255:
Unknown package 'locale-base-en-us'.
Unknown package 'locale-base-en-gb'.
Collected errors:
* opkg_install_cmd: Cannot install package locale-base-en-us.
* opkg_install_cmd: Cannot install package locale-base-en-gb.
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/tmp/work/iwg21m-poky-linux-gnueabi/core-image-weston/1.0-r0/temp/log.do_rootfs.31252
ERROR: Task 7 (/home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/../poky/meta/recipes-graphics/images/core-image-weston.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5097 tasks of which 5096 didn't need to be rerun and 1 failed.
No currently running tasks (5096 of 5098)
Summary: 1 task failed:
/home/yocto/Work/skrzg1h_iWg21m_QtHmi/build/../poky/meta/recipes-graphics/images/core-image-weston.bb, do_rootfs
If you guys already run into this problem also, kindly support me how to fix this.
Thanks.

Linux Ubuntu make command error 127

Whenever I try to run the make-command, It gives me following error.
make: powerpc-fsl-linux-g++: Command not found
make: *** [main.o] Error 127
The obvious conclusion would be:
The command 'g++' was not found on your system, install it.
(sudo apt-get install g++)
However, the g++ command works perfectly, and is installed.
Also, my system does not have an active Internet connection, so I can't run any apt-get command successfully.
The make-command creates an output file, but I'm not sure if it's complete and working, since there is an error.
Also, the make install command displays the exact same error.
Any help, on how I can solve this Error?
You need to install the package powerpc-fsl-linux-g++.

chef-solo from_file had an error out bash /tmp/chef-script returned 1, expected 0

Im having this error appear on chef-solo recipes, Im new to it so I dont really get this error or how to fix it... still sounds like either file or dir not found, created...
out: [Fri, 18 Mar 2011 15:59:28 +0000] ERROR: script[Install_Requirements] (/etc/chef/cookbooks/main/recipes/rincon.rb:35:in `from_file') had an error:
out: "bash" "/tmp/chef-script20110318-7369-1hi8q5e-0" returned 1, expected 0
This is the recipe that shows the error.
script "Install_Requirements" do
interpreter "bash"
user "rincon"
group "rincon"
cwd "/tmp"
code <<-EOH
/home/rincon/sites/rinconcolombia/bin/pip install -r /home/rincon/sites/rinconcolombia/checkouts/rinconcolombia/requirements.txt
EOH
end
Ive been using chef-solo -l debug flag and its been giving me all the info I need to debug this problem... Thank you all hope this works for you should you find yourself in the same caveat