ftbfs due to missing headers when pch is disabled

Bug #1617379 reported by Tiago Stürmer Daitx
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-6 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When pre-compiled headers are disabled the build fails due to psOldGen.hpp being missing from a few headers.

The fix is to apply the same patch that openjdk-7 has (debian/patches/no-pch-build.patch) and to update the rules from:

ifneq (,$(filter $(DEB_HOST_ARCH), sparc64))
  export DISABLE_PRECOMPILED_HEADER=1
endif

to:

ifneq (,$(filter $(DEB_HOST_ARCH), arm64 sparc64))
  export USE_PRECOMPILED_HEADER=0
  DISTRIBUTION_PATCHES += \
        debian/patches/no-pch-build.diff
endif

As arm64 segfaults when using pch.

Error bellow (forcefully disabled pch on amd64):

Compiling /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp
rm -f asPSOldGen.o
x86_64-linux-gnu-g++-4.8 -DLINUX -D_GNU_SOURCE -DAMD64 -DPRODUCT -I/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/prims -I/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm -I/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/precompiled -I/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/cpu/x86/vm -I/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/os_cpu/linux_x86/vm -I/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/os/linux/vm -I/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"23.40-b40\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"tdaitx\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DDERIVATIVE_ID="\"IcedTea6 1.13.12\"" -DDISTRIBUTION_ID="\"Ubuntu 14.04.4 LTS, package 6b40-1.13.12-0ubuntu0.14.04.1\"" -DDEB_MULTIARCH="\"x86_64-linux-gnu\"" -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -std=gnu++98 -fpic -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -DDONT_USE_PRECOMPILED_HEADER -g -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE -Wpointer-arith -Wsign-compare -c -MMD -MP -MF ../generated/dependencies/asPSOldGen.o.d -o asPSOldGen.o /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSOldGen.cpp
In file included from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/oops/arrayKlassKlass.cpp:33:0:
/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp: In member function 'oopDesc* PSPromotionManager::copy_to_survivor_space(oop)':
/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp:131:37: error: invalid use of incomplete type 'class PSOldGen'

            new_obj = (oop)old_gen()->cas_allocate(new_obj_size);
                                     ^
In file included from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp:30:0,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp:32,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/oops/oop.inline.hpp:29,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/classfile/classFileParser.hpp:30,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/classfile/classLoader.hpp:28,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/classfile/systemDictionary.hpp:29,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/classfile/javaClasses.hpp:28,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/oops/arrayKlassKlass.cpp:26:
/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp:38:7: error: forward declaration of 'class PSOldGen'
 class PSOldGen;
       ^
In file included from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/oops/arrayKlassKlass.cpp:33:0:
/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp:136:43: error: invalid use of incomplete type 'class PSOldGen'
             HeapWord* lab_base = old_gen()->cas_allocate(OldPLABSize);
                                           ^
In file included from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp:30:0,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp:32,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/oops/oop.inline.hpp:29,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/classfile/classFileParser.hpp:30,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/classfile/classLoader.hpp:28,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/classfile/systemDictionary.hpp:29,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/classfile/javaClasses.hpp:28,
                 from /home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/oops/arrayKlassKlass.cpp:26:
/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp:38:7: error: forward declaration of 'class PSOldGen'
 class PSOldGen;
       ^
make[8]: *** [arrayKlassKlass.o] Error 1
make[8]: *** Waiting for unfinished jobs....
make[8]: Leaving directory `/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk.build-ecj/hotspot/outputdir/linux_amd64_compiler2/product'
make[7]: *** [the_vm] Error 2
make[7]: Leaving directory `/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk.build-ecj/hotspot/outputdir/linux_amd64_compiler2/product'
make[6]: *** [product] Error 2
make[6]: Leaving directory `/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk.build-ecj/hotspot/outputdir'
make[5]: *** [generic_build2] Error 2
make[5]: Leaving directory `/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/make'
make[4]: *** [product] Error 2
make[4]: Leaving directory `/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj/hotspot/make'
make[3]: *** [hotspot-build] Error 2
make[3]: Leaving directory `/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj'
make[2]: *** [build_product_image] Error 2
make[2]: Leaving directory `/home/tdaitx/openjdk-6-6b40-1.13.12/build/openjdk-ecj'
make[1]: *** [stamps/icedtea-ecj.stamp] Error 2
make[1]: Leaving directory `/home/tdaitx/openjdk-6-6b40-1.13.12/build'
make: *** [stamps/build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-6 - 6b40-1.13.12-0ubuntu0.14.04.2

---------------
openjdk-6 (6b40-1.13.12-0ubuntu0.14.04.2) trusty-security; urgency=medium

  * Disable precompiled header for arm64 (LP: #1617379)
    - debian/rules: replace DISABLE_PRECOMPILED_HEADER=1 with
      USE_PRECOMPILED_HEADER=0 and apply no-pch-build.diff as
      well as zero-missing-headers.diff
    - debian/patches/no-pch-build.diff: include missing psOldGen.hpp to
      various headers
    - debian/patches/zero-missing-headers.diff: missing headers for zero
  * Create watch file for package updates
    - debian/watch: fetch newest icedtea and call debian/repack
    - debian/repack: unpack icedtea tarball, parse the Makefile.am,
      download the right version of openjdk-6-src/cacao/jamvm, repack
  * debian/rules:
    - extract OPENJDK_VERSION from changelog
    - remove dependency on OPENJDK_SRC_ZIP and use OPENJDK_VERSION to
      select the right tarball
    - remove hs20 hotspot rules as we are only relying on "original"
    - call autogen.sh during the build and remove auto-generated files
  * Updated source format to 3.0 (quilt)
    - patches/it-add-cpp-flags.patch: added.
    - patches/it-automake-1.11.patch: added.
    - patches/it-emacs-mode.patch: added.
    - patches/it-enable-aarch64.patch: added.
    - patches/it-jamvm-2.0.0.patch: added.
    - patches/icedtea-patch.diff: removed.

openjdk-6 (6b40-1.13.12-0ubuntu0.14.04.1) trusty-security; urgency=low

  * IcedTea 1.13.12 release.
  * Security fixes
    - S8079718, CVE-2016-3458: IIOP Input Stream Hooking
    - S8145446, CVE-2016-3485: Perfect pipe placement (Windows only)
    - S8147771: Construction of static protection domains under Javax
      custom policy
    - S8148872, CVE-2016-3500: Complete name checking
    - S8149962, CVE-2016-3508: Better delineation of XML processing
    - S8150752: Share Class Data
    - S8151925: Font reference improvements
    - S8152479, CVE-2016-3550: Coded byte streams
    - S8155981, CVE-2016-3606: Bolster bytecode verification
  * icedtea-patch.diff: updated to use new build variables; removed ecj
    override as it is applied upstream
  * debian/patches/icedtea-pretend-memory.diff: updated patch to reflect
    changes in openjdk-6
  * debian/rules: disable headers for arm64; updated to use new
    openjdk-6-6b40 tarball

 -- Tiago Stürmer Daitx <email address hidden> Fri, 26 Aug 2016 15:36:38 +0000

Changed in openjdk-6 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.