Hi,
On Sat, Jan 07, 2012 at 02:37:58AM +0000, peter green wrote:
> >https://buildd.debian.org/status/package.php?p=ns2&suite=sid
> ><https://buildd.debian.org/status/package.php?p=ns2&suite=sid>
> >
> >The package fails to configure because of missing otcl:
> Well it's not exactly "missing", the package is in the archive
> and it was installed for the build, so the question was why
> isn't the configure script finding it.
>
> The cause is multiarchification of the otcl packaging. Lukilly
> it's pretty easy to workaround from debian/rules.
(Please find also a complete diff, because the one Peter provided is not
complete, some syntax issues in debian/control for example)
I've reached the same status, it now needs to fix a bug due to GCC 4.7, patch
attached.
I don't understand the link failure either.
> Not so lukilly after doing so I get link failures :( and I can't
> figure out the cause.
[...]
> -L/usr/lib/x86_64-linux-gnu -ltclcl -L/usr/lib/x86_64-linux-gnu
> -lotcl -L/usr/lib -ltk8.5 -L/usr/lib -ltcl8.5
> -L/usr/lib/x86_64-linux-gnu -lXext -lX11 -lnsl -lpcap -ldl -lm -lm
> tools/queue-monitor.o: In function `QueueMonitor::QueueMonitor()':
> queue-monitor.cc:(.text._ZN12QueueMonitorC2Ev[_ZN12QueueMonitorC5Ev]+0x202):
> undefined reference to `TclObject::bind(char const*, long*)'
> queue-monitor.cc:(.text._ZN12QueueMonitorC2Ev[_ZN12QueueMonitorC5Ev]+0x21b):
> undefined reference to `TclObject::bind(char const*, long*)'
> queue-monitor.cc:(.text._ZN12QueueMonitorC2Ev[_ZN12QueueMonitorC5Ev]+0x234):
> undefined reference to `TclObject::bind(char const*, long*)'
> queue-monitor.cc:(.text._ZN12QueueMonitorC2Ev[_ZN12QueueMonitorC5Ev]+0x24d):
> undefined reference to `TclObject::bind(char const*, long*)'
> packmime/packmime_OL.o: In function `PackMimeOpenLoop::PackMimeOpenLoop()':
> packmime_OL.cc:(.text+0x85): undefined reference to `TclObject::bind(char
> const*, long*)'
> collect2: ld returned 1 exit status
> make[1]: *** [ns] Error 1
> make[1]: Leaving directory `/ns2-2.35~rc10+dfsg'
> dh_auto_build: make -j1 returned exit code 2
> make: *** [build] Error 2
> dpkg-buildpackage: error: debian/rules build gave error exit status 2
> debian:/ns2-2.35~rc10+dfsg#
>
> I'm not a tcl expert but this looks like a tclcl issue to me. The
> versions of tclcl installed are given below
> P.S. I've attatched the patch for the configure script issue.
>
>
>
> diff -ur ns2-2.35~rc10+dfsg/debian/control
> ns2-2.35~rc10+dfsg.new/debian/control
> --- ns2-2.35~rc10+dfsg/debian/control 2011-10-29 14:13:27.000000000 +0000
> +++ ns2-2.35~rc10+dfsg.new/debian/control 2012-01-07 02:16:04.000000000
> +0000
> @@ -7,6 +7,7 @@
> Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), autotools-dev,
> tcl-dev, tk-dev, libxext-dev, libxt-dev, xgraph, libpcap0.8-dev,
> libotcl1-dev, tclcl, tclcl-dev (>=1.20~RC3-3), perl (>=5.003)
> + dpkg-dev (>= 1.16.0)
> Standards-Version: 3.9.2
> Vcs-git: git://git.debian.org/git/pkg-netsim/ns2.git
> Vcs-Browser: http://git.debian.org/?p=pkg-netsim/ns2.git
> Only in ns2-2.35~rc10+dfsg.new/debian/: ns2-doc.debhelper.log
> Only in ns2-2.35~rc10+dfsg.new/debian/: ns2-examples.debhelper.log
> Only in ns2-2.35~rc10+dfsg.new/debian/: ns2.debhelper.log
> diff -ur ns2-2.35~rc10+dfsg/debian/rules ns2-2.35~rc10+dfsg.new/debian/rules
> --- ns2-2.35~rc10+dfsg/debian/rules 2011-10-29 12:02:59.000000000 +0000
> +++ ns2-2.35~rc10+dfsg.new/debian/rules 2012-01-07 01:15:58.000000000
> +0000
> @@ -19,6 +19,7 @@
> dh_auto_clean -a
> find . -name "*.o" -exec rm {} \;
> find . -name ".cvsignore" -exec rm {} \;
> + rm -f config.log
>
> override_dh_auto_install:
> mkdir -p debian/tmp/usr/bin
> @@ -29,3 +30,15 @@
>
> override_dh_installchangelogs:
> dh_installchangelogs CHANGES.html
> +
> +
> +# set the --x-libraries= setting to the multiarch libdir.
> +# this was the easiest way to make the configure script
> +# find the multiarched otcl. I couldn't use --with-otcl=
> +# because that makes unwanted assumptions about the
> +# relative locations of the library and headers.
> +
> +DEB_HOST_MULTIARCH ?= dpkg-architecture -qDEB_HOST_MULTIARCH
> +
> +override_dh_auto_configure:
> + dh_auto_configure -- --x-libraries=/usr/lib/$(DEB_HOST_MULTIARCH)
> \ No newline at end of file
--
Simon Paillard
Index: ns2-2.35~rc10+dfsg/linkstate/ls.h
===================================================================
--- ns2-2.35~rc10+dfsg.orig/linkstate/ls.h 2012-06-08 22:31:45.000000000
+0200
+++ ns2-2.35~rc10+dfsg/linkstate/ls.h 2012-06-08 22:32:11.000000000 +0200
@@ -134,7 +134,7 @@
return ib.second ? ib.first : baseMap::end();
}
- void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
+ void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
T* findPtr(Key key) {
iterator it = baseMap::find(key);
return (it == baseMap::end()) ? (T *)NULL : &((*it).second);
diffstat for ns2-2.35~rc10+dfsg ns2-2.35~rc10+dfsg
changelog | 8 ++++++++
control | 3 ++-
patches/fix-gcc4.7-ftbfs | 13 +++++++++++++
patches/series | 1 +
rules | 13 +++++++++++++
5 files changed, 37 insertions(+), 1 deletion(-)
diff -Nru ns2-2.35~rc10+dfsg/debian/changelog ns2-2.35~rc10+dfsg/debian/changelog
--- ns2-2.35~rc10+dfsg/debian/changelog 2011-10-29 19:12:48.000000000 +0200
+++ ns2-2.35~rc10+dfsg/debian/changelog 2012-06-08 22:52:33.000000000 +0200
@@ -1,3 +1,11 @@
+ns2 (2.35~rc10+dfsg-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Fix FTBFS otctl
+ * Fix FTBFS due to GCC 4.7: patches/fix-gcc4.7-ftbfs
+
+ -- Simon Paillard <[email protected]> Fri, 08 Jun 2012 22:43:26 +0200
+
ns2 (2.35~rc10+dfsg-1) unstable; urgency=low
* New upstream RC release.
diff -Nru ns2-2.35~rc10+dfsg/debian/control ns2-2.35~rc10+dfsg/debian/control
--- ns2-2.35~rc10+dfsg/debian/control 2011-10-29 16:13:27.000000000 +0200
+++ ns2-2.35~rc10+dfsg/debian/control 2012-06-08 22:46:46.000000000 +0200
@@ -6,7 +6,8 @@
DM-Upload-Allowed: yes
Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), autotools-dev,
tcl-dev, tk-dev, libxext-dev, libxt-dev, xgraph, libpcap0.8-dev,
- libotcl1-dev, tclcl, tclcl-dev (>=1.20~RC3-3), perl (>=5.003)
+ libotcl1-dev, tclcl, tclcl-dev (>=1.20~RC3-3), perl (>=5.003),
+ dpkg-dev (>= 1.16.0)
Standards-Version: 3.9.2
Vcs-git: git://git.debian.org/git/pkg-netsim/ns2.git
Vcs-Browser: http://git.debian.org/?p=pkg-netsim/ns2.git
diff -Nru ns2-2.35~rc10+dfsg/debian/patches/fix-gcc4.7-ftbfs ns2-2.35~rc10+dfsg/debian/patches/fix-gcc4.7-ftbfs
--- ns2-2.35~rc10+dfsg/debian/patches/fix-gcc4.7-ftbfs 1970-01-01 01:00:00.000000000 +0100
+++ ns2-2.35~rc10+dfsg/debian/patches/fix-gcc4.7-ftbfs 2012-06-08 22:32:24.000000000 +0200
@@ -0,0 +1,13 @@
+Index: ns2-2.35~rc10+dfsg/linkstate/ls.h
+===================================================================
+--- ns2-2.35~rc10+dfsg.orig/linkstate/ls.h 2012-06-08 22:31:45.000000000 +0200
++++ ns2-2.35~rc10+dfsg/linkstate/ls.h 2012-06-08 22:32:11.000000000 +0200
+@@ -134,7 +134,7 @@
+ return ib.second ? ib.first : baseMap::end();
+ }
+
+- void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
++ void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
+ T* findPtr(Key key) {
+ iterator it = baseMap::find(key);
+ return (it == baseMap::end()) ? (T *)NULL : &((*it).second);
diff -Nru ns2-2.35~rc10+dfsg/debian/patches/series ns2-2.35~rc10+dfsg/debian/patches/series
--- ns2-2.35~rc10+dfsg/debian/patches/series 2011-10-29 16:57:35.000000000 +0200
+++ ns2-2.35~rc10+dfsg/debian/patches/series 2012-06-08 22:30:57.000000000 +0200
@@ -1,3 +1,4 @@
tclcl-header-move.patch
validate-test-exit-number
install-indep-utils.diff
+fix-gcc4.7-ftbfs
diff -Nru ns2-2.35~rc10+dfsg/debian/rules ns2-2.35~rc10+dfsg/debian/rules
--- ns2-2.35~rc10+dfsg/debian/rules 2011-10-29 14:02:59.000000000 +0200
+++ ns2-2.35~rc10+dfsg/debian/rules 2012-06-08 22:56:06.000000000 +0200
@@ -19,6 +19,7 @@
dh_auto_clean -a
find . -name "*.o" -exec rm {} \;
find . -name ".cvsignore" -exec rm {} \;
+ rm -f config.log
override_dh_auto_install:
mkdir -p debian/tmp/usr/bin
@@ -29,3 +30,15 @@
override_dh_installchangelogs:
dh_installchangelogs CHANGES.html
+
+
+# set the --x-libraries= setting to the multiarch libdir.
+# this was the easiest way to make the configure script
+# find the multiarched otcl. I couldn't use --with-otcl=
+# because that makes unwanted assumptions about the
+# relative locations of the library and headers.
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+override_dh_auto_configure:
+ dh_auto_configure -- --x-libraries=/usr/lib/$(DEB_HOST_MULTIARCH)