[Pkg-netsim-devel] Bug#654261: ns2: FTBFS GCC 4.7 (was: due to missing otcl)

Simon Paillard spaillard at debian.org
Fri Jun 8 21:02:25 UTC 2012


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
-------------- next part --------------
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ns2.ftbfs.partial.diff
Type: text/x-diff
Size: 3821 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-netsim-devel/attachments/20120608/b967b4c1/attachment.diff>


More information about the Pkg-netsim-devel mailing list