make: *** [Makefile:39: obj/main.o] Error 1 - makefile

$ make
I was trying to complie in ubuntu and the result is following code.
find . -name "*.sh" -exec chmod +x {} \;
chmod: changing permissions of './bin/tiny-yolo-aix2022-int8-test.sh': Operation not permitted
chmod: changing permissions of './bin/tiny-yolo-aix2022.sh': Operation not permitted
chmod: changing permissions of './bin/tiny-yolo-aix2022-int8.sh': Operation not permitted
^~~~~~~~~~~~~~
Assembler messages:
Fatal error: can't create obj/main.o: Permission denied
make: *** [Makefile:39: obj/main.o] Error 1
Please help me... How can I solve this error?

Related

file decompression error during kafka installation with chef

I'm trying to install kafka using the supermarket recipe as my starting point. But when I run kitchen converge it gives me the following error. It should be something inherent in the archive. What do you think?platform kitchen ubuntu 14.04 tar version 1.27.1
execute 'kafka-install' do
cwd node['kafka']['install_dir']
command <<-EOH
wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz && \
tar -zxf kafka_2.12-2.5.0.tgz && \
useradd -M #{node['kafka']['user']} && \
chown #{node['kafka']['user']}:#{node['kafka']['group']} -R #{node['kafka']['install_dir']} && \
chown +x /kafka/bin/*.sh
EOH
end
I get the following error
Error executing action `run` on resource 'execute[kafka-install]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '2'
---- Begin output of wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz && tar -zxf kafka_2.12-2.5.0.tgz && useradd -M kafka && chown kafka:kafka -R /kafka && chown +x /kafka/bin/*.sh
----
STDOUT:
STDERR: --2020-06-09 18:21:40-- http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz
tar: Skipping to next header
tar: Substituting `.' for empty member name
tar: .: Unknown file type ' ', extracted as normal file
tar: .: Cannot open: Is a directory
tar: Substituting `.' for empty member name
tar: .: Unknown file type ' ', extracted as normal file
tar: .: Cannot open: Is a directory
tar: Substituting `.' for empty member name
tar: .: Unknown file type ' ', extracted as normal file
tar: .: Cannot open: Is a directory
tar: Substituting `.' for empty member name
tar: .: Unknown file type ' ', extracted as normal file
tar: .: Cannot open: Is a directory
tar: Substituting `.' for empty member name
tar: .: Unknown file type ' ', extracted as normal file
tar: .: Cannot open: Is a directory
tar: Substituting `.' for empty member name
tar: .: Unknown file type ' ', extracted as normal file
tar: .: Cannot open: Is a directory
tar: Substituting `.' for empty member name
tar: .: Unknown file type ' ', extracted as normal file
tar: .: Cannot open: Is a directory
tar: Substituting `.' for empty member name
tar: .: Unknown file type ' ', extracted as normal file
tar: .: Cannot open: Is a directory
tar: Skipping to next header
gzip: stdin: invalid compressed data--format violated
tar: Child returned status 1
tar: Error is not recoverable: exiting now
---- End output of wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz && tar -zxf kafka_2.12-2.5.0.tgz && useradd -M kafka && chown kafka:kafka -R /kafka && chown +x /kafka/bin/*.sh
----
Ran wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz && tar -zxf kafka_2.12-2.5.0.tgz && useradd -M kafka && chown kafka:kafka -R /kafka && chown +x /kafka/bin/*.sh
returned 2
I tried the tar command in ubuntu 18.04 and it works, tar version 1.29

Linux find command permission denied

I want to filter out the unnecessary information "Permission denied".
these are outputs from command "find -type f -name sources.list"
find: './run/lxcfs': Permission denied
find: './run/sudo': Permission denied
find: './run/lvm': Permission denied
find: './tmp/systemd-private-99eef94819d84080adc7df3e60efee5b-systemd-timesyncd.service-HE48k9': Permission denied
find: './lost+found': Permission denied
find: './dev/vboxusb': Permission denied
find: './root': Permission denied
./etc/apt/sources.list
find: './etc/sudoers.d': Permission denied
I tried to use "! -readable -prune" in conjunction with the find command as above to suppress the "Permission denied" information, but it still doesn't work.
try the following
find -type f -name sources.list 2>/dev/null
This will redirect stderr output stream, which is used to report all errors, including the "Access denied" one, to null device.
Something like this should work
find -type d ! -readable -prune -o -type f -name sources.list
The following worked for me:
find / -mount -readable -name "<whatever>" -print
Here I only wanted to search the root file system, and not descent into any of the mounted file systems. Hence -mount.
The problem files that were throwing errors were not readable (yielding "permission denied"). Hence -readable.
The rest is obvious.
(Note: In Ubuntu 16.04 the files in /var/lib/lxcfs are not readable, even for root. The above solved the problem for me.)
First you can check the ACL of folders with the help of
getfacl -R /foldername
if read permission is there to particular folder,then run;
find foldername -type f -name sources.list
else
skip command

Why extglob except breaking except condition?

I run in Debian 8.1, GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu) and Lenovo G50-30 with 500 GB SSD and 8 GB flash memory:
shopt -s extglob
cp -r !(Backups.backupdb/) /home/masi/Documents/
but it will copy also everything from the directory Backups.backupdb/, confirmed at the end of copying.
Messages during the copying process
After 2h copying
cp: cannot stat ‘Backups.backupdb/masi\’s MacBook Air/2015-06-25-233115/Macintosh HD/System/Library/Image Capture/Automatic Tasks/MakePDF.app/Contents/Resources/ko.lproj/3x5로 자르기.mkpdf’: No such file or directory
cp: cannot stat ‘Backups.backupdb/masi\’s MacBook Air/2015-06-25-233115/Macintosh HD/System/Library/Image Capture/Automatic Tasks/MakePDF.app/Contents/Resources/ko.lproj/3x5에 맞추기.mkpdf’: No such file or directory
...
cp: cannot stat ‘Camera Uploads/2015-06-29 11.51.36.jpg’: Invalid argument
cp: cannot stat ‘Camera Uploads/2015-06-29 11.51.53.jpg’: Invalid argument
cp: cannot stat ‘Camera Uploads/Icon\r’: Invalid argument
cp: cannot stat ‘Cancer’: Invalid argument
cp: cannot stat ‘cardio bad/atria-en-ventrikels.swf’: Invalid argument
cp: cannot stat ‘cardio bad/extreme_90_180.swf’: Invalid argument
cp: cannot stat ‘Cardio databases tools’: Invalid argument
cp: cannot stat ‘Cardiology’: Invalid argument
...
where I keep unexpected browsing through the backup folder.
The challenge here is that the Backups.backupdb is several TBs and seeing that it goes browsing it does not feel good.
No symbolic links
I run
ls -lR /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/ |grep Backup
getting
ls: cannot access /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/Cancer: Invalid argument
ls: cannot access /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/Cardio databases tools: Invalid argument
ls: cannot access /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/Cardiology: Invalid argument
drwxr-xr-x 1 root root 7 Jul 8 20:25 Backups.backupdb
ls: cannot open directory /media/masi/eb807ed8-7f45-35f8-a345-9da6692b228a/animations/Embryology/e17_files: Permission denied
^C
so the directory is not a symlink.
Why is extglob except condition broken here by browsing the folder?
Try removing the backslash (I am adding echo for test purposes):
shopt -s extglob
echo cp -r !(Backups.backupdb) /home/masi/Documents/
It works in my environment (GNU bash, version 4.3.30, OS X)

Building OpenJDK - Corba issue

I'm trying to build OpenJDK 7 on WinXP x32 but getting a Corba error:
make[4]: Leaving directory '/cygdrive/c/Projects/OpenJDK/jdk7/corba/make/com/sun'
make[3]: Leaving directory '/cygdrive/c/Projects/OpenJDK/jdk7/corba/make/com'
abs_src_zip=`cd C:/Projects/OpenJDK/java_libs/java_libs/openjdk7/output_32/corba
/dist/lib ; pwd`/src.zip ; \
( cd ../src/share/classes ; find . \( -name \*-template \) -prune -o -type f -pr
int | zip -q $abs_src_zip -# ) ; \
( cd C:/Projects/OpenJDK/java_libs/java_libs/openjdk7/output_32/corba/gensrc ; f
ind . -type f -print | zip -q $abs_src_zip -# ) ;
File not found - *-template
zip error: Nothing to do! (/cygdrive/c/Projects/OpenJDK/java_libs/java_libs/open
jdk7/output_32/corba/dist/lib/src.zip)
FIND: Parameter format not correct
zip error: Nothing to do! (/cygdrive/c/Projects/OpenJDK/java_libs/java_libs/open
jdk7/output_32/corba/dist/lib/src.zip)
Makefile:147: recipe for target 'C:/Projects/OpenJDK/java_libs/java_libs/openjdk
7/output_32/corba/dist/lib/src.zip' failed
make[2]: *** [C:/Projects/OpenJDK/java_libs/java_libs/openjdk7/output_32/corba/d
ist/lib/src.zip] Error 12
make[2]: Leaving directory '/cygdrive/c/Projects/OpenJDK/jdk7/corba/make'
make/corba-rules.gmk:42: recipe for target 'corba-build' failed
make[1]: *** [corba-build] Error 2
make[1]: Leaving directory '/cygdrive/c/Projects/OpenJDK/jdk7'
Makefile:251: recipe for target 'build_product_image' failed
make: *** [build_product_image] Error 2
Looks like *-template files haven't been generated during Corba build (I didn't find any *-template file in Corba directory) and therefore src.zip archive hasn't been created.
What am I missing?
I was able to build OpenJDK via alexkasko's scripts: https://github.com/alexkasko/openjdk-unofficial-builds

How do I fix a "syntax error near unexpected token `('" when using '!(...)' in Makefile? [duplicate]

This question already has an answer here:
How to fix Makefile syntax error when using wildcard on make clean?
(1 answer)
Closed 7 years ago.
I have a Makefile as follows:
test:
rm -rf !(.git|folder1|folder2)
Upon running make test, everything in the folder must get deleted except for .git/, folder1/, and folder2/.
Instead, I get the following error:
/bin/bash: -c: line 0: syntax error near unexpected token `('
/bin/bash: -c: line 0: `rm -rf !(.git|folder1|folder2)'
make: *** [test] Error 2
How do I fix this?
The !(...) wildcard syntax only works if the extglob shell option is set (shopt -s extglob). This option is not enabled by default.
An alternative way to do this is:
find '(' -name .git -o -name folder1 -o -name folder2 ')' -prune -o -exec rm -rf {} \;

Resources