Operating System - HP-UX
1748054 Members
4684 Online
108758 Solutions
New Discussion юеВ

aCC: Not enough memory is available to finish the compilation.

 
Sowmyati
New Member

aCC: Not enough memory is available to finish the compilation.

Hi,

I am facing a issue to compile my source code which is of close to 480MB on HPUX PA-RISC B.11.31 machine.
aCC compiler version - HP ANSI C++ B3910B A.03.70

Error Message:[Unknown position].

Warning 67: "/SOULAPINEW/COMMON/inc/globalstaticallocator.h", line 11 # Invalid pragma name: 'warning' (ignored).

#pragma warning( disable : 4005 )

^^^^^^^^^^^^^^^^^^^^^^^^^

aCC: Not enough memory is available to finish the compilation.

There is enough space available but still facing this problem.
maxssize and maxdsize set to the max
>> ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4194300
stack(kbytes) 262144
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 2048

>> swapinfo -tam
acuxpa2# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 12288 0 12288 0% 0 - 1 /dev/vg00/lvol2
reserve - 260 -260
memory 5842 1660 4182 28%
total 18130 1920 16210 11% - 0 -

aCC options used while compiling :
/opt/aCC/bin/aCC -mt +Z -AA -lrt +u1 +DAportable

I have also searched for some of the similar issues discussed in these forums tried out with different options but nothing helped. With respect to this removed -g option while compiling but facing the same problem. Please guide through what need to be done.
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: aCC: Not enough memory is available to finish the compilation.

Hi:

A single C source file of 480 MB? I would have expected that to be broken into smaller units.

Version A.03.70 (if I understand correctly) was released around June 2006 and would have applied to 11.23.

I would think upgrading your compiler to a current release (especially given the intense development in the C/C++ Itanium compiler) would be helpful.

With a support contract, you are entitled to a free uplift to B9007AA:

http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B9007AA

Regards!

...JRF...
Avinash20
Honored Contributor

Re: aCC: Not enough memory is available to finish the compilation.

Please check if this link help which talk about the error which you are facing

http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=4a083a7373f021103a7373f02110275d6e10RCRD#faq-memory

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1195922
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Dennis Handly
Acclaimed Contributor

Re: aCC: Not enough memory is available to finish the compilation.

>which is of close to 480MB

What does this mean? The compiler only cares about once source at a time (including all headers).
Are you using lots of templates?

The latest compiler version is A.03.85.

>There is enough space available but still facing this problem.

Why do you think you have enough space available? Did you mean swap?

>maxssiz and maxdsiz set to the max

Never ever set maxssiz to the max. That takes away all of maxdsiz.

If you want to experiment, you can use ulimit to reduce maxssiz:
ulimit -s $(( 16* 1024 ))

>Please guide through what need to be done.

Can you watch the heap size in top as it is compiling?

>JRF: A.03.70 as released around June 2006 and would have applied to 11.23.

That's correct. A.03.70 wouldn't be on 11.31.

>(especially given the intense development in the C/C++ Integrity compiler) would be helpful.

This is a PA compiler, which has no connection with IPF. On IPF, it is a user problem if the compiler runs out of memory, the user is suppose to increase maxdsiz_64bit as large as needed.

Sowmyati
New Member

Re: aCC: Not enough memory is available to finish the compilation.

Hi All,

Thanks!!

Its not a single source file. Package of source code of smaller units.

Downloaded the latest version of aCC from HP site and uograded acc version.(aCC: HP ANSI C++ B3910B A.03.85)

As said maxssize is reduced to 8192 Kbytes.

Yes there templates used in the code.

Written a smaller stub with template which is throwimg a error when compiled. Please find it below.
==========================================================================

#include
namespace Common
{
template struct CompileTimeChecker
{
public: typedef char DUMB;
};
template <> struct CompileTimeChecker < false > {}; } #define STATIC_ASSERT(expr) Common::CompileTimeChecker<(expr)>::DUMB COMPILE_TIME_CHECKER_DUMB; int main() {
STATIC_ASSERT(1);
return 0;
}

Error Message:
# /opt/aCC/bin/aCC t.cpp
aCC: Not enough memory is available to finish the compilation.

==========================================================================

To reolve this issue as looked into the similar issue resolution introduced a option +hpxstd98. However its leading to another problem.

The options used to compile the code is

/opt/aCC/bin/aCC -AA -Aa -mt +Z -lrt +u1 +hpxstd98 +DAportable +W690,392,431,887,921,655,555,254 -D_RWSTD_NO_OVERLOAD_WCHAR -march=1.1 -O0

Here is a error number #2135 while compiling the source

Error message: error #2135: class "Common::StructName"
has no member "DUMB"

Please find the code snippet:

namespace Common
{
template struct StructName
{
public: typedef char DUMB;
};
template <> struct StructName < false > {};
}
#ifndef STATIC_ASSERT
#define STATIC_ASSERT(expr) \
extern Common::StructName <(expr)>::DUMB COMPILE_TIME_CHECKER_DUMB;
#endif

Regards,
Sowmya
Dennis Handly
Acclaimed Contributor

Re: aCC: Not enough memory is available to finish the compilation.

>Yes there templates used in the code.

There is no need to use a template hammer to do STATIC_ASSERT. It looks like that what's causing the problem. Using +hpxstd98 makes it work.

Also using an array declaration would also work better.
#define STATIC_ASSERT(x) \
extern char COMPILE_TIME_CHECKER_DUMB[!!(x)]

>Here is a error number #2135 while compiling the source

This is the STATIC_ASSERT you want.

>-D_RWSTD_NO_OVERLOAD_WCHAR -march=1.1

It is illegal to fiddle with any of the -D_RW defines, remove it.

There is no such option as "-march=1.1", use +DAportable?