On Mon, 13 Nov 2006 09:39:28 +0100 Roland Mainz wrote:
note that this is a non-ast problem
no ast code uses

        int foo = some_size;
        some_type bar[foo];

-- Glenn Fowler -- AT&T Research, Florham Park NJ --

> Roland Mainz wrote:
> > Does anyone know what the following error means:
> > -- snip --
> > /home/test001/ksh93/on_build1/test1_x86/usr/src/tools/proto/opt/onbld/bin/i386/cw
> > -_cc -O  -K pic -xspace -Xa  -xildoff -errtags=yes -errwarn=%all
> > -erroff=E_EMPTY_TRANSLATION_UNIT -erroff=E_STATEMENT_NOT_REACHED
> > -xc99=%all    -W0,-xglobalstatic -DWORDEXP_KSH93=1 -v -g -xc99=%all
> > -W0,-noglobal -_gcc=-fno-dwarf2-indirect-strings -xdebugformat=stabs
> > -xinline= -DTHREAD_DEBUG  -g -xc99=%all -W0,-noglobal
> > -_gcc=-fno-dwarf2-indirect-strings -xdebugformat=stabs -D_REENTRANT
> > -Di386   -I../i386/inc -I../inc -DTEXT_DOMAIN=\"SUNW_OST_OSLIB\"
> > -D_TS_ERRNO
> > -I/home/test001/ksh93/on_build1/test1_x86/proto/root_i386/usr/include
> > -DPIC -D_REENTRANT -c -DM_I18N_MB -DI18N \
> > -I../i386/../port/regex \
> > -I../i386/../port/gen -o pics/wordexp.o ../port/regex/wordexp.c
> > + /usr/sfw/bin/gcc -fident -finline -fno-inline-functions -fno-builtin
> > -fno-asm -nodefaultlibs -D__sun -O -fpic -Wall -Wno-unknown-pragmas
> > -Wno-missing-braces -Wno-sign-compare -Wno-parentheses
> > -Wno-uninitialized -Wno-implicit-function-declaration -Wno-unused
> > -Wno-trigraphs -Wno-char-subscripts -Wno-switch -Werror -std=gnu99
> > -DWORDEXP_KSH93=1 -gdwarf-2 -std=gnu99 -fno-dwarf2-indirect-strings
> > -DTHREAD_DEBUG -gdwarf-2 -std=gnu99 -fno-dwarf2-indirect-strings
> > -D_REENTRANT -Di386 -I../i386/inc -I../inc
> > -DTEXT_DOMAIN="SUNW_OST_OSLIB" -D_TS_ERRNO
> > -I/home/test001/ksh93/on_build1/test1_x86/proto/root_i386/usr/include
> > -DPIC -D_REENTRANT -c -DM_I18N_MB -DI18N -I../i386/../port/regex
> > -I../i386/../port/gen -o /tmp/.cwCAAYpaaqk.o ../port/regex/wordexp.c
> > + /opt/SUNWspro/bin/cc -O -K pic -xspace -Xa -xildoff -errtags=yes
> > -errwarn=%all -erroff=E_EMPTY_TRANSLATION_UNIT
> > -erroff=E_STATEMENT_NOT_REACHED -xc99=%all -W0,-xglobalstatic
> > -DWORDEXP_KSH93=1 -v -g -xc99=%all -W0,-noglobal -xdebugformat=stabs
> > -xinline= -DTHREAD_DEBUG -g -xc99=%all -W0,-noglobal -xdebugformat=stabs
> > -D_REENTRANT -Di386 -I../i386/inc -I../inc
> > -DTEXT_DOMAIN="SUNW_OST_OSLIB" -D_TS_ERRNO
> > -I/home/test001/ksh93/on_build1/test1_x86/proto/root_i386/usr/include
> > -DPIC -D_REENTRANT -c -DM_I18N_MB -DI18N -I../i386/../port/regex
> > -I../i386/../port/gen -o pics/wordexp.o ../port/regex/wordexp.c
> > ERROR: ctfconvert: pics/wordexp.o: Couldn't parse stab "#vla0:(0,14)"
> > (source file pics/wordexp.o)
> > Removing pics/wordexp.o
> > *** Error code 1
> > The following command caused the error:
> > /usr/ccs/bin/mcs -d -a "@(#)SunOS 5.11 test1_x86 October 2007" -a
> > "@(#)SunOS Internal Development:  `echo $LOGNAME` `date +%Y-%m-%d` `echo
> > [\`basename $CODEMGR_WS\`]`" pics/wordexp.o ;
> > /home/test001/ksh93/on_build1/test1_x86/usr/src/tools/proto/opt/onbld/bin/i386/ctfconvert
> > -i -L VERSION pics/wordexp.o
> > make: Fatal error: Command failed for target `pics/wordexp.o'
> > Current working directory
> > /home/test001/ksh93/on_build1/test1_x86/usr/src/lib/libc/i386
> > *** Error code 1
> > The following command caused the error:
> > cd i386; pwd; VERSION='test1_x86' make libc.so.1
> > make: Fatal error: Command failed for target `i386/libc.so.1'
> > Current working directory
> > /home/test001/ksh93/on_build1/test1_x86/usr/src/lib/libc
> > -- snip --
> > 
> > This happens when I compile the ksh93-integration prototype004
> > (B51-based) on a AMD64/B48 machine (with $ export
> > BUILD_KSH93_AS_BINKSH=1 # ; the matching source can be found in
> > http://svn.genunix.org/repos/on/branches/ksh93/gisburn/prototype004/usr/src/lib/libc/port/regex/wordexp.c)
> > ... and I have no clue what may cause the problem (the code was
> > previously tested extensively on B48 and worked without problems) ...
> > 
> > Any ideas/comments/rants welcome...:-)

> Ok... I may have found the problem - unfortunately the issue now puts
> the whole ksh93-integration putback in danger:
> It seems the problem is triggered by the C99 feature to dynamically size
> arrays on the stack.

> Example:
> In C99 (and C++) the following code is valid:
> -- snip --
> void foo(int size)
> {
>     int myarray[size];
>     /* more core comes here */
> }
> -- snip --

> Adding this construct to any C code in the OS/Net codebase causes the
> CTF tools to fail like described above.
> Another example is:
> -- snip --
> /opt/SUNWspro/bin/cc -O -K pic -xspace -Xa -xildoff -errtags=yes
> -errwarn=%all -erroff=E_EMPTY_TRANSLATION_UNIT
> -erroff=E_STATEMENT_NOT_REACHED -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED
> -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -W0,-xglobalstatic -v
> -xstrconst -g -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
> -W0,-noglobal -xdebugformat=stabs -DTEXT_DOMAIN="SUNW_OST_OSLIB"
> -D_TS_ERRNO -Isrc/cmd/ksh93 -I../common/include
> -I/home/test001/ksh93/on_build1/test1_x86/proto/root_i386/usr/include/ast
> -DKSHELL -DSHOPT_APPEND -DSHOPT_BRACEPAT -DSHOPT_CMDLIB_SOLARIS_BLTINS=1
> -DSHOPT_CMDLIB_BLTIN=0 -DSHOPT_COMPOUND_ARRAY -DSHOPT_DYNAMIC
> -DSHOPT_ESH -DSHOPT_FILESCAN -DSHOPT_HISTEXPAND -DSHOPT_KIA
> -DSHOPT_MULTIBYTE -DSHOPT_NAMESPACE -DSHOPT_OPTIMIZE -DSHOPT_PFSH
> -DSHOPT_RAWONLY -DSHOPT_SUID_EXEC -DSHOPT_VSH -DSHOPT_SYSRC -D_BLD_shell
> -D_PACKAGE_ast -DSH_CMDLIB_DIR="/usr/ast/bin"
> -DUSAGE_LICENSE="[-author?David Korn
> <dgk at research.att.com>][-copyright?Copyright (c) 1982-2006 AT&T
> Knowledge
> Ventures][-license?http://www.opensource.org/licenses/cpl1.0.txt][--catalog?libshell]";
> -DPIC -D_REENTRANT -c -o pics/bltins/read.o ../common/bltins/read.c 
> ERROR: ctfconvert: pics/bltins/read.o: Couldn't parse stab
> "#vla0:(0,14)" (source file pics/bltins/read.o)
> Removing pics/bltins/read.o
> *** Error code 1
> The following command caused the error:
> /usr/ccs/bin/mcs -d -a "@(#)SunOS 5.11 test1_x86 October 2007" -a
> "@(#)SunOS Internal Development:  `echo $LOGNAME` `date +%Y-%m-%d` `echo
> [\`basename $CODEMGR_WS\`]`" pics/bltins/read.o ;
> /home/test001/ksh93/on_build1/test1_x86/usr/src/tools/proto/opt/onbld/bin/i386/ctfconvert
> -i -L VERSION pics/bltins/read.o
> make: Fatal error: Command failed for target `pics/bltins/read.o'
> Current working directory
> /home/test001/ksh93/on_build1/test1_x86/usr/src/lib/libshell/i386
> *** Error code 1
> The following command caused the error:
> cd i386; pwd; make install
> make: Fatal error: Command failed for target `i386'
> Current working directory
> /home/test001/ksh93/on_build1/test1_x86/usr/src/lib/libshell
> -- snip --

> It seems this issue crept in either between B37 and B48 or between B48
> and B51... ;-(

> ----

> Bye,
> Roland

> -- 
>   __ .  . __
>  (o.\ \/ /.o) roland.mainz at nrubsig.org
>   \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
>   /O /==\ O\  TEL +49 641 7950090
>  (;O/ \/ \O;)
> _______________________________________________
> ksh93-integration-discuss mailing list
> ksh93-integration-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss


Reply via email to