[Cygwin64] dash segfault
Peter Rosin
peda@lysator.liu.se
Mon Mar 11 16:28:00 GMT 2013
On 2013-03-11 15:35, Peter Rosin wrote:
> Second, there's the non-crash exit (where dash sometimes exits w/o
> triggering error_start, this still happens with -3):
>
> Basically, this time config.status didn't complete, and the configure
> output ended with:
>
> config.status: creating m4/Makefile
> config.status: creating libgii.conf
>
> but it is expected that it carries on with:
>
> config.status: creating dist/Makefile
> config.status: creating dist/rpm/Makefile
> config.status: creating dist/rpm/libgii.spec
> config.status: creating config.h
> config.status: executing depfiles commands
> config.status: executing libtool commands
>
>
> That premature unexplained exit later killed make with:
>
> ...
> Making all in input
> make[2]: Entering directory `/cygdrive/c/Cygwin/home/peda/ggi/cyg64/gii/input'
> Making all in directx
> make[3]: Entering directory `/cygdrive/c/Cygwin/home/peda/ggi/cyg64/gii/input/directx'
> Makefile:314: .deps/di.Plo: No such file or directory
> Makefile:315: .deps/dxguid.Plo: No such file or directory
> Makefile:316: .deps/input.Plo: No such file or directory
> ...
>
> due to the deps not being there.
>
> This bug is really troublesome, it does not give me a cozy feeling when
> scripts only get half-done w/o any notice...
[I wrote most of this before you asked me to test some assumption]
I have now finally managed to collect the exit status after such
a premature exit. Zero (or it might not get propagated back to the
calling shell by configure). This time, configure output ended
with:
checking for as... as
checking for dlltool... (cached) dlltool
checking for objdump... (cached) objdump
checking for objdir... .libs
The next expected line (which didn't appear) is:
checking if gcc supports -fno-rtti -fno-exceptions... no
But it seems to happen more often when configure runs config.status
near the end. Oh, right, I sometimes see a fourth class of errors,
config.status: creating config.h
config.status: executing depfiles commands
Segmentation fault
config.status: executing libtool commands
I.e., sometimes I get a Segmentation fault message when the process
terminates prematurely.
I'm also sad to report that while the gdb triggers have gone down
in frequency with -3, the premature exits have gone up, and I have
yet to see a clean run with either of 1.7.18-2 or -3...
It might be time to reveal exactly what I'm doing, even if it isn't
anything special...
mkdir ggi
cd ggi
cvs -d:pserver:anonymous@ggi.cvs.sourceforge.net:/cvsroot/ggi login
cvs -z3 -d:pserver:anonymous@ggi.cvs.sourceforge.net:/cvsroot/ggi co -P ggi-core
mkdir cyg64
cd cyg64
cat <<'EOF' > build.sh
#!/bin/sh
CONFOPTS=--disable-static
auto=yes
get=
agen=
full=
conf=
make=auto
inst=auto
log ()
{
file=$1
echo =========================== | tee -a "$file"
echo "$2" | tee -a "$file"
echo =========================== | tee -a "$file"
}
fixauto ()
{
if test $auto = no; then
test "$make" = auto && make=
test "$inst" = auto && inst=
fi
}
dolib ()
{
lib=$1
src=$2
tla=$3
test "$tla" || tla=cvs
fixauto
dir=`pwd`
logfile=$dir/$lib.log
rm -rf $logfile
log $logfile $lib
mkdir $lib 2> /dev/null
cd $lib
cd $src
test "$get" && log $logfile "$tla up"
test "$get" && $tla up 2>&1 | tee -a $logfile
test "$agen" && log $logfile "./autogen.sh"
test "$agen" && ./autogen.sh 2>&1 | tee -a $logfile
cd $dir
test "$full" && log $logfile "rm -rf $lib"
test "$full" && rm -rf $lib 2>&1 | tee -a $logfile
test "$full" && mkdir $lib
cd $lib
test "$conf" && log $logfile "$src/configure $cacheopt $CONFOPTS"
test "$conf" && eval "CONFIG_SHELL=/usr/bin/dash /usr/bin/dash $src/configure $cacheopt $CONFOPTS; echo "'"exit status: $?"' 2>&1 | tee -a $logfile
test "$make" && log $logfile "make"
test "$make" && make 2>&1 | tee -a $logfile
test "$inst" && log $logfile "make install"
test "$inst" && make install 2>&1 | tee -a $logfile
cd $dir
}
for opt in $@; do
case $opt in
--all)
auto=no
get=yes
agen=yes
full=yes
conf=yes
make=yes
inst=yes
;;
--get) auto=no; get=yes ;;
--noget) auto=no; get= ;;
--autogen) auto=no; agen=yes ;;
--noautogen) auto=no; agen= ;;
--full) auto=no; full=yes ;;
--nofull) auto=no; full= ;;
--conf) auto=no; conf=yes ;;
--noconf) auto=no; conf= ;;
--make) auto=no; make=yes ;;
--nomake) auto=no; make= ;;
--inst) auto=no; inst=yes ;;
--noinst) auto=no; inst= ;;
test)
fixauto
test "$get" && echo cvs up
test "$agen" && echo autogen.sh
test "$full" && echo rm -rf
test "$conf" && echo "configure $CONFOPTS"
test "$make" && echo make
test "$inst" && echo make install
;;
gg) dolib gg ../../ggi-core/libgg ;;
gii) dolib gii ../../ggi-core/libgii ;;
ggi) dolib ggi ../../ggi-core/libggi ;;
wmh) dolib wmh ../../misc/libggiwmh ;;
gcp) dolib gcp ../../misc/libggigcp ;;
misc) dolib misc ../../lowlevel/libggimisc ;;
gic) dolib gic ../../ggi-libs/libggigic ;;
galloc) dolib galloc ../../ggi-core/libgalloc ;;
blt) dolib blt ../../lowlevel/libggiblt ;;
buf) dolib buf ../../lowlevel/libggibuf ;;
ovl) dolib ovl ../../lowlevel/libggiovl ;;
bse) dolib bse ../../ggi-libs/libggibse ;;
gpf) dolib gpf ../../ggi-libs/libggigpf ;;
3d) dolib 3d ../../highlevel/libggi3d ;;
gl) dolib gl ../../highlevel/libggigl ;;
video) dolib video ../../highlevel/libvideo ;;
xmi) dolib xmi ../../highlevel/libxmi ;;
svga) dolib svga ../../wrappers/svgalib ;;
widget) dolib widget ../../widget svn ;;
esac
done
EOF
chmod +x build.sh
# here you need to go to each of ggi-core/libgg ggi-core/libgii
# and ggi-core/libggi, and run their respective autogen.sh
# scripts from some environment that has autotools, and then
# back to Cygwin-64 with
./build.sh --full --conf --make --inst gg gii ggi
And this last command is what I'm running again and again. It
will install libgg, libgii and libggi under /usr/local. You
should be able to run a demo with ggi/programs/demos/flying_ggis
if you manage to get it built.
Ahhhhrrrgg, you also need to patch the w32api headers with this
patch for it to build:
https://sourceforge.net/tracker/?func=detail&atid=983356&aid=3605977&group_id=202880
Cheers,
Peter
More information about the Cygwin-developers
mailing list