Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jan 1998 15:18:24 -0800 (PST)
From:      cml@ucdavis.edu
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   ports/5406: Icon 9.3 code fails if env BLOCKSIZE=K is defined
Message-ID:  <199801012318.PAA17930@hub.freebsd.org>
Resent-Message-ID: <199801012320.PAA18061@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         5406
>Category:       ports
>Synopsis:       Icon 9.3 code fails if env BLOCKSIZE=K is defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Class:          support
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan  1 15:20:01 PST 1998
>Last-Modified:
>Originator:     Chris Lambertus
>Organization:
UC Davis Information Resources
>Release:        2.2.5-RELEASE
>Environment:
FreeBSD punq 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: Wed Dec 31 12:30:09 PST 1997     cml@punq:/usr/src/sys/compile/PUNQ  i386
>Description:
The icon-9.3 compiler/interpreter claims to use the environment variable
BLKSIZE to set the "initial size of the allocated block region." The
source code src/runtime/init.r:1000 defines BLOCKSIZE as a synonym
for BLKSIZE. If BLOCKSIZE=K is set in /etc/profile, the icon interpreter
generates:

error in startup code
: environment variable not numeric: BLOCKSIZE=K

because the Icon interpreter expect the BLOCKSIZE environment
variable to be set to a numeric byte size.
>How-To-Repeat:
Uncomment BLOCKSIZE=K in /etc/profile, start a login shell
so it ends up in the environment.

Run any Icon 9.3 program such as:

$ cat helloworld.icn
procedure main(param)
	write("Hello World\n")
end
$ iconc helloworld.icn
Translating to C:
helloworld.icn:
No errors; no warnings
Compiling and linking C code:
$ ./helloworld
error in startup code
: environment variable not numeric: BLOCKSIZE=K
$ unset BLOCKSIZE
$ ./helloworld
Hello World


>Fix:
Unsure of architecture; change FreeBSD or Icon? To fix Icon,
comment out line 1000 of src/runtime/init.r, which is what I've
done. This may break Icon code which uses the BLOCKSIZE synonym 
for BLKSIZE.
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801012318.PAA17930>