#951115 ns3: FTBFS on mipsel (OOM of the linker)

#951115#5
Date:
2020-02-11 10:46:29 UTC
From:
To:
Hello,

I'm the maintainer of this package. I'm opening this bug to discuss the issue
with whom may be interested, and keep track of the discussion.

The package is currently trying to enter testing to fix 2 (easy) RC bugs, but
fails to do so because builds fail on mipsel with the following message:
------------------------------
as: out of memory allocating 17107680 bytes after a total of 567459840 bytes
/tmp/cc23jwIU.s: Assembler messages:
/tmp/cc23jwIU.s: Fatal error: can't close /<<PKGBUILDDIR>>/ns-3.30/build-
shared/src/lte/bindings/ns3module.cc.7.o: memory exhausted
------------------------------

I tried to reduce the memory consumption with the following chunks in
debian/rules:
------------------------------ ifeq ($(DEB_HOST_GNU_CPU),mipsel) # Drop the debug symbols all together on mipsel to avoid OOM causing FTBFS export DEB_CFLAGS_MAINT_STRIP=-g export DEB_CXXFLAGS_MAINT_STRIP=-g endif LDFLAGS+=-Wl,--as-needed # Define CFLAGS and friends to harden the build -- must come any addition to these variables DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk ifeq ($(DEB_HOST_GNU_CPU),mipsel) # Further reduce the memory consumption on mipsel LDFLAGS += -Wl,--reduce-memory-overheads -Wl,--no-keep-memory endif ------------------------------- The version that failed on the buildd servers does not have these changes, but I tested it on the porterbox. I manually inspected the command-line parameters passed to the parser, and it seem to be all right. Compiling without -g and linking with the reduce-memory-overheads (unless I'm wrong). But this is not sufficient: I get exactly the same error message. In addition, I don't think that this is a real bug of as. ns-3 is a very large library, and upstream is not paying a lot of effort on reducing its size or optimizing the linking phase. I don't have any idea of how to fix it myself. I guess that I should ask for the removal of the mipsel version of this package, but I'm not entirely sure. I'd love to have ns-3 building on every platform, even if I'm certain that nobody will ever try to use it on this platform. This is a rather inefficient simulator used in science. Users will more probably deploy it to a fast compute server. But still, if possible, being compilable on mipsel too would be healthy for the software, if I could. Any help or advice is really really welcomed. Everything is in the salsa repository. Thanks, Mt
#951115#12
Date:
2020-02-11 11:41:39 UTC
From:
To:
Control: reassign -1 src:ns3 3.30+dfsg-3.1
#951115#19
Date:
2020-02-11 11:01:39 UTC
From:
To:
Martin Quinson <martin.quinson@ens-rennes.fr> 于2020年2月11日周二 下午6:46写道:

I am the first maintainer of ns3 and thanks for continue to maintain it.
And I am the mips* porter ...

It's due to 2GiB virtual memory limitation.
I am working on figure out a host64 toolchain.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950527
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950652

I guess you can drop mipsel support for now,
and maybe some other 32bit ports.

Go ahead.

#951115#24
Date:
2020-02-13 22:16:49 UTC
From:
To:
severity 951115 normal
thanks

Hello,

so I uploaded a version of this package without mipsel, and it built
nicely on all architectures where its dependencies are to be found
(all official architectures plus some others).

Thus downgrading this bug.

Thanks, Mt.

#951115#31
Date:
2020-02-13 22:42:23 UTC
From:
To:
Hopefully the package will be allowed to transition to testing before
18/2, the testing removal date. Or soon after.

#951115#36
Date:
2022-07-04 14:40:56 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ns3, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 951115@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Quinson <mquinson@debian.org> (supplier of updated ns3 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 04 Jul 2022 15:14:36 +0200
Source: ns3
Architecture: source
Version: 3.36.1+dfsg-3
Distribution: unstable
Urgency: medium
Maintainer: Martin Quinson <mquinson@debian.org>
Changed-By: Martin Quinson <mquinson@debian.org>
Closes: 951115
Changes:
 ns3 (3.36.1+dfsg-3) unstable; urgency=medium
 .
   * Don't hardcode CMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu but use
     DEB_BUILD_MULTIARCH as expected.
     - The story is that I had to mimick what dh is doing when using
       cmake because I cannot use cmake directly but only through the
       ./ns3 script.
     - Obviously, I was too quick when copy/pasting the values. Sorry.
   * Give !nodoc as a profile to the ns3-doc package, and only build
     the doc in the build-indep target, not the build-arch one.
   * Re-enable the mispel architecture (Closes: #951115).
   * Remove MPI from the dependencies since I disabled it in the build.
Checksums-Sha1:
 fc29dc7c744bedff6ad4993a86f3b290f5d88db8 2531 ns3_3.36.1+dfsg-3.dsc
 65d8189eed47b5d9ee7a2a3ce30c8e328952e6e7 19440 ns3_3.36.1+dfsg-3.debian.tar.xz
 25fec20a073df95dc9933cbf040781efabd8ced2 16714 ns3_3.36.1+dfsg-3_amd64.buildinfo
Checksums-Sha256:
 14c95f333d1d4938535e02cf0ceb50a0fc83dc22d3dff5c6b625a4f14683be6b 2531 ns3_3.36.1+dfsg-3.dsc
 061b2d03aca2be3f6d08ea8851f4a9cd7b24d1fb9d19efba3aef15bcd3eeb3a7 19440 ns3_3.36.1+dfsg-3.debian.tar.xz
 61cc346c66bad49d287dae370736163b983da0f4ae2e2f8727bace58f854160b 16714 ns3_3.36.1+dfsg-3_amd64.buildinfo
Files:
 f966a747f28a63472a145733859bdee1 2531 net optional ns3_3.36.1+dfsg-3.dsc
 30818d73f9f943a4a1209c8c96b5278d 19440 net optional ns3_3.36.1+dfsg-3.debian.tar.xz
 f9470e9d8ded241fe59704875c65b4b3 16714 net optional ns3_3.36.1+dfsg-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEET76cTupS7xPVQWYSmL2XJE9zvqcFAmLC9LYUHG1xdWluc29u
QGRlYmlhbi5vcmcACgkQmL2XJE9zvqcB0g/8CcOR3i634erZVcNe5/jnDn68edNA
6Hpf9WUhY02+VRZGESP4xsydGP26j21w23VsQQLx/+Q+pnX9xUljrnadbFgdlhps
TMMo4OEWb9mQdFaZnR65pH4zkaeiV2sWHtGNOqAfEdFTQq3iZxkHsrMylZ/+G4VF
Rz0dh3yjUflCEvqHSWGVGEhARnHOoPwBsEevy8nplDO6gjSxT+QFweWZpyS2AEK6
/uxNOgGto7orHxugfTgircHESp2qaaADxN5dbeb493WMQgShdEfId9Lrw4Npo0jO
mumNATHj1F5TqU7gDYIPK8SoaHHXZdXlOaaTyZbn96GB/kn0L8BSFKXPQ3cGRhbN
pyY1v6xfUfigE+1lto07q8Q807/hT+HhyJlcL1Cxcd/0WIlWiWVydKqnDsratZpc
3Yrv+hyNXIegdaWFxV9RP78HhxCxe4xN2R/o1BB+ca4WkWl0Mkj/gFNWLXVf6icN
sg2ELnOSEcVRIF1PVQfOW8E0TIg1jnhzPRyGomY1SRHtPYhRUSPCjlKABg+iHOm1
eIVaSWyfOypIowvP+oLqDUAux0VrlieDVKFo4YTc8YlH5RRVJeS4KR5VcKBhIOO7
JWGEUcUYRncmJ07BwABOMzs/7hubIwTLToFf+V6LJ2pVmJ3wN8px8oZ0A5P6uq1m
JgNHPz5VqhBMIEA=
=mlw9
-----END PGP SIGNATURE-----