Re: [Ceph-maintainers] Bug#849657: ceph: FTBFS on mips(el): g++: virtual memory exhausted: Cannot allocate memory

Gaudenz Steinlin <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <[email protected]>
Emilio Pozuelo Monfort <[email protected]> writes:

> On 05/01/17 14:00, Gaudenz Steinlin wrote:
>> 
>> Hi
>> 
>> Aurelien Jarno <[email protected]> writes:
>> 
>>> On 2016-12-30 10:06, Emilio Pozuelo Monfort wrote:
>>>> On 29/12/16 20:56, Gaudenz Steinlin wrote:
>>>
>>> The problem is indeed a memory issue, not that the buildd doesn't have
>>> enough memory, but just that you can allocate only 2GB per process on a
>>> 32-bit MIPS machine. As Emilio said, the above GCC flag should help to
>>> reduce the memory usage by running the garbage collector more often.
>>>
>>> However gcc 6.3 seems to have improved the situation a bit, so I given
>>> back the packages, I hope they will build now. Otherwise I have a patch
>>> ready to change the GCC defaults. That said GCC upstream consider it's a
>>> bug in the garbage collector [1], so that should be fixed instead and the
>>> patch should be considered as a temporary workaround.
>>>
>> 
>> Aurelien thanks for taking care and resheduling the build. Unfortunately
>> this did not solve the problem. But setting the following variables
>> solves the virtual memory issue for me on the mipsel porterbox (eller):
>> 
>> export DEB_CFLAGS_MAINT_APPEND= --param ggc-min-expand=10 -O1
>> export DEB_CXXFLAGS_MAINT_APPEND= --param ggc-min-expand=10 -O1
>> export DEB_CFLAGS_MAINT_STRIP= -O2
>> export DEB_CXXFLAGS_MAINT_STRIP= -O2
>> 
>> But unfortunately the build fails at another point. See the log below.
>> I'm not sure how to fix this. If I understand it right these atomic
>> operations are just not supported on mipsel[1]. Or is there a way to make
>> them work?
>
> They are supported. You are probably missing -latomic.

You are right, using -latomic fixes the issue. If I understand this
right -latomic "emulates" the atomic operation if there is no direct
support in the processor for it.

What's the correct way to detect if -latomic is needed? Or is it safe to
use -latomic everywhere on all architectures and let the linker/compiler
do the right thing? I'd like to patch the build system in a way that can
be sent upstream instead of working around it.

Gaudenz

-- 
PGP: 836E 4F81 EFBB ADA7 0852 79BF A97A 7702 BAF9 1EF5
signature.asc (application/pgp-signature, 487 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEXtjbd32AqFIO1HzsOrL5guAQm9UFAlhyJ9YACgkQOrL5guAQ
m9WnHQgAg8PRhZdswD21kVeSTIMRpplcY/jkDXpumTgNEHJmKt/QMdeXuXOqfrUi
5ClihhKkz+EPYVMFTf5uaG9lr5EUVHyPyJtXEfUYcmnffGcOJkVw2Q/c7LHUnOpJ
wSyBtGPhN1Wwxsm3dUy3Mx57l2eM8e0sAsUGHJyuz2KqCOz39Qlv+XftVmrqo0oM
fbUvyhLpeH0fjvsfvV4Y4dGNCbxSEfLLfWg+95S+xagt/aFTD2sgNptwaM3SChH+
z/j1z3Npk6vlYq36YiKXnKVDJnu2DV0XLJKSBIEWro99EAc8fdhAqtBUlfO4AoiF
/TsNWKid+X/fmpdEYRcMbPkfqGf5Dw==
=dgrS
-----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.