Building OpenJDK - Corba issue - windows

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

Related

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

$ 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?

CMAKE suppress error output for custom command?

I have a cmake command that looks like the following:
add_custom_command(
TARGET "uninstall"
POST_BUILD
COMMENT "Uninstall files within install_manifest.txt"
COMMAND sudo xargs rm -vf < install_manifest.txt || echo Nothing in install_manifest.txt to be uninstalled!
COMMAND cat install_manifest.txt | xargs -L1 dirname | sudo xargs rmdir --ignore-fail-on-non-empty -p
COMMAND echo
)
which has the goal of uninstalling files that were installed as part of the package.
The line
COMMAND sudo xargs rm -vf < install_manifest.txt || echo Nothing in install_manifest.txt to be uninstalled! is to remove the individual files that were installed, and COMMAND cat install_manifest.txt | xargs -L1 dirname | sudo xargs rmdir --ignore-fail-on-non-empty -p was to clear up the empty directories left behind.
Unfortunately, when I run the make uninstall I see the following near the end:
rmdir: failed to remove '/usr/local/include/palisade/pke': No such file or directory
rmdir: failed to remove '/usr/local/include/palisade/binfhe': No such file or directory
rmdir: failed to remove '/usr/local/include/palisade/binfhe': No such file or directory
rmdir: failed to remove '/usr/local/include/palisade/binfhe': No such file or directory
rmdir: failed to remove '/usr/local/include/palisade/binfhe': No such file or directory
rmdir: failed to remove '/usr/local/include/palisade/binfhe': No such file or directory
rmdir: failed to remove '/usr/local/include/palisade/binfhe': No such file or directory
make[3]: *** [CMakeFiles/uninstall.dir/build.make:72: uninstall] Error 123
make[2]: *** [CMakeFiles/Makefile2:334: CMakeFiles/uninstall.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:341: CMakeFiles/uninstall.dir/rule] Error 2
make: *** [Makefile:183: uninstall] Error 2
which I want to avoid. If I had to guess, the issue comes about because as rmdir is deleting folders, it is deleting their parents which means that for some other files which are along the same branch, it cannot access the empty folders there which is causing the errors. Does anyone know how I might address this? I don't want to propagate those errors to the user because for all intents and purposes it shouldn't matter to them
It will happen because the CMake command "add_custom_command" will halt execution if any of its COMMAND gives error (non-zero error code).
One workaround is to make sure that the command always succeeds by using "echo"
(some_shell_command || echo "")
For your example code :
add_custom_command(
TARGET "uninstall"
POST_BUILD
COMMENT "Uninstall files within install_manifest.txt"
COMMAND sudo xargs rm -vf < install_manifest.txt || echo Nothing in install_manifest.txt to be uninstalled!
COMMAND cat install_manifest.txt | xargs -L1 dirname | sudo xargs rmdir --ignore-fail-on-non-empty -p || echo ""
COMMAND echo
)
might work

gmake emits a "permission denied" error on a target. Why?

I'm running a golang build under a Makefile, and getting a truly strange permission error on a folder that has user permissions. The makefile looks like this:
PID = /tmp/nodemon-golang-project.pid
TMPL_FILES = $(shell find . -type f -name '*.tmpl')
GO_FILES = $(shell find . -type f -name '*.go')
CMD_FILES = $(shell find ./cmd -type f -name '*.go')
SASS_FILES = $(shell find ./scss -type f -name '*.scss')
APP = ./app
CSS = ./static/css/style.css
serve: restart
#fswatch -o . | xargs -n1 -I{} make restart || make kill
kill:
#kill `cat $(PID)` || true
before:
#echo "\nRESTARTED ..."
$(APP): $(GO_FILES) $(TMPL_FILES)
echo $(GO_FILES)
#go build -o $# $(CMD_FILES)
$(CSS): $(SASS_FILES)
#echo Generating CSS
#rm static/css/style.css
#sh -c sass scss/styles.scss static/css/style.css
restart: kill before $(APP) $(CSS)
#$(APP) & echo $$! > $(PID)
#echo Try css
#$(CSS)
.PHONY: serve restart kill before scss
I get the error when this runs:
$ gmake serve
RESTARTED ...
Try css
gmake: ./static/css/style.css: Permission denied
gmake: *** [Makefile:32: restart] Error 127
I'm trying to figure out why I'd get a permission error. All of the directories are under the normal user, and gmake is running under that same user. All of the directories involved as well, and all the directories are writable and executable.
Why would gmake have a problem with a normal file with normal permissions? Am I doing something wrong with the Makefile that would cause this kind of error?
First rule of debugging makefiles is, never add # to your makefile until it's fully working. You're just hiding all the critical information from yourself. Even after it's fully working I recommend not adding #.
Second, I don't know why you're adding sh -c to this rule; you're already in a shell, why start another one?
#sh -c sass scss/styles.scss static/css/style.css
However none of the above are your problem. Your problem is this:
CSS = ./static/css/style.css
....
restart: kill before $(APP) $(CSS)
#$(APP) & echo $$! > $(PID)
#echo Try css
#$(CSS)
Note this last line; CSS expands to ./static/css/style.css so that file is invoked as a program, but it doesn't have executable bits set, so the invocation fails.

Trying to make ruby-install on ubuntu 16.04

I downloaded ruby-install version 0.6.1 and for some reason I get this make error:
*** No rule to make target 'install'. Stop.
What can I do to fix this?
deploy#blah:~$ sudo ls /root/
ruby-install-0.6.1 ruby-install.tar.gz
deploy#blah:~$ sudo make /root/ruby-install-0.6.1/ install
make: Nothing to be done for '/root/ruby-install-0.6.1/'.
make: *** No rule to make target 'install'. Stop.
Update
I went into the directory now:
root#blah:~/ruby-install-0.6.1# sudo make install
for dir in `find bin share -type d`; do mkdir -p /usr/local/$dir; done
for file in `find bin share -type f`; do cp $file /usr/local/$file; done
mkdir -p /usr/local/share/doc/ruby-install-0.6.1
cp -r *.md *.txt /usr/local/share/doc/ruby-install-0.6.1/
Did this work?
You need to cd into the directory, not pass the directory as an argument to make. E.g.
cd ruby-install-0.6.1
sudo make install

Makefile: removing files

On Windows I am trying to add a Makefile target to remove all files from a specific directory (NOT including subdirectories)...
clean_files:
rm -f Build/*.*
But I get the error: /bin/sh: rm: command not found
Running it from the command line works and running it without the *'s works.
clean_files:
- rm -f Build/*
putting a '-' before a make command will ignore any errors from that command, like
rm: cannot remove `Build/subdir': Is a directory
For removing all files from directory (NOT including sub-directories) consider:
clean_files:
find Build/ -type f -maxdepth 1 -delete

Resources