Opened 13 years ago

Last modified 11 years ago

#120 closed defect (fixed)

configure on solaris 2.7

Reported by: havard.tveite@… Owned by: strk@…
Priority: major Milestone:
Component: Build/Install Version: 2.2.3
Severity: Significant Keywords: imported, phpbugtracker
Cc:

Description (last modified by mloskot)

Using todays CVS snapshot, the following problems arise when running configure on my solaris 2.7 system:

./configure --help
./configure: syntax error at line 1622: `CAPI_VERSION_MAJOR=$' unexpected

If I remove:

$(($CAPI_INTERFACE_CURRENT-$CAPI_INTERFACE_AGE))

and replace it with either 1 (the difference), or

$CAPI_INTERFACE_CURRENT-$CAPI_INTERFACE_AGE

configure seems to work as expected.

I found that this problem also applies to version 2.2.3, but in 2.2.3 there was also another line with the same syntax that had to be fixed

Change History (9)

comment:1 Changed 13 years ago by strk@…

$var-$val would result in the "4-3" string with a bourne shell. Can you find another syntax for arithmetics ?
Could you try $((4-3)) just to test ?

comment:2 Changed 13 years ago by havard.tveite@…

OK.  I only found out that something was wrong, and reported it.  I have now found that the Solaris ksh has arithmetic expansion of the type used in configure ( "$(())" ), but Solaris sh does not have it .
I do not know the portable way to do arithetic in shell programming, but I have seen expr mentioned, so perhaps the following is more portable:
CAPI_VERSION_MAJOR=`(expr $CAPI_INTERFACE_CURRENT - $CAPI_INTERFACE_AGE)`

comment:3 Changed 13 years ago by strk@…

Does this work ?

a=4
b=3
c=`expr $a - $b`
echo $c

comment:4 Changed 13 years ago by havard.tveite@…

Yes,

CAPI_VERSION_MAJOR=`expr $CAPI_INTERFACE_CURRENT - $CAPI_INTERFACE_AGE`

also works.

comment:5 Changed 13 years ago by strk@…

Thank you, committed the patch in TRUNK. please confirm it works now.

comment:6 Changed 13 years ago by havard.tveite@…

It works now.

comment:7 Changed 13 years ago by strk@…

Resolution: nonefixed

comment:8 Changed 12 years ago by mloskot

Component: Build scriptsBuild/Install
Description: modified (diff)
Milestone: imported3.0.0
Priority: 1major
Version: 3.0.02.2.3

comment:9 Changed 11 years ago by (none)

Milestone: 3.0.0

Milestone 3.0.0 deleted

Note: See TracTickets for help on using tickets.