Skip to contentSkip to conversation

gitignore: ignore new python byte-code files

PATCH In review André Draszik 2 participants 7 messages Aug 9, 2018 – Aug 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 gitignore: ignore new python byte-code files

From: André Draszik <[email protected]>

Since we run oeqa tests, we get python byte-code in the source tree here.

Ignore them to clean-up the git status

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 51a512c..8e5c599 100644
@@ -1,4 +1,5 @@
 *.bak
 *.orig
+*.pyc
 *.rej
 *.swp
Signature · 1 line
2.18.0
#1 lore raw

PATCH 2/4 openjdk-8: speed-up do_install() (pack200)

From: André Draszik <[email protected]>

We run pack200 sequentially on all found archives, but there doesn't seem to be a reason to do so, the java_get_parallel_make() apperas to be related to compiling java itself, running multiple java applications (pack200) at the same time on the same machine should be possible, otherwise we have a big problem...

Just run up to BB_NUMBER_THREADS pack200 processes at the same time to speed up the build.

---
 recipes-core/openjdk/openjdk-8-cross.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-core/openjdk/openjdk-8-cross.inc +2 -2
index 03cab11..d0b2ec8 100644
@@ -77,13 +77,13 @@ do_install_append() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'repack', 'true', 'false', d)} ; then
       if [ -d ${D}${JDK_HOME} ] ; then
         find ${D}${JDK_HOME} -name "*.jar" -print0 | \
-          xargs -0 -n1 -P ${@java_get_parallel_make(d)} sh -c ' \
+          xargs -0 -n1 -P ${BB_NUMBER_THREADS} sh -c ' \
               echo "Repacking" "$0" ; \
               pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
       fi
       if [ -d ${D}${JRE_HOME} ] ; then
         find ${D}${JRE_HOME} -name "*.jar" -print0 | \
-          xargs -0 -n1 -P ${@java_get_parallel_make(d)} sh -c ' \
+          xargs -0 -n1 -P ${BB_NUMBER_THREADS} sh -c ' \
               echo "Repacking" "$0" ; \
               pack200 --repack --effort=9 --segment-limit=-1 --modification-time=latest --strip-debug "$0"'
       fi
Signature · 1 line
2.18.0
#2 lore raw

PATCH 3/4 Revert "openjdk-8: fix build for gcc8.x"

In reply to André Draszik

From: André Draszik <[email protected]>

This reverts commit 52fb41cec7d5125bb11c718705158696ffef11f8.

The change being reverted has two problems:
- it still doesn't produce working binaries
- compilation on pre-gcc v7 compilers fails (which is relevant for compiling openjdk-8-native, as that uses the build machine's gcc, not yocto's gcc):

  | At global scope:
  | cc1plus: error: unrecognized command line option ‘-Wno-stringop-overflow’ [-Werror]
  | cc1plus: all warnings being treated as errors
---
 .../openjdk/openjdk-8-release-16xbyy.inc      |  1 -
 .../hotspot_fix_gcc8x_build.patch             | 21 -------------------
 2 files changed, 22 deletions(-)
 delete mode 100644 recipes-core/openjdk/patches-openjdk-8/hotspot_fix_gcc8x_build.patch
recipes-core/openjdk/openjdk-8-release-16xbyy.inc +0 -1
index fd95e95..c1fcda4 100644
@@ -16,7 +16,6 @@ PATCHES_URI = "\
     file://0008-jdk-use-correct-include-for-signal.patch \
     file://0009-jdk-disable-backtrace-musl-build-fix.patch \
     file://0010-build-fix-build-on-as-needed-toolchains-generic.patch \
-    file://hotspot_fix_gcc8x_build.patch \
 "
 # some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
 # reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html
recipes-core/openjdk/patches-openjdk-8/hotspot_fix_gcc8x_build.patch deleted +0 -21
deleted file mode 100644
index 1a406f2..0000000
@@ -1,21 +0,0 @@
-From: Richard Leitner <[email protected]>
-Date: Thu, 14 Jun 2018 23:42:11 +0200
-Subject: [PATCH] openjdk-8: hotspot: fix gcc8 compilation
-
-As oe-core/yocto-project master migrated to gcc8.x we need to support this.
-Therefore disable following gcc warnings/errors which caused the build to fail:
-  + stringop-overflow
-  + return-type
----
-
---- a/hotspot/make/linux/makefiles/gcc.make
-+++ b/hotspot/make/linux/makefiles/gcc.make
-@@ -197,7 +197,7 @@
- endif
- 
- # Compiler warnings are treated as errors
--WARNINGS_ARE_ERRORS = -Werror
-+WARNINGS_ARE_ERRORS = -Werror -Wno-stringop-overflow -Wno-error=return-type
- 
- ifeq ($(USE_CLANG), true)
-   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
Signature · 1 line
2.18.0
#3 lore raw

PATCH 4/4 openjdk-8: update to work with gcc v8

In reply to André Draszik

From: André Draszik <[email protected]>

Similar to the existing gcc-6 and gcc-7 support, we need to add the same specific compiler flags to avoid miscompilation on gcc-8:
-fno-lifetime-dse -fno-delete-null-pointer-checks

In addition, gcc v8 introduces new warnings (which are treated as errors), which we can just silence for the time being:

| <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:223:32: error: control reaches end of non-void function [-Werror=return-type]
|  #define BREAKPOINT ::breakpoint()
|                     ~~~~~~~~~~~~^~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/debug.hpp:192:3: note: in expansion of macro 'BREAKPOINT'
|    BREAKPOINT;                                                                \
|    ^~~~~~~~~~
| <<PKGBUILDDIR>>/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp:197:2: note: in expansion of macro 'ShouldNotReachHere'
|   ShouldNotReachHere();
|   ^~~~~~~~~~~~~~~~~~

etc.

And

| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3811:14: error: 'char* strncat(char*, const char*, size_t)' specified bound 1 equals source length [-Werror=stringop-overflow=]
|        strncat(shared_archive_path, os::file_separator(), file_sep_len);
|        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp: In static member function 'static void Arguments::fix_appclasspath()':
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
|      strncpy(copy, src, strlen(src) + 1);
|      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:30: note: length computed here
|      strncpy(copy, src, strlen(src) + 1);
|                         ~~~~~~^~~~~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
|      strncpy(copy, src, strlen(src) + 1);
|      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| <<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:30: note: length computed here
|      strncpy(copy, src, strlen(src) + 1);
|                         ~~~~~~^~~~~

etc.

With this,
bitbake -c testimage openjdk-8-test-image
works again:
RESULTS:
RESULTS - ping.PingTest.test_ping - Testcase 964: PASSED (0.12s) RESULTS - ssh.SSHTest.test_ssh - Testcase 224: PASSED (1.20s) RESULTS - java.JavaTest.test_java_exists - Testcase -1: PASSED (0.15s) RESULTS - java.JavaTest.test_java_jar_comp_mode - Testcase -1: PASSED (41.98s) RESULTS - java.JavaTest.test_java_jar_int_mode - Testcase -1: PASSED (1.76s) RESULTS - java.JavaTest.test_java_jar_works - Testcase -1: PASSED (2.13s) RESULTS - java.JavaTest.test_java_version - Testcase -1: PASSED (1.51s) RESULTS - javac.JavacTest.test_javac_exists - Testcase -1: PASSED (0.11s) RESULTS - javac.JavacTest.test_javac_works - Testcase -1: PASSED (17.64s) SUMMARY:
openjdk-8-test-image () - Ran 9 tests in 67.112s openjdk-8-test-image - OK - All required tests passed

---
 recipes-core/openjdk/openjdk-8-common.inc | 1 +
 1 file changed, 1 insertion(+)
recipes-core/openjdk/openjdk-8-common.inc +1 -0
index 3b328e9..79af54a 100644
@@ -216,6 +216,7 @@ EXTRA_OECONF_append = "\
 # of these changes.
 FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
+FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks -Wno-error=stringop-overflow -Wno-error=return-type"
 
 # All supported cross compilers support the compiler flags that were
 # added to make compilation with gcc6 work. But the host compiler for
Signature · 1 line
2.18.0
#4 lore raw

Re: [meta-java][master-next][PATCH 4/4] openjdk-8: update to work with gcc v8

Argh, this last one still doesn't work, because of weird CFLAGS / CXXFLAGS in this recipe :-(

We end up adding command line options to gcc based on the cross gcc version, but openjdk uses the same ones for native tools compilation, which fails.

A,

Quoted 98 lines · André Draszik

From: André Draszik <[email protected]>

Similar to the existing gcc-6 and gcc-7 support, we need to add the same specific compiler flags to avoid miscompilation on gcc-8:
-fno-lifetime-dse -fno-delete-null-pointer-checks

In addition, gcc v8 introduces new warnings (which are treated as errors), which we can just silence for the time being:

Quoted 9 lines

<<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp :223:32: error: control reaches end of non-void function [- Werror=return-type]

 #define BREAKPOINT ::breakpoint()
                    ~~~~~~~~~~~~^~
<<PKGBUILDDIR>>/hotspot/src/share/vm/utilities/debug.hpp:192:3: note: in
expansion of macro 'BREAKPOINT'
   BREAKPOINT;                                                          
      \
Quoted 5 lines

^~~~~~~~~~
<<PKGBUILDDIR>>/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp:1 97:2: note: in expansion of macro 'ShouldNotReachHere'
ShouldNotReachHere();
^~~~~~~~~~~~~~~~~~

etc.

And

Quoted 21 lines

<<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3811:14:
error: 'char* strncat(char*, const char*, size_t)' specified bound 1 equals source length [-Werror=stringop-overflow=]

       strncat(shared_archive_path, os::file_separator(), file_sep_len);
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp: In static member function 'static void Arguments::fix_appclasspath()':
<<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:12:
error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop- overflow=]

     strncpy(copy, src, strlen(src) + 1);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
<<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:30:
note: length computed here
     strncpy(copy, src, strlen(src) + 1);
                        ~~~~~~^~~~~

<<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:12:
error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop- overflow=]

Quoted 6 lines
     strncpy(copy, src, strlen(src) + 1);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
<<PKGBUILDDIR>>/hotspot/src/share/vm/runtime/arguments.cpp:3433:30:
note: length computed here
     strncpy(copy, src, strlen(src) + 1);
                        ~~~~~~^~~~~

etc.

With this,
bitbake -c testimage openjdk-8-test-image
works again:
RESULTS:
RESULTS - ping.PingTest.test_ping - Testcase 964: PASSED (0.12s) RESULTS - ssh.SSHTest.test_ssh - Testcase 224: PASSED (1.20s) RESULTS - java.JavaTest.test_java_exists - Testcase -1: PASSED (0.15s) RESULTS - java.JavaTest.test_java_jar_comp_mode - Testcase -1: PASSED (41.98s)
RESULTS - java.JavaTest.test_java_jar_int_mode - Testcase -1: PASSED (1.76s)
RESULTS - java.JavaTest.test_java_jar_works - Testcase -1: PASSED (2.13s) RESULTS - java.JavaTest.test_java_version - Testcase -1: PASSED (1.51s) RESULTS - javac.JavacTest.test_javac_exists - Testcase -1: PASSED (0.11s) RESULTS - javac.JavacTest.test_javac_works - Testcase -1: PASSED (17.64s) SUMMARY:
openjdk-8-test-image () - Ran 9 tests in 67.112s openjdk-8-test-image - OK - All required tests passed

---
 recipes-core/openjdk/openjdk-8-common.inc | 1 +
 1 file changed, 1 insertion(+)
recipes- renamed from recipes-core/openjdk/openjdk-8-common.inc +0 -0

core/openjdk/openjdk-8-common.inc
index 3b328e9..79af54a 100644

recipes-core/openjdk/openjdk-8-common.inc +1 -0
@@ -216,6 +216,7 @@ EXTRA_OECONF_append = "\
 # of these changes.
 FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
 FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
+FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks -Wno-

error=stringop-overflow -Wno-error=return-type"

# All supported cross compilers support the compiler flags that were

 # added to make compilation with gcc6 work. But the host compiler for
#5 lore raw
In reply to André Draszik

Please ignore this series, I'll send a mew one.

A.

Quoted 22 lines · André Draszik

From: André Draszik <[email protected]>

Since we run oeqa tests, we get python byte-code in the source tree here.

Ignore them to clean-up the git status

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 51a512c..8e5c599 100644
@@ -1,4 +1,5 @@
 *.bak
 *.orig
+*.pyc
 *.rej
 *.swp
#6 lore raw
Quoted 1 line · André Draszik

Please ignore this series, I'll send a mew one.

ok. thanks for the info.

regards;Richard.L