Also see attached.

David

On 28/07/2015 10:06 PM, David Holmes wrote:
On 28/07/2015 9:36 PM, GAUVIN Florian wrote:
Hi,
I have this error building openjdk8 compact profiles :
"
## Starting profiles
gmake[2]: *** No rule to make target
`/home/student/Documents/openjdk8/build/linux-x86_64-normal-zero-release/images/beanless/java/util/jar/Pack200\$Packer.class',
needed by
`/home/student/Documents/openjdk8/build/linux-x86_64-normal-zero-release/images/libprofile_1/rt.jar'.
Stop.
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [profile_1] Error 2
make: *** [profiles-only] Error 2
[student@localhost openjdk8]$ make -v
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
"

I have read on a website that it's because of make 4.0 but it's not
the one that I'm using. I'm using make 3.82 and I work on centos 7.
Do you have an idea why?

As I recall it is an issue with make and the shell. But I also thought
that Erik had since fixed this issue. What actual version of the sources
are you building?

David



------------------------------------------------------------------------------------------------------------

Disclaimer:

If you are not the intended recipient of this email, please notify the
sender and
delete it.
Any unauthorized copying, disclosure or distribution of this email or its
attachment(s) is forbidden.
Thales Nederland BV will not accept liability for any damage caused by
this email or
its attachment(s).
Thales Nederland BV is seated in Hengelo and is registered at the
Chamber of
Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------


--- Begin Message ---
Hi Erik,

This is great news! The dollar escaping stuff was a nightmare.

Thanks,
David

On 3/06/2014 12:09 AM, Erik Joelsson wrote:
Hello Emmanuel,

I remember that piece of make logic being especially tricky to get
working and it seems the weirdness in make has been fixed in make 4.0,
or at least changed. Our dealing with escaping dollars is rather messy
in JDK 8. I have recently worked on this in a JDK 9 project, where I
have chosen a different approach that seems to work with both 3.8x and
4.0. The idea is based on defining this macro in make/common/MakeBase.gmk:

################################################################################

# This macro translates $ into \$ to protect the $ from expansion in the
shell.
# To make this macro resilient against already escaped strings, first
remove
# any present escapes before escaping so that no double escapes are added.
EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1)))

And then instead of escaping dollars explicitly in make variable
declarations, just call that macro before giving anything containing
dollars to the shell.

--- a/make/CreateJars.gmk
+++ b/make/CreateJars.gmk
@@ -302,17 +302,15 @@
  # methods from classes that only go into the profile builds.
  BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless

-# When there are $ characters in filenames we have some very subtle
interactions between
-# make expansion and shell expansion. In this particular case $< will
contain a single $ while
-# $@ will contain \$. So we have to pass $< in single-quotes to avoid
shell expansion
  $(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
      $(MKDIR) -p $(@D)
-    $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener
removePropertyChangeListener
+    $(TOOL_REMOVEMETHODS) $(call EscapeDollar, $<) $(call EscapeDollar,
$@) \
+        addPropertyChangeListener removePropertyChangeListener

  CLASSES_TO_DEBEAN = \
      java/util/logging/LogManager.class \
-    java/util/jar/Pack200\$$Packer.class \
-    java/util/jar/Pack200\$$Unpacker.class \
+    java/util/jar/Pack200$$Packer.class \
+    java/util/jar/Pack200$$Unpacker.class \
      com/sun/java/util/jar/pack/PackerImpl.class \
      com/sun/java/util/jar/pack/UnpackerImpl.class

@@ -345,7 +343,7 @@
        $(CD) $(patsubst %$(VERSION_CLASS_PATH), %, $(CLASS_FILE)) && \
        $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
        $(CD) $(BEANLESS_CLASSES) && \
-      $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(CLASSES_TO_DEBEAN); \
+      $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(call EscapeDollar,
$(CLASSES_TO_DEBEAN)); \
      fi
      $(MV) $@.tmp $@

The patch above works for me at least.

/Erik

On 2014-05-31 15:35, Emmanuel Bourg wrote:
Hi,

I'd like to report an issue with the build for the OpenJDK 8 compact
profiles. On Debian the build fails when PropertyChangeListener is
removed from the pack200 classes:

## Starting profiles
/usr/bin/find: `/home/ebourg/jdk8u-dev/build/images/lib': No such file
or directory
make[2]: *** No rule to make target
'/home/ebourg/jdk8u-dev/build/images/beanless/java/util/jar/Pack200\$Packer.class',

needed by '/home/ebourg/jdk8u-dev/build/images/libprofile_1/rt.jar'.
Stop.
make[2]: *** Waiting for unfinished jobs....
Removed method
addPropertyChangeListener(java.beans.PropertyChangeListener) from
java/util/logging/LogManager
Removed method
removePropertyChangeListener(java.beans.PropertyChangeListener) from
java/util/logging/LogManager
BuildJdk.gmk:113: recipe for target 'profile_1' failed
make[1]: *** [profile_1] Error 2
/home/ebourg/jdk8u-dev//make/Main.gmk:147: recipe for target
'profiles-only' failed
make: *** [profiles-only] Error 2


The same issue was reported last year on Arch Linux:

http://mail.openjdk.java.net/pipermail/build-dev/2013-July/009557.html

It looks like this error is caused by GNU Make 4.0 which is now the
default in Debian. I was able to build the compact profiles after
downgrading make to the version 3.81.

OpenJDK 9 isn't affected by this issue because the
add/removePropertyChangeListener() methods are already removed.

Make 4.0 caused another regression (JDK-8028407) which has been fixed
for OpenJDK 9. Could you also consider backporting it to OpenJDK 8
please?

Thank you,

Emmanuel Bourg


--- End Message ---

Reply via email to