+++ 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