Command line builds for Threads 2.0.1 on Solaris7 with SunPro 4.2

Article ID: 1191
Last updated: 31 Jan, 2008
Article ID: 1191
Last updated: 31 Jan, 2008
Revision: 1
Views: 3092
Posted: 23 Jul, 2001
by Dean J.
Updated: 31 Jan, 2008
by Dean J.
Problem


Threads.h++ 2.0.1 will not build from the command line on Solaris with the SunPro 4.2 or 5.0 compiler.




Cause


The build problem is caused by a missing file (rwspm.add) in Threads.h++ 2.0.1.




Action


There are two solutions to this problem.

  • The first solution is to modify the rwspm.add file shipped with Threads.h++ 1.4.0. The rwspm.add file is located in the SPM parts tree, typically named .../spm/parts/thr0140u. 
    • Copy the rwspm.add file into the new SPM parts tree, typically named .../spm/parts/thr0201u.
    • Change the following line from this:

#check if this is the correct working directory
if [ ! -f source/src/rw/thr/thrmgr.h ]

To this:

#check if this is the correct working directory
if [ ! -f include/rw/thr/thrmgr.h ]

Making this change will allow the command line build script to run properly.

  • The second solution, if a copy of Threads.h++ 1.4.0 is not available, is to:
    • Copy the entire block of remaining text below into a new file.
    • Save the file as "rwspm.add"
    • Move the file into the spm/parts/thr0201u directory.

The text below has already been corrected.

# ============================================================================
# Script: rwspm.add
#
# Purpose: To build Threads..h++ without the partmgr GUI
#
# Options:
#
# Arguments:
#
#  Copyright (c) 1989-1999 Rogue Wave Software, Inc.  All Rights Reserved.
#
#  This computer software is owned by Rogue Wave Software, Inc. and is
#  protected by U.S. copyright laws and other laws and by international
#  treaties.  This computer software is furnished by Rogue Wave Software,
#  Inc. pursuant to a written license agreement and may be used, copied,
#  transmitted, and stored only in accordance with the terms of such
#  license and with the inclusion of the above copyright notice.  This
#  computer software or any other copies thereof may not be provided or
#  otherwise made available to any other person.
#
#  U.S. Government Restricted Rights.  This computer software is provided
#  with Restricted Rights.  Use, duplication, or disclosure by the
#  Government is subject to restrictions as set forth in subparagraph (c)
#  (1) (ii) of The Rights in Technical Data and Computer Software clause
#  at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of the
#  Commercial Computer Software ? Restricted Rights at 48 CFR 52.227-19,
#  as applicable.  Manufacturer is Rogue Wave Software, Inc., 5500
#  Flatiron Parkway, Boulder, Colorado 80301 USA.
#
# ============================================================================

# check if this is the correct working directory
if [ ! -f include/rw/thr/thrmgr.h ]
then
echo "$RWERROR this script builds Threads.h++ but the current"
echo "working directory is "`pwd`
echo "Please set the Threads.h++ product tree directory"
echo "using the -p argument of rwspm and try again"
exit 2
fi

#
# Clean up before exiting
#
trap "exit" 0 1 2 3 15


case "$BTYPE" in
0 | 3 | 4 | 7 | 8 | 11 | 12 | 15) ;;
*) echo "$RWERROR the buildtype value ($BTYPE) is not "
echo " 0, 3, 4, 7, 8, 11, 12, or 15"
echo "These are the only build types for Threads.h++"
echo "Please restart the build procedure"
exit 5
;;
esac


# run the scripts, with messaging
RWENV="$ $/rwenv -n"
COMMON_ARG="$ -i$ -t$"

$RWENV "rwsetup $ -i$ -f$/platform/$ ."
[ $? -ne 0 ] && echo "rwsetup failed" && exit 11

$RWENV "genmake $COMMON_ARG source"
[ $? -ne 0 ] && echo "source genmake failed" && exit 12

$RWENV "rwinstal $COMMON_ARG source"
[ $? -ne 0 ] && echo "source rwinstal failed" && exit 14

$RWENV "rwbuild $COMMON_ARG source"
[ $? -ne 0 ] && echo "source rwbuild failed" && exit 13

$RWENV "genmake -w $COMMON_ARG examples"
[ $? -ne 0 ] && echo "example genmake failed" && exit 18

$RWENV "rwinstal -w $COMMON_ARG examples"
[ $? -ne 0 ] && echo "example rwinstal failed" && exit 17

exit 0
This article was:   Helpful | Not helpful
Report an issue
Article ID: 1191
Last updated: 31 Jan, 2008
Revision: 1
Views: 3092
Posted: 23 Jul, 2001 by Dean J.
Updated: 31 Jan, 2008 by Dean J.

Others in this category