I am trying to build a C++ software with debug symbols enabled (-g). The problem is that the additional debug symbols make the included library that large that the final linking step fails with
../../lib/libutil.a: could not read symbols: Malformed archive
(at least I think it's failing because of it's size, which is slightly over 6 GB on disk)
I looked around and found hints that there might be maximum size for static libraries of 4 GB. Not sure if this applies to my system which is a 64 bit CentOS:
$ uname -a Linux host 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
I am using the g++ (GCC) 4.8.2 compiler and the binutils version is GNU ld version 2.20.51.0.2-5.36.el6.
If there is indeed a maximum limit of 4GB that the archive tool or linker can handle what are my options without tempering too much with the interna of the build system (which is autotools by the way)?