OpenSolaris

Printable Version Enter a New Search
Bug ID 6799167
Synopsis real gcc build fails in libshell
State 10-Fix Delivered (Fix available in build)
Category:Subcategory shell:korn93
Keywords oss-request | oss-sponsor | rtiq_reviewed
Sponsor Milan Jurik
Submitter mainz
Responsible Engineer Milan Jurik
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_111
Fixed In snv_111
Release Fixed solaris_nevada(snv_111)
Related Bugs 6379193 , 6619428 , 6811985
Submit Date 29-January-2009
Last Update Date 25-March-2009
Description
filing this so I don't forget.

When doing the real gcc build of ON (__GNUC set in the environment) the recent ksh93 update doesn't
build:

{root:veritastest:2} /usr/ccs/bin/make install
/builds/gcc-fixes/usr/src/lib/libshell/sparc
/builds/gcc-fixes/usr/src/tools/proto/opt/onbld/bin/sparc/cw -_gcc -xO3 -m32 -Wc,-Qassembler-ounrefsym=0 -xregs=no%appl -K PIC -xspace -W0,-Lt -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 -Wd,-xsafe=unboundsym -W2,-xwrap_int  -W0,-xglobalstatic -v  -_cc=-xcsi  -xstrconst -g -Wc,-Qiselect-T1 -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -W0,-noglobal -_gcc=-fno-dwarf2-indirect-strings -xdebugformat=dwarf -DTEXT_DOMAIN=\"SUNW_OST_OSLIB\" -D_TS_ERRNO  -I../sparc/src/cmd/ksh93  -I../common/include  -I/builds/gcc-fixes/proto/root_sparc/usr/include/ast  -DKSHELL  -DSHOPT_BRACEPAT  -DSHOPT_CMDLIB_BLTIN=0  '-DSH_CMDLIB_DIR="/usr/ast/bin"'  '-DSHOPT_CMDLIB_HDR="solaris_cmdlist.h"'  -DSHOPT_DYNAMIC  -DSHOPT_ESH  -DSHOPT_FILESCAN  -DSHOPT_HISTEXPAND  -DSHOPT_KIA  -DSHOPT_MULTIBYTE  -DSHOPT_NAMESPACE  -DSHOPT_OPTIMIZE  -DSHOPT_PFSH  -DSHOPT_RAWONLY  -DSHOPT_STATS  -DSHOPT_SUID_EXEC  -DSHOPT_SYSRC  -DSHOPT_TYPEDEF  -DSHOPT_VSH  -D_BLD_shell  -D_PACKAGE_ast  '-DERROR_CATALOG="libshell"'  -DERROR_CONTEXT_T=Error_context_t  '-DUSAGE_LICENSE= "[-author?David Korn < xxxxx@xxxxx.com>]" "[-copyright?Copyright (c) 1982-2008 AT&T Intellectual Property]" "[-license?http://www.opensource.org/licenses/cpl1.0.txt]" "[--catalog?libshell]"' -DPIC -D_REENTRANT -c -o pics/bltins/shiocmd_solaris.o ../common/bltins/shiocmd_solaris.c
+ /usr/sfw/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -nodefaultlibs -mno-integer-ldd-std -D__sun -fno-strict-aliasing -fno-unit-at-a-time -fno-optimize-sibling-calls -O2 -m32 -mno-app-regs -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 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -gdwarf-2 -std=gnu99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -fno-dwarf2-indirect-strings -DTEXT_DOMAIN="SUNW_OST_OSLIB" -D_TS_ERRNO -I../sparc/src/cmd/ksh93 -I../common/include -I/builds/gcc-fixes/proto/root_sparc/usr/include/ast -DKSHELL -DSHOPT_BRACEPAT -DSHOPT_CMDLIB_BLTIN=0 -DSH_CMDLIB_DIR="/usr/ast/bin" -DSHOPT_CMDLIB_HDR="solaris_cmdlist.h" -DSHOPT_DYNAMIC -DSHOPT_ESH -DSHOPT_FILESCAN -DSHOPT_HISTEXPAND -DSHOPT_KIA -DSHOPT_MULTIBYTE -DSHOPT_NAMESPACE -DSHOPT_OPTIMIZE -DSHOPT_PFSH -DSHOPT_RAWONLY -DSHOPT_STATS -DSHOPT_SUID_EXEC -DSHOPT_SYSRC -DSHOPT_TYPEDEF -DSHOPT_VSH -D_BLD_shell -D_PACKAGE_ast -DERROR_CATALOG="libshell" -DERROR_CONTEXT_T=Error_context_t -DUSAGE_LICENSE= "[-author?David Korn < xxxxx@xxxxx.com>]" "[-copyright?Copyright (c) 1982-2008 AT&T Intellectual Property]" "[-license?http://www.opensource.org/licenses/cpl1.0.txt]" "[--catalog?libshell]" -DPIC -D_REENTRANT -c -o pics/bltins/shiocmd_solaris.o ../common/bltins/shiocmd_solaris.c -mcpu=v8 -mno-v8plus 
ERROR: ctfconvert: die 8002: failed to get unsigned (form 0x13)
Removing pics/bltins/shiocmd_solaris.o
*** Error code 1
The following command caused the error:
/usr/ccs/bin/mcs -d -a "@(#)SunOS 5.11 veritastest:gcc-fixes:01-29-2009 October 2007" pics/bltins/shiocmd_solaris.o ; /builds/gcc-fixes/usr/src/tools/proto/opt/onbld/bin/sparc/ctfconvert -i -L VERSION pics/bltins/shiocmd_solaris.o
make: Fatal error: Command failed for target `pics/bltins/shiocmd_solaris.o'
Current working directory /builds/gcc-fixes/usr/src/lib/libshell/sparc
*** Error code 1
The following command caused the error:
cd sparc; pwd; /usr/ccs/bin/make install
make: Fatal error: Command failed for target `sparc'
Current working directory /builds/gcc-fixes/usr/src/lib/libshell

Apparently ctfconvert doesn't like the variable declared in the middle of b_poll:

        struct pollfd pollfd[bpoll_max];

changing that in various ways (alloca, hardcoding a size) makes it better.

It might be better to fix ctfconvert but I don't know much about that, so I thought
I'd file this bug to note the problem as well as allow a possible source change
to work around it :)
Work Around
N/A
Comments
N/A