[GRASS-windows] Compiling grass 6.4 on windows Xp using OSGeo4W (ERROR: Could not determine External PROJ.4 version)

ines_cherif ines_cherif at voila.fr
Wed Jul 20 08:49:21 EDT 2011


I' m trying to compile grass 6.4 on my PC (Windows XP, 32bits) strictly following the instructions provided on: http://trac.osgeo.org/grass/wiki/CompileOnWindows. However I get the following error when running package.sh./ 

checking for location of External PROJ.4 includes... 
checking for proj_api.h... yes
checking External PROJ.4 version... ./configure: line 7173:  6352 Segmentation fault      (core dumped) ( eval $ac_link ) 2>&5
configure: error: *** Could not determine External PROJ.4 version.

Note that I needed to remove opengl to avoid other errors.
Thanks in advance for helping on the issue.
nesch

-----------------------------------------------------------
Below is the content of the package.log:
-----------------------------------------------------------

Wed Jul 20 14:22:12 GTB 2011: STARTING configure
      0 [main] sh 7112 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 4612 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 1700 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 6844 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 4192 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 3452 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 5500 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 6864 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 6104 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 2712 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 3456 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 7608 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for Cygwin environment... no
checking for mingw32 environment... yes
checking for executable suffix... .exe
checking for full floating-point support... yes
checking for pwd... /bin/pwd
checking for source directory... /osgeo4w/usr/src/grass-6.4.2svn
checking for build directory... /osgeo4w/usr/src/grass-6.4.2svn
      0 [main] sh 7112 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
checking for svnversion... no
checking for MacOSX App... no
checking for MacOSX architectures... no
checking for MacOSX SDK... no
checking how to build libraries... shared
checking for ranlib... ranlib
checking how to run the C preprocessor... ./configure: line 1589:  4612 Segmentation fault      (core dumped) ( eval $ac_try ) 2>&5
grep: conftest.out: No such file or directory
gcc -E
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... MINGW32_NT-5.1-1.0.11(0.46/3/2)
checking for dlopen in -ldl... no
checking for ar... ar
checking for additional include dirs... 
checking for additional library dirs... /c/OSGeo4W/lib /osgeo4w/usr/src/grass-6.4.2svn/mswindows/osgeo4w/lib
checking for a BSD compatible install... /bin/install -c
checking for flex... flex
checking for yywrap in -lfl... no
checking for bison... bison -y
checking for ranlib... ranlib
checking for ar... ar
checking for env... env
checking for perl... no
checking for ANSI C header files... yes
checking for limits.h... yes
checking for termio.h... ./configure: line 4163:  5640 Segmentation fault      (core dumped) ( eval $ac_try ) 2>&5
grep: conftest.out: No such file or directory
yes
checking for termios.h... no
checking for unistd.h... yes
      0 [main] sh 4256 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
checking for values.h... yes
checking for f2c.h... no
checking for g2c.h... no
checking for sys/ioctl.h... no
checking for sys/mtio.h... no
checking for sys/resource.h... no
checking for sys/time.h... yes
checking for sys/timeb.h... yes
checking for sys/types.h... yes
checking for sys/utsname.h... no
checking for libintl.h... yes
checking for iconv.h... yes
      0 [main] sh 4260 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
checking for langinfo.h... no
checking whether time.h and sys/time.h may both be included... yes
checking for off_t... yes
checking for uid_t in sys/types.h... no
checking return type of signal handlers... void
checking for Cygwin environment... no
checking for ftime... yes
checking for gethostname... no
checking for gettimeofday... yes
checking for lseek... yes
checking for nice... no
checking for time... ./configure: line 4524:   412 Segmentation fault      (core dumped) ( eval $ac_link ) 2>&5
no
checking for uname... no
checking for seteuid... no
checking for setpriority... no
checking for setreuid... no
checking for setruid... no
checking for drand48... no
checking for putenv... yes
checking for setenv... no
checking for nanosleep... no
checking whether setpgrp takes no argument... ./configure: line 4787:  7112 Segmentation fault      (core dumped) ( eval $ac_link ) 2>&5
yes
checking for long long int... yes
checking for W11... no
checking for X... disabled
checking whether to use Curses... yes
checking for curses.h... ./configure: line 5924:   196 Segmentation fault      (core dumped) ( eval $ac_try ) 2>&5
grep: conftest.out: No such file or directory
yes
checking curses.h WINDOW structure component... _maxy
checking for initscr in -lncurses...       0 [main] sh 5492 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
no
checking for initscr in -lcurses... yes
checking for keypad in -lncurses... no
checking for keypad in -lcurses... yes
checking for gtty in -lcompat... no
checking for gtty in -lbsd-compat... ./configure: line 6040:  3828 Segmentation fault      (core dumped) ( eval $ac_link ) 2>&5
no
checking for gtty in -lbsd...       0 [main] sh 4652 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
./configure: line 6040:  4656 Segmentation fault      (core dumped) ( eval $ac_link ) 2>&5
no
checking for library containing cuserid... no
checking for xdrmem_create... no
checking for xdrmem_create in -lsun... no
checking for xdrmem_create in -lnsl... no
checking for xdrmem_create in -lrpclib... no
checking for xdrmem_create in -lxdr... yes
checking for asprintf... no
checking for atan... yes
checking for dlsym... no
checking for dlsym in -ldl...       0 [main] sh 3556 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
no
checking for iconv... no
checking for iconv in -liconv... no
checking for iconv in -lgiconv...       0 [main] sh 464 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
no
checking for libiconv... no
checking for libiconv in -liconv... yes
checking for socket... no
checking for socket in -lsocket... no
configure: warning: *** Unable to locate socket() function.
checking for location of zlib includes... 
checking for zlib.h...       0 [main] sh 4328 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
yes
checking for location of zlib library... 
checking for deflate in -lz... yes
checking for location of External PROJ.4 includes... 
checking for proj_api.h... yes
checking External PROJ.4 version... ./configure: line 7173:  6352 Segmentation fault      (core dumped) ( eval $ac_link ) 2>&5
configure: error: *** Could not determine External PROJ.4 version.

-----------------------------------------------------------
The package.sh I use is:
-----------------------------------------------------------

#!/c/OSGeo4W/apps/msys/bin/sh

set -e

PWD="$(pwd)"

if ! [ -d mswindows ]; then
    echo Start from GRASS toplevel dir
    exit 1
fi

if ! [ -d /tmp ]; then 
    mkdir /tmp 
    if ! [ -d /tmp ]; then 
     echo /tmp does not exists 
     exit 1 
    fi 
fi 

export PACKAGE=${1:-1} 
export OSGEO4W_ROOT_MSYS="/c/OSGeo4W"
export OSGEO4W_ROOT="C:\\\OSGeo4W"
export PATH=.:/c/mingw/bin:/usr/local/bin:/bin:$OSGEO4W_ROOT_MSYS/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Subversion:$PWD/mswindows/osgeo4w

T0=$(date +%s) 
LT=$T0 
CS="" 

log() { 
    local D T 
    NOW=$(date) 
    T=$(date +%s) 
    
    if [ -n "$CS" ]; then 
        local D H M S 
     (( S=T-$LT )) 
     (( M=S/60 )); (( S=S%60 )) 
     (( H=M/60 )); (( M=M%60 )) 
     (( D=H/24 )); (( H=H%24 )) 
     
     echo -n "$NOW: FINISHED $CS AFTER " 
     (( D>0 )) && echo -n "${D}d" 
     (( H>0 )) && echo -n "${H}h" 
     (( M>0 )) && echo -n "${M}m" 
     echo "${S}s" 
    fi 
    
    CS="$@" 
    LT=$T 
    if [ -n "$CS" ]; then 
        echo $NOW: STARTING $CS 
    elif [ -n "$T0" ]; then 
     CS="COMPLETE RUN" 
     LT=$T0 
     T0="" 
     log 
    fi 
}

exec 3&1 >> mswindows/osgeo4w/package.log 2>&1 

[ -d mswindows/osgeo4w/lib ] || mkdir mswindows/osgeo4w/lib 
cp -uv $OSGEO4W_ROOT_MSYS/lib/sqlite3_i.lib mswindows/osgeo4w/lib/libsqlite3.a 
cp -uv $OSGEO4W_ROOT_MSYS/lib/proj.lib mswindows/osgeo4w/lib/libproj.a 
cp -uv $OSGEO4W_ROOT_MSYS/lib/libtiff_i.lib mswindows/osgeo4w/lib/libtiff.a 
cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/libpq.a 
cp -uv $OSGEO4W_ROOT_MSYS/lib/jpeg_i.lib mswindows/osgeo4w/lib/libjpeg.a 
cp -uv $OSGEO4W_ROOT_MSYS/lib/zlib.lib mswindows/osgeo4w/lib/libz.a 

if ! [ -f mswindows/osgeo4w/configure-stamp ]; then

    if [ -e include/Make/Grass.make ] ; then
        log make distclean
        make distclean
    fi

    log configure
    ./configure \
        --with-libs="$OSGEO4W_ROOT_MSYS/lib $PWD/mswindows/osgeo4w/lib" \
        --with-includes=$OSGEO4W_ROOT_MSYS/include \
        --libexecdir=$OSGEO4W_ROOT_MSYS/bin \
        --prefix=$OSGEO4W_ROOT_MSYS/apps/grass \
            --bindir=$OSGEO4W_ROOT_MSYS/bin \
        --includedir=$OSGEO4W_ROOT_MSYS/include \
        --disable-x --without-x \
        --with-cxx \
        --enable-shared \
        --enable-largefile \
        --without-opengl \
        --with-fftw \
        --with-libz \
        --with-freetype \
        --with-proj-share=$OSGEO4W_ROOT_MSYS/share/proj \
        --with-gdal=$PWD/mswindows/osgeo4w/gdal-config \
        --with-geos=$PWD/mswindows/osgeo4w/geos-config \
        --with-tcltk \
        --with-sqlite \
        --with-postgres \
        --with-curses \
        --with-regex \
        --with-nls \
        --with-freetype-includes=$OSGEO4W_ROOT_MSYS/include/freetype2 \
        --with-odbc

    touch mswindows/osgeo4w/configure-stamp
fi

log make 
make -k || ( cat error.log >&3 && false ) 

log make install
make install

log cleanup
mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h \
    $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h.mingw
cp mswindows/osgeo4w/config.h.switch $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h
cp mswindows/osgeo4w/config.h.vc $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass
sed -e "s#@VERSION@#$VERSION#g" -e "s#@osgeo4w@#$OSGEO4W_ROOT#g" \
    mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.bat
sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT_MSYS@#$OSGEO4W_ROOT#g" \
    mswindows/osgeo4w/env.bat.tmpl >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/env.bat
sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
    mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass$MAJOR$MINOR.bat 
sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
    mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass$MAJOR$MINOR.bat 

if [ -f /c/mingw/bin/libgnurx-0.dll ]; then
    cp /c/mingw/bin/libgnurx-0.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin 
    cp /c/mingw/bin/libiconv-2.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin 
    cp /c/mingw/bin/libintl-8.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
fi

# P="$(pwd -W)"
# P="${P//\//\\\\}\\\\dist.i686-pc-mingw32"

# sed -e "s#$P#@osgeo4w@#g" $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap.tmpl
# rm "$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap"

if [ -n "$1" ]; then
    PACKAGE="$1"
    log building vc libraries 
    sh mswindows/osgeo4w/mklibs.sh $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib/*.$VERSION.dll 
    mv mswindows/osgeo4w/vc/grass*.lib $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib
    # rm $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib/*.dll
    
    # log BUILDING GDAL GRASS plugins 
    # $COMSPEC /c "mswindows\\osgeo4w\\gdalplugins.cmd $VERSION" 
    
    log CREATING PACKAGES 
    mkdir -p package/grass$MAJOR$MINOR 
    
    PDIR=$PWD/package
    SRC=$PWD
    cd $OSGEO4W_ROOT_MSYS 
    
    sed -e "s#GISBASE_VALUE#@osgeo4w@\\\apps\\\grass\\\grass-$VERSION#g" \
    $SRC/lib/init/grass.src >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.tmpl
    sed -e "s#@VERSION@#$VERSION#g" \
    $SRC/mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.bat.tmpl
    
    tar -cjf $PDIR/grass$MAJOR$MINOR/grass-$VERSION-$PACKAGE.tar.bz2 \
    apps/grass/grass-$VERSION \
    bin/grass$MAJOR$MINOR.bat.tmpl \
    bin/grass$MAJOR$MINOR.tmpl \
    bin/libintl3.dll \
    bin/libiconv2.dll \
    bin/regex2.dll \
    etc/postinstall/grass$MAJOR$MINOR.bat \
    etc/preremove/grass$MAJOR$MINOR.bat
    
    rm bin/grass$MAJOR$MINOR.tmpl
    rm bin/grass$MAJOR$MINOR.bat.tmpl
    
    cd $PDIR/.. 
    svn diff >/tmp/grass-$VERSION.diff
    tar -C /tmp -cjf $PDIR/grass$MAJOR$MINOR/grass-$VERSION-$PACKAGE-src.tar.bz2 grass-$VERSION.diff 
fi

log 

exit 0

___________________________________________________________
Vous êtes célibataires ? Découvrez nos 10 destinations de vacances tendances sur Voila.fr http://actu.voila.fr/evenementiel/VacancesEte2011/vacances-pour-celibataires/grece-corfou-la-romantique_226870.html#photo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-windows/attachments/20110720/f053e0d8/attachment-0001.html


More information about the grass-windows mailing list