+++ tony [2016-02-11 07:43 -0800]:
> Hi Wookey,
>
> Just a quick response - I haven't yet had any time to dig into this in
> any detail, but also didn't want your email to go un-answered.

cheers

> First of all, thank you for working on this!  I don't have any direct
> involvement with openvrml aside from trying to keep it in (and others
> like it) in the archive when it seems like there is a userbase.

Yeah. I was expecting just to apply a simple dh_autoreconf fix to
support new arches, but it's led down this rabbithole...

If you simply skip the two patches 010_sdl_example.diff and
020_rebootstrap.diff (which just seem to try and replace sdl-viewer
with lookat, and then deal with that fallout in autotools), then the build gets 
a bit further but now fails with

~/bin/bash ../libtool  --tag=CXX   --mode=link g++ -I/usr/include/SDL 
-D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/freetype2 -g -Os 
-I/usr/lib/jvm/default-java//include -I/usr/lib/jvm/default-java//include/linux 
-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security 
-L/usr/lib/aarch64-linux-gnu -lSDL -lGLU -lfontconfig -lfreetype -fPIE -pie 
-Wl,-z,relro -Wl,-z,now -o sdl-viewer sdl_viewer-sdl_viewer.o 
../src/libopenvrml-gl/libopenvrml-gl.la -lboost_system
libtool: link: g++ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT 
-I/usr/include/freetype2 -g -Os -I/usr/lib/jvm/default-java//include 
-I/usr/lib/jvm/default-java//include/linux -g -O2 -fPIE 
-fstack-protector-strong -Wformat -Werror=format-security -fPIE -pie -Wl,-z 
-Wl,relro -Wl,-z -Wl,now -o .libs/sdl-viewer sdl_viewer-sdl_viewer.o  
-L/usr/lib/aarch64-linux-gnu -lSDL -lGLU -lfontconfig 
/usr/lib/aarch64-linux-gnu/libfreetype.so 
../src/libopenvrml-gl/.libs/libopenvrml-gl.so -lboost_system -pthread
/usr/bin/aarch64-linux-gnu-ld.bfd.real: sdl_viewer-sdl_viewer.o: undefined 
reference to symbol '_ZN8openvrml19x3d_vrml_media_typeE'
//home/wookey/NMU/pending/openvrml-0.18.9/src/libopenvrml/.libs/libopenvrml.so.9:
 error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:451: recipe for target 'sdl-viewer' failed~

It would be helpful to know from the maintainer what this
s/sdl-viewer/lookat/ stuff is/was for. Given that lookat.cpp was
removed a decade ago according to the changelog I am confused. It
looks like maybe the patch was intended to use the new sdl-viewer
code, but have the binary still come out as 'lookat', possibly because
that's what users were used to? But in that case making a link at the
end (after the build) would be much simpler.

Re the above error: _ZN8openvrml19x3d_vrml_media_typeE does exist in
libopenvrml.so.9.1.1, the code being in browser.cpp, and adding
../src/libopenvrml/libopenvrml.la to the build line makes it work.

OK. So there turn out to be several issues due to the debian patches
patching the Makefile and Makefile.in, and configure, either instead
of the Makefile.am, and configure.ac, or doing the two differently!

autoreconfing, brings these issues to the fore.

So. I have now

1) Made 010_sdl_example.diff patch examples/Makefile.am to say that
lookat depend on sdl-viewer.cpp instead of the noni-existant
lookat.cpp.

2) Made 010_sdl_example.diff patch examples/Makefile.am to say that
'lookat' should be linked against libopenvrml as well as
libopenvrml-gl (how did this ever build? Is it different on arm64?
seems unlikely)

3) removed the 020_rebootstrap patch fro the series as that was
essentially patching in the results of a dh-autoreconf

4) Fixed 030_doc_makefile to patch Makefile.am, not Makefile.in
(patching both is pointless now that there is a dh-autoreconf, and
breaks the clean rule because makefile.in got regenerated and quilt
can't unpatch it)

5) Change 040_Update-path-of-libjvm-and-arch-name.diff to patch
configure.ac instead of generated configure

This gets me further than before but the examples are still failing to
build with a missing boost symbol (now on pretty-print rather than 
sdl-viewer/lookat):

/bin/bash ../libtool  --tag=CXX   --mode=link g++  -g -Os 
-I/usr/lib/jvm/default-java//include -I/usr/lib/jvm/default-java//include/linux 
-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security  -fPIE 
-pie -Wl,-z,relro -Wl,-z,now -o pretty-print pretty_print-pretty_print.o 
../src/libopenvrml/libopenvrml.la -lboost_system

Adding -lboost_thread fixes that.

But now I am left with a question (how did this ever build before? Oh,
no, not that question :-) ): where is teh right place to fix this?
that -lboost_system comes from configure. There is nothing special in 
example/Makefile.am:

pretty_print_SOURCES = pretty_print.cpp
pretty_print_CPPFLAGS = \
        -I$(top_builddir)/src/libopenvrml \
        -I$(top_srcdir)/src/libopenvrml
pretty_print_LDADD = $(top_builddir)/src/libopenvrml/libopenvrml.la

In the exsiting amd64 build log the smae command:
/bin/bash ../libtool --tag=CXX   --mode=link g++  -g -Os 
-I/usr/lib/jvm/default-java//include -g -O2 -fPIE -fstack-protector-strong 
-Wformat -Werror=format-security  -fPIE -pie -Wl,-z,relro -Wl,-z,now -o 
pretty-print pretty_print-pretty_print.o ../src/libopenvrml/libopenvrml.la 
-lboost_system

exapnds to ~libtool: link: g++ -g -Os -I/usr/lib/jvm/default-java//include -g 
-O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -fPIE -pie 
-Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/pretty-print 
pretty_print-pretty_print.o  ../src/libopenvrml/.libs/libopenvrml.so -lxml2 
/usr/lib/x86_64-linux-gnu/libltdl.so -ldl -lboost_thread -lboost_filesystem 
-lboost_system -pthread

(i.e '-lboost_system' is expanded to '-lboost_thread
-lboost_filesystem -lboost_system -pthread') On arm64 (and after
dh-autoreconfing) that's not happening. Guess I'd better test this
build on amd64 and see if I get the same failure).

Anyway, does anyone reading understand how the boost libs get expanded
and where the right place to poke this is to get it to build?

> I can file a transition bug if we want to go that route.  The primary
> benenfit I see there is that the buildds will automatically do binNMUs
> of the r-deps, so for a package with a small set of r-deps, maybe it's
> not worth it.  I will take a look at that.

Someone said that there were no rdeps in debian, only (potentially externally).

> As far as performing an upload, I should be able to do it without
> requiring an NMU.  I'll take a look at that too, but it make take a week
> or so.

OK. attached is my current not-quite-working patch (as discussed above)



Wookey
--
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/
diff -Nru openvrml-0.18.9/debian/.pc/.quilt_patches openvrml-0.18.9/debian/.pc/.quilt_patches
diff -Nru openvrml-0.18.9/debian/.pc/.quilt_series openvrml-0.18.9/debian/.pc/.quilt_series
diff -Nru openvrml-0.18.9/debian/.pc/.version openvrml-0.18.9/debian/.pc/.version
diff -Nru openvrml-0.18.9/debian/changelog openvrml-0.18.9/debian/changelog
--- openvrml-0.18.9/debian/changelog	2016-02-12 18:15:56.000000000 +0000
+++ openvrml-0.18.9/debian/changelog	2016-02-12 18:15:57.000000000 +0000
@@ -1,3 +1,18 @@
+openvrml (0.18.9-7.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Package is listed as LowNMU.
+  * Use dh-autoreconf so that new architectures build 
+    (Closes: #755840 #765282)
+  * Address FTBFS with OpenJDK 8. (Closes: #748045, #760928)
+     Thanks to Emmanuel Bourg for the patches.
+     - Updates cflags and cxxflags to include JAVA_HOME/include/linux
+     - Adds 0004-java8-compatibility.patch.
+  * Fixup sdl-viewer->lookat rename debian examples patch to work after autoreconfing
+    replaces 'rebootstrap' patch
+
+ -- Wookey <woo...@debian.org>  Wed, 10 Feb 2016 19:50:28 +0000
+
 openvrml (0.18.9-7) unstable; urgency=medium
 
   * Remove xulrunner-dev from Build-Depends. (Closes: #751561)
diff -Nru openvrml-0.18.9/debian/control openvrml-0.18.9/debian/control
--- openvrml-0.18.9/debian/control	2016-02-12 18:15:56.000000000 +0000
+++ openvrml-0.18.9/debian/control	2016-02-12 18:15:57.000000000 +0000
@@ -11,7 +11,7 @@
 	libboost-thread-dev, libboost-filesystem-dev, libgtk2.0-dev,
 	libxmu-dev, procps, graphviz, libgnomeui-dev, libglade2-dev,
 	libcurl4-gnutls-dev, libgtkglext1-dev, libltdl-dev,
-	libdbus-glib-1-dev, ghostscript, doxygen-latex
+	libdbus-glib-1-dev, ghostscript, doxygen-latex, dh-autoreconf
 Standards-Version: 3.9.5
 Vcs-Git: git://git.debian.org/git/collab-maint/openvrml.git
 Vcs-Browser: http://git.debian.org/?p=collab-maint/openvrml.git;a=summary
diff -Nru openvrml-0.18.9/debian/patches/0004-java8-compatibility.patch openvrml-0.18.9/debian/patches/0004-java8-compatibility.patch
--- openvrml-0.18.9/debian/patches/0004-java8-compatibility.patch	1970-01-01 00:00:00.000000000 +0000
+++ openvrml-0.18.9/debian/patches/0004-java8-compatibility.patch	2016-02-12 18:15:57.000000000 +0000
@@ -0,0 +1,16 @@
+Description: Fixes the installation of the javadoc generated by Java 8
+Author: Emmanuel Bourg <ebo...@apache.org>
+Forwarded: no
+Index: openvrml-0.18.9/doc/Makefile.am
+===================================================================
+--- openvrml-0.18.9.orig/doc/Makefile.am
++++ openvrml-0.18.9/doc/Makefile.am
+@@ -138,8 +138,6 @@ install-data-local: installdirs-local
+                         $(DESTDIR)$(docdir)/manual
+ 	$(INSTALL_DATA) $(JAVADOC_FILES) \
+                         $(DESTDIR)$(javadocdir)
+-	$(INSTALL_DATA) $(JAVADOC_RESOURCES_FILES) \
+-                        $(DESTDIR)$(javadocdir)/resources
+ 	$(INSTALL_DATA) $(JAVADOC_VRML_FILES) \
+                         $(DESTDIR)$(javadocdir)/vrml
+ 	$(INSTALL_DATA) $(JAVADOC_VRML_FIELD_FILES) \
diff -Nru openvrml-0.18.9/debian/patches/010_sdl_example.diff openvrml-0.18.9/debian/patches/010_sdl_example.diff
--- openvrml-0.18.9/debian/patches/010_sdl_example.diff	2016-02-12 18:15:56.000000000 +0000
+++ openvrml-0.18.9/debian/patches/010_sdl_example.diff	2016-02-12 18:15:57.000000000 +0000
@@ -1,7 +1,7 @@
-diff --git a/examples/Makefile.am b/examples/Makefile.am
-index d2c5ea1..187faf8 100644
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
+Index: openvrml-0.18.9/examples/Makefile.am
+===================================================================
+--- openvrml-0.18.9.orig/examples/Makefile.am
++++ openvrml-0.18.9/examples/Makefile.am
 @@ -1,27 +1,29 @@
 +bin_PROGRAMS = lookat
 +
@@ -27,7 +27,7 @@
  
 -sdl_viewer_SOURCES = sdl_viewer.cpp
 -sdl_viewer_CPPFLAGS = \
-+lookat_SOURCES = lookat.cpp
++lookat_SOURCES = sdl_viewer.cpp
 +lookat_CPPFLAGS = \
          -I$(top_builddir)/src/libopenvrml \
          -I$(top_srcdir)/src/libopenvrml \
@@ -38,7 +38,7 @@
 -sdl_viewer_LDADD = $(top_builddir)/src/libopenvrml-gl/libopenvrml-gl.la
 +lookat_CXXFLAGS = $(SDL_CFLAGS) $(FONTCONFIG_CFLAGS)
 +lookat_LDFLAGS = $(SDL_LIBS) $(GLU_LIBS) $(FONTCONFIG_LIBS)
-+lookat_LDADD = $(top_builddir)/src/libopenvrml-gl/libopenvrml-gl.la
++lookat_LDADD = $(top_builddir)/src/libopenvrml-gl/libopenvrml-gl.la $(top_builddir)/src/libopenvrml/libopenvrml.la
  
  pretty_print_SOURCES = pretty_print.cpp
  pretty_print_CPPFLAGS = \
diff -Nru openvrml-0.18.9/debian/patches/030_doc_makefile.diff openvrml-0.18.9/debian/patches/030_doc_makefile.diff
--- openvrml-0.18.9/debian/patches/030_doc_makefile.diff	2016-02-12 18:15:56.000000000 +0000
+++ openvrml-0.18.9/debian/patches/030_doc_makefile.diff	2016-02-12 18:15:57.000000000 +0000
@@ -1,8 +1,8 @@
-diff --git a/doc/Makefile.in b/doc/Makefile.in
-index 234780f..a2bea76 100644
---- a/doc/Makefile.in
-+++ b/doc/Makefile.in
-@@ -299,7 +299,6 @@ DOCUMENTED_SOURCE_FILES = \
+Index: openvrml-0.18.9/doc/Makefile.am
+===================================================================
+--- openvrml-0.18.9.orig/doc/Makefile.am
++++ openvrml-0.18.9/doc/Makefile.am
+@@ -57,7 +57,6 @@ DOCUMENTED_SOURCE_FILES = \
  DOXYGEN_OUTPUT_FILES = \
          $(srcdir)/manual/*.css \
          $(srcdir)/manual/*.html \
@@ -10,7 +10,7 @@
          $(srcdir)/manual/*.map \
          $(srcdir)/manual/*.md5 \
          $(srcdir)/manual/*__incl.png \
-@@ -310,7 +309,6 @@ DOXYGEN_OUTPUT_FILES = \
+@@ -68,7 +67,6 @@ DOXYGEN_OUTPUT_FILES = \
          $(srcdir)/manual/formula.repository \
          $(srcdir)/manual/form_*.png \
          $(srcdir)/manual/graph_legend.png \
diff -Nru openvrml-0.18.9/debian/patches/040_Update-path-of-libjvm-and-arch-name.diff openvrml-0.18.9/debian/patches/040_Update-path-of-libjvm-and-arch-name.diff
--- openvrml-0.18.9/debian/patches/040_Update-path-of-libjvm-and-arch-name.diff	2016-02-12 18:15:56.000000000 +0000
+++ openvrml-0.18.9/debian/patches/040_Update-path-of-libjvm-and-arch-name.diff	2016-02-12 18:15:57.000000000 +0000
@@ -9,33 +9,11 @@
  src/script/java.cpp |    4 ++--
  2 files changed, 5 insertions(+), 3 deletions(-)
 
-diff --git a/configure b/configure
-index e870dd6..b683fd4 100755
---- a/configure
-+++ b/configure
-@@ -21355,6 +21355,8 @@ case $target_cpu in
-      i?86)      OPENVRML_JVM_ARCH=i386 ;;
-      powerpc64) OPENVRML_JVM_ARCH=ppc64 ;;
-      powerpc)   OPENVRML_JVM_ARCH=ppc ;;
-+     hppa)      OPENVRML_JVM_ARCH=parisc;;
-+     sh*)       OPENVRML_JVM_ARCH=sh ;;
-      *)         OPENVRML_JVM_ARCH=$target_cpu ;;
- esac
- 
-@@ -21375,7 +21377,7 @@ if test -z "${JAVA_HOME+x}"; then :
- $as_echo "$as_me: WARNING: JAVA_HOME has not been set.  JAVA_HOME must be set at run time to locate libjvm." >&2;}
- else
-   ov_save_LDFLAGS=$LDFLAGS
--LDFLAGS="-L$JAVA_HOME/lib/$OPENVRML_JVM_ARCH/client -L$JAVA_HOME/lib/$OPENVRML_JVM_ARCH/server $LDFLAGS"
-+LDFLAGS="-L$JAVA_HOME/jre/lib/$OPENVRML_JVM_ARCH/client -L$JAVA_HOME/jre/lib/$OPENVRML_JVM_ARCH/server $LDFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI_CreateJavaVM in -ljvm" >&5
- $as_echo_n "checking for JNI_CreateJavaVM in -ljvm... " >&6; }
- if test "${ac_cv_lib_jvm_JNI_CreateJavaVM+set}" = set; then :
-diff --git a/src/script/java.cpp b/src/script/java.cpp
-index b8c8536..03e9c70 100644
---- a/src/script/java.cpp
-+++ b/src/script/java.cpp
-@@ -128,14 +128,14 @@ namespace {
+Index: openvrml-0.18.9/src/script/java.cpp
+===================================================================
+--- openvrml-0.18.9.orig/src/script/java.cpp
++++ openvrml-0.18.9/src/script/java.cpp
+@@ -126,14 +126,14 @@ namespace {
          {
              ostringstream libdir;
              libdir.exceptions(exceptions);
@@ -52,6 +30,25 @@
              result = dl::prepend_to_searchpath(libdir.str().c_str());
              if (result != 0) { return result; }
          }
--- 
-1.7.1
-
+Index: openvrml-0.18.9/configure.ac
+===================================================================
+--- openvrml-0.18.9.orig/configure.ac
++++ openvrml-0.18.9/configure.ac
+@@ -507,6 +507,8 @@ case $target_cpu in
+      i?86)      OPENVRML_JVM_ARCH=i386 ;;
+      powerpc64) OPENVRML_JVM_ARCH=ppc64 ;;
+      powerpc)   OPENVRML_JVM_ARCH=ppc ;;
++     hppa)      OPENVRML_JVM_ARCH=parisc;;
++     sh*)       OPENVRML_JVM_ARCH=sh ;;
+      *)         OPENVRML_JVM_ARCH=$target_cpu ;;
+ esac
+ AC_SUBST([OPENVRML_JVM_ARCH])
+@@ -518,7 +520,7 @@ AC_DEFINE_UNQUOTED([OPENVRML_JNI_CONST],
+ AS_IF([test -z "${JAVA_HOME+x}"],
+ [AC_MSG_WARN([JAVA_HOME has not been set.  JAVA_HOME must be set at run time to locate libjvm.])],
+ [ov_save_LDFLAGS=$LDFLAGS
+-LDFLAGS="-L$JAVA_HOME/lib/$OPENVRML_JVM_ARCH/client -L$JAVA_HOME/lib/$OPENVRML_JVM_ARCH/server $LDFLAGS"
++LDFLAGS="-L$JAVA_HOME/jre/lib/$OPENVRML_JVM_ARCH/client -L$JAVA_HOME/jre/lib/$OPENVRML_JVM_ARCH/server $LDFLAGS"
+ AC_CHECK_LIB([jvm], [JNI_CreateJavaVM], [LIBS=$LIBS],
+              [AC_MSG_WARN([no libjvm found at JAVA_HOME])])
+ LDFLAGS=$ov_save_LDFLAGS
diff -Nru openvrml-0.18.9/debian/patches/series openvrml-0.18.9/debian/patches/series
--- openvrml-0.18.9/debian/patches/series	2016-02-12 18:15:56.000000000 +0000
+++ openvrml-0.18.9/debian/patches/series	2016-02-12 18:15:57.000000000 +0000
@@ -1,5 +1,5 @@
 010_sdl_example.diff
-020_rebootstrap.diff
+#020_rebootstrap.diff
 030_doc_makefile.diff
 040_Update-path-of-libjvm-and-arch-name.diff
 050_fix_ftbfs_with_format_security.diff
@@ -7,3 +7,4 @@
 0001-Remove-JavaScript-code-of-Google-Analytics.patch
 0002-Remove-JavaScript-code-of-Piwik.patch
 0003-Remove-logo-of-SF.patch
+0004-java8-compatibility.patch
diff -Nru openvrml-0.18.9/debian/rules openvrml-0.18.9/debian/rules
--- openvrml-0.18.9/debian/rules	2016-02-12 18:15:56.000000000 +0000
+++ openvrml-0.18.9/debian/rules	2016-02-12 18:15:57.000000000 +0000
@@ -14,8 +14,8 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
-cflags = -g -Os -I$(JAVA_HOME)/include $(CFLAGS)
-cxxflags = -g -Os -I$(JAVA_HOME)/include $(CXXFLAGS)
+cflags = -g -Os -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux $(CFLAGS)
+cxxflags = -g -Os -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux $(CXXFLAGS)
 ldflags = $(LDFLAGS)
 
 confflags = --prefix=/usr \
@@ -44,6 +44,7 @@
 configure-stamp:
 	dh_testdir
 	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
+	dh_autoreconf
 	LIBS="-lboost_system" BOOST_LIB_SUFFIX="" ./configure $(confflags)
 	touch configure-stamp
 
@@ -75,6 +76,7 @@
 	#	|xargs rm -f
 	#
 
+	dh_autoreconf_clean
 	dh_clean
 
 install: build

Attachment: signature.asc
Description: Digital signature

Reply via email to