Standard C++ Library manual examples will not build on Solaris

Article ID: 1038
Last updated: 02 Feb, 2008
Article ID: 1038
Last updated: 02 Feb, 2008
Revision: 1
Views: 3746
Posted: 22 Sep, 1998
by Dean J.
Updated: 02 Feb, 2008
by Dean J.
Problem


When building the manual examples on Solaris with the (SParkWorks) Sunpro 4.2 compiler, I receive the following error message:
Undefined first referenced symbol in file
__push_heap(int*, int, int, int)
Templates.DB/8dTNiArbx5Nk.o
ld: fatal: Symbol referencing errors. No output written to partsort
*** Error code 1
make: Fatal error: Command failed for target `partsort'
PartMgr ERROR 1: rwbuild: make failed!



Cause


The Sunpro compiler creates a Templates.DB repository where it keeps the symbols for template instantiation. The makefiles that get created for building the Standard Library examples do not remove the Templates.DB repository between the builds of each example. This creates a conflict between the different symbols in Templates.DB, resulting in the above error.


Action


To correct the problem, you will need to modify the makefile template makefile.in located at:
.../parts/std0123u/examples/manual/etc/Unix/

Add the following to the end of makefile.in:

$(RWRM) $(RWTEMPLATE_REPOSITORY)

so that it now reads:

$(RWEXAMPLES):
$(RWCPPINVOKE) $(RWLINKFLAGS) -o $@ $@.o $(RWFIRST_LIBPATH) $(RWFIRST_USERLIBS)/
$(RWLIBPATH) $(RWLINKLIBS) $(RWLAST_LIBPATH) $(RWLAST_USERLIBS)
$(RWRM) $(RWTEMPLATE_REPOSITORY)

After editing and saving the makefile.in file, rebuild the Standard C++ Library examples from Software Parts Manager. This should correct the problem with the manual examples not building correctly.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 1038
Last updated: 02 Feb, 2008
Revision: 1
Views: 3746
Posted: 22 Sep, 1998 by Dean J.
Updated: 02 Feb, 2008 by Dean J.

Others in this category