Why do i encounter an errror when I compile using make -j command in cygwin - cygwin

I am trying to compile a software environment in Cygwin using make -j command and this error always shows up.
!error Hello World>
/bin/sh: -c: line 0: syntax error near unexpected token 'newline'
make: ***[makefile:404: ] Error 1

Related

write error: Invalid argument using linux remoteproc on BeagleBone Black

I have been trying to further understand the Sitara Am335x PRUs and I tried to follow the TI labs on how to get started with Programmable real-time units on the BeagleBone Black and but I encountred this problem that I couldn't overcome;
sudo -i
cp /home/debian/pru_blinky.out /lib/firmware/pru_blinky
cd /sys/class/remoteproc/remoteproc1
echo 'pru_blinky' > firmware
but when I type echo 'start' > state I get the following error
this is the return of man echo
NAME
echo - display a line of text
SYNOPSIS
echo [SHORT-OPTION]... [STRING]...
echo LONG-OPTION
DESCRIPTION
Echo the STRING(s) to standard output.
-n do not output the trailing newline
-e enable interpretation of backslash escapes
-E disable interpretation of backslash escapes (default)
--help display this help and exit
--version
output version information and exit
-bash: echo: write error: Invalid argument
I tried to to specify the directory and file with command: echo 'pru_blinky/pru_blinky.out' > firmware but still problem not solved
can anyone explain to me what am i doing wrong here

ERROR: automake-native-1.15-r0 do_compile: oe_runmake failed

I am trying to build an image "core-image-apd-level" but while running the command "bitbake core-image-apd-level", I am getting the mentioned error.
This is the complete log file data:
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4
| : && /bin/mkdir -p doc && { PATH='/home/manoj/apd-source/build/tmp/work/x86_64-linux/automake-native/1.15-r0/build/t/wrap:'$PATH && export PATH; } && /usr/bin/perl ../automake-1.15/doc/help2man --output=doc/automake-1.15.1 automake-1.15
| help2man: can't get `--help' info from automake-1.15
| Try `--no-discard-stderr' if option outputs to stderr
| Makefile:3687: recipe for target 'doc/automake-1.15.1' failed
| make: *** [doc/automake-1.15.1] Error 255
| WARNING: exit code 1 from a shell command.
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/manoj/apd-source/build/tmp/work/x86_64-linux/automake-native/1.15-r0/temp/log.do_compile.26476)
ERROR: Task 552 (virtual:native:/home/manoj/apd-source/poky/meta/recipes-devtools/automake/automake_1.15.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 98 tasks of which 93 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
Summary: 1 task failed:
virtual:native:/home/manoj/apd-source/poky/meta/recipes-devtools/automake/automake_1.15.bb, do_compile
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
How do I get past this error?
I have found 2 solutions when the issue occurs, you can either:
1.downgrade perl or upgrade automake
or
2.modify make file
while I chose later one for automake is less likey changed,
and less impact, comparing to perl for me.
Hope it helps.

RISCV testing emulator

When I'm trying to run riscv emulator asm tests I faced with below error:
./emulator-DefaultCPPConfig +dramsim +max-cycles=100000000 +verbose +loadmem=output/rv64ui-p-amoand_d.hex none 2> output/rv64ui-p-amoand_d.out && [ $PIPESTATUS -eq 0 ]
/bin/sh: 1: [: -eq: unexpected operator
make: *** [output/rv64ui-p-amoand_d.out] Error 2
I followed your instruction in your git. It can build emulator without any error, but problem happens when it's trying to run tests.
I added bash behind of the command in the makefile and the first error solved but when I did that I got a new error:
bash ./emulator-DefaultCPPConfig +dramsim +max-cycles=100000000 +verbose +loadmem=output/rv64ui-p-amoswap_d.hex none 2> output/rv64ui-p-amoswap_d.out && [ $PIPESTATUS -eq 0 ]
make: *** [output/rv64ui-p-amoswap_d.out] Error 126
The problem is from Shell variable, I just needed to add following line to Makefile:
SHELL=/bin/bash
It would solve the problem.

installing trousers for tpm emulator

I have installed tpm emulator successfully. I get this error
* Starting Trusted Computing daemon tcsd /etc/init.d/trousers: 32: [: /dev/tpm: unexpected operator [fail]
invoke-rc.d: initscript trousers, action "start" failed.
dpkg: error processing trousers (--configure):
subprocess installed post-installation script returned error exit status 2
E: Sub-process /usr/bin/dpkg returned an error code (1)
when executing
sudo apt-get install tpm-tools libtspi-dev
The answer to that particular error message is a broken line in the given script /etc/init.d/trousers.
The offending line 32:
31:
32: if [ ! -e /dev/tpm* ]
33: then
gets expanded to:
if [ ! -e /dev/tpm /dev/tpm0 ]
Which provokes an error. Changing that line to something like:
31:
32: if [ ! -e /dev/tpm ] && [ ! -e /dev/tpm0 ]
33: then
should at least make the script work.

bashdb startup error: bashdb/lib/setshow.sh: line 91: /dev/pts/2: Permission denied

I'm trying to use bashdb on CentOS 4.1 (unfortunately I can't choose a different/newer OS).
I installed bash 4.2 then bashdb 4.2-0.8. THere were no complaints from configure, make, make checks, or make install: everything looked peachy.
But trying to use bashdb either as 'bash --debugger myscript' or 'bashdb myscript' always gets this error:
[bot#sjbld1 bin]$ bashdb -- putxen.sh
bash debugger, bashdb, release 4.2-0.8
Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
/usr/local/share/bashdb/lib/setshow.sh: line 91: /dev/pts/2: Permission denied
/usr/local/share/bashdb/lib/setshow.sh: line 91: /dev/pts/2: Permission denied
/usr/local/share/bashdb/lib/setshow.sh: line 91: /dev/pts/2: Permission denied
/usr/local/share/bashdb/lib/setshow.sh: line 91: /dev/pts/2: Permission denied
[bot#sjbld1 bin]$
There's no line 91 in setshow.sh, and there's no /dev/pts in a directory listing of /dev.
Any suggestions how to proceed will be very much appreciated. I'm taking on a broken mess of shell script, and I'm not hot at bash (or Linux) and hope for more intimate debugging than set -x and echo statements.
Thanks
For completeness I should have added the bash script I was trying to use as bashdb test, as requested by konsolebox, though the "Permission denied" problem occurs with any code, and is solved by using sudo as suggested by Red Cricket. Here's the script:
[bot#sjcpbrvpxbld1 bin]$ cat putxen.sh
if [ x$1 == x ]
then
echo must have filename as parameter
exit 1
fi
if [ -e $1 ]
then
echo $1 found
else
echo cannot find ./$1
exit 1
fi
FTPTGT=10.10.10.25
DIRTGT=xva
echo ftp upload file to $DIRTGT directory on $FTPTGT
ftp -n $FTPTGT <<EOF
user anonymous pass
hash
bin
cd $DIRTGT
put "$1"
bye
Since programs often have stdout and stderr redirected, bashdb tries to write its output to a tty, unless directed otherwise; bashdb determines the console running the tty command.
Normally you don't need to run bashdb as root. But for reasons that are a mystery here, the user you are running bashdb as, is not able to write to the tty registered to it. That is:
echo hi > $(tty)
will probably give you the same "Permission denied". Probably ls -l $(tty) will tell you what's up there.
However, as suggested in the comments, you can workaround this by running as root such as via sudo: e.g.
sudo bashdb -- putxen.sh
Another workaround is to add your user to the group, e.g. tty that is listed when you run ls -l $(tty).

Resources