ns3: FTBFS on mipsel (OOM of the linker)

Martin Quinson <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <20200211104629.GA161135@cafuron>
Source: src:ns3
Version: 3.30+dfsg-3.1
Severity: serious
Tag: ftbfs
Tag: help

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

-- 
Vae Soli.
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEET76cTupS7xPVQWYSmL2XJE9zvqcFAl5ChgIACgkQmL2XJE9z
vqcoHBAAiKQCKQCRxmIBdpjKbkkGdQ00LSPhBxghnpwUbSaURGuLYCgKI/KbaPn9
oy6PFAYOQ3rEjUsXv7aBg+ATeTn+bgFsS6Utyv63J414OhvB1ShBiIKoGH3kKSNr
5KSK+rXU5KIaH0FdXtltpU1X/R1+CLa7qgYTq6S7pMlvJ1WUYGyKQVOLr178VN0n
gIe9Bt3ONeRMm0WjqaUK7bmBkP+W3SoXd0UiO+SlPv9mThZJOU6rosyho4zexVB5
fMomSmLq/reQFtGo6XEEAMftrgCa81RBvHzxzMsXuxiAj9jmhvVfh9wgqzW7Zf8F
STOoAnKcQzQEyNUYsNqeFHHvvOnPAZXPJCluCRJLrejfnRDaqGoL5evkVxDtvBZm
ZmpIdv7MZzh7eCusMWJ4rLU5rUhVKUIPxJbR/mX4/iI8q+SljVzIjD6AHhj3nq2r
3p0+YiRhr9oyGfyqCGonEM1VGPiAoVpM8HR8meqBCx78xm+5eX9EPIv7r0plVL4w
R66cQzGty2h/1yzDzkoShYuYanyLFp1zuekV7jbLAijA1dGNZY6e9wOTgFL4GQMR
rXRNDi5uux6T0CLMbYhfKAweR8DMU8lH4l+N/mQGJlveEI9kmoOgvzgfJFj9yeZF
hXI5QAQcYmBWy7swSHHW4cUzKoMsxGQqdYURpM6hkdyE9DlMXuM=
=kldy
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.