Failure building Standard C++ Library with aCC 3.25

Article ID: 1047
Last updated: 31 Jan, 2008
Article ID: 1047
Last updated: 31 Jan, 2008
Revision: 1
Views: 3346
Posted: 22 Jan, 2001
by Dean J.
Updated: 31 Jan, 2008
by Dean J.
Problem


Some users experience a problem building the Standard C++ Library with the newer aCC compilers.

The error message looks like this:

Error 328: '../../../../include/memory', line 495 # Function 'bad_alloc' has not been defined yet; cannot call.
       RWSTD_THROW_NO_MSG(tmp == 0, bad_alloc); ^^^^^^^^^^^^^^^^^^ *** Error exit code 2

 

 




Cause


When SPM builds the Standard C++ Library, the compiler's version of new never gets included. The Rogue Wave Standard C++ Library source files include <buildtype>/include/new, which then includes new.h. This file is located in the compiler's include directory. However, the newer aCC compilers have changed the new.h file, which has no definitions, to now include only new, which has all of the definitions.
 
When building our Standard C++ Library, the compiler checks the -l path first for any #include files. There are now two new include files, one in the Rogue Wave include directory and one in the compiler's include directory. Since new.h is including new, it is including the version of new located in the Rogue Wave include directory instead of the version in the compiler's include directory.




 

 

 




Action


To correct this problem, you must modify 2 files.

Change:

/parts/std0131u/source/src/include/new

88:#endif /*__STD_NEW */
89:#else
90:#include <new.h>
91:#endif /* !defined (_HPACC_) */

to read like this:  (check compiler location with which aCC)

88:#endif /*__STD_NEW */
89:#else
90:#include </opt/aCC/include/new>
91:#endif /* !defined (_HPACC_) */


Change:

/parts/std0131u/source/src/include/exception

146:#endif /*__RWSTD_EXCEPTION_SEEN*/
147:#else
148:#include <exception.h>
149:#define RWSTD_exception exception
150:#endif /*!defined _HPACC_ */

to read like this: (check compiler location with which aCC)

146:#endif /*__RWSTD_EXCEPTION_SEEN*/
147:#else
148:#include </opt/aCC/include/exception>

149:#define RWSTD_exception exception
150:#endif /*!defined _HPACC_ */

 

This article was:   Helpful | Not helpful
Report an issue
Article ID: 1047
Last updated: 31 Jan, 2008
Revision: 1
Views: 3346
Posted: 22 Jan, 2001 by Dean J.
Updated: 31 Jan, 2008 by Dean J.

Others in this category