Bug#831153: Fix for the openjdk-8-jre-dcevm FTBFS

2016-10-18 Thread Adrian Bunk
On Tue, Oct 18, 2016 at 12:49:32PM +0200, Emmanuel Bourg wrote:
> Thank you very much for the patch Adrian, I confirm it works. I'll
> upload a new version soon.
> 
> What is the recommended way to depend on GCC? Should the package depend
> on g++ (>= 4:6), or should it depend on gcc-6 with a build adjusted to
> use it?

Recommended is no build dependency (g++ is build-essential), and since 
the upstream build uses gcc/g++ on Linux by default it is already fine 
for that.

> Emmanuel Bourg

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed



Bug#831153: Fix for the openjdk-8-jre-dcevm FTBFS

2016-10-18 Thread Emmanuel Bourg
Thank you very much for the patch Adrian, I confirm it works. I'll
upload a new version soon.

What is the recommended way to depend on GCC? Should the package depend
on g++ (>= 4:6), or should it depend on gcc-6 with a build adjusted to
use it?

Emmanuel Bourg



Bug#831153: Fix for the openjdk-8-jre-dcevm FTBFS

2016-10-17 Thread Adrian Bunk
Control: tags -1 -help
Control: tags -1 +patch

There are 5 different issues regarding this FTBFS and attempts to 
resolve it:

1. Changing the build dependencies doesn't change the compiler.
Adding g++-5 resulted in #835956, but when you don't tell the build
system of the software to use this compiler the default g++ is still
used.
This explains why that build dependency didn't help
(but point 2 is a better solution).

2. --std=gnu++98 fixes the C++ related build failure.

3. readdir_r() is deprecated in latest glibc.
This generates a new warning, and openjdk-8-jre-dcevm turns all warnings 
into errors by passing -Werror to the compiler.

4. Upstream uses CFLAGS instead of CXXFLAGS for C++
This is a bug somewhere in the upstream code,
using DEB_CXXFLAGS_MAINT_APPEND didn't work.

5. I didn't encounter the original build failure due to missing jvmti.h
It seems the file from openjdk-8-jdk-headless was found successfully?


The following change gave me a successful build:

--- debian/rules.old2016-10-17 15:48:31.0 +
+++ debian/rules2016-10-17 15:49:00.0 +
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export DEB_CFLAGS_MAINT_APPEND = -std=gnu++98 
-Wno-error=deprecated-declarations
+
 PACKAGE = $(shell dpkg-parsechangelog -S Source)
 
 export DISABLE_HOTSPOT_OS_VERSION_CHECK=ok




cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed