octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finally actually using gnulib


From: Benjamin Lindner
Subject: Re: finally actually using gnulib
Date: Sat, 21 Nov 2009 18:10:26 +0100
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

| During building I get the following two errors
| | ../../run-octave -f -q -H | /octmgw32/octave/octave-tip-automake/doc/interpreter/mk_doc_cache.m | doc-cache ../../src/DOCSTRINGS ../../scripts/DOCSTRINGS || rm -f doc-cache
| error: : mkstemp: not supported on this sytem

I think we can fix this problem by using the mkstemp function that
gnulib provides.  Or, you can try modifying this code in
src/file-io.cc:

  #if defined (HAVE_MKSTEMPS)
  // Prototype for mkstemps in libiberty
  extern "C" int mkstemps (char *pattern, int suffix_len);
  #endif

  #if ! defined (HAVE_MKSTEMP) && ! defined (HAVE_MKSTEMPS) && defined 
(_MSC_VER)
  # if defined (HAVE_FCNTL_H)
  #  include <fcntl.h>
  # endif
  # if defined (HAVE_SYS_STAT_H)
  #  include <sys/stat.h>
  # endif
  int mkstemp (char *tmpl)
  {
    int ret=-1;
    mktemp (tmpl);
    ret = open (tmpl, O_RDWR | O_BINARY | O_CREAT | O_EXCL | _O_SHORT_LIVED,
                _S_IREAD | _S_IWRITE);
    return ret;
  }
  #define HAVE_MKSTEMP 1
  #endif

I don't see why it should be restricted to just _MSC_VER.  It looks to
me like it should work on any system that has the open system call and
all the needed O_x, _O_x, and _S_x macros defined.


No, mingw's gcc provides the required function in -liberty. There's a
check for this in configure, but I see in the log file that it fails.
I don't know what has been changed in configure, but the problem is
the wrong declaration in the test code.

configure:47870: checking for mkstemps in libiberty
configure:47905: mingw32-g++-4.4.0-dw2 -shared-libgcc -o conftest.exe -march=i686 -mtune=generic -O3 -Wall -I/usr/local/octmgw32_gcc-4.4.0-dw2/include -shared-libgcc -Wl,--allow-multiple-definition conftest.cpp -liberty -lm -lfreetype -lz -lopengl32 -lglu32 -lgdi32 -lws2_32 -luser32 -lkernel32 >&5

onftest.cpp: In function 'int main()':
conftest.cpp:212: warning: deprecated conversion from string constant to 'char*' C:\Users\ben\LOCALS~1\Temp\ccwNHOio.o:conftest.cpp:(.text+0x1e): undefined reference to `mkstemps(char*, int)'
collect2: ld returned 1 exit status
configure:47912: $? = 1
configure: failed program was:
|
| <snip>
| int mkstemps (char *pattern, int suffix_len);
| #ifdef F77_DUMMY_MAIN
|
| #  ifdef __cplusplus
|      extern "C"
| #  endif
|    int F77_DUMMY_MAIN() { return 1; }
|
| #endif
| int
| main ()
| {
| mkstemps ("XXXXXX", 0);
|
|   ;
|   return 0;
| }

Since g++ is used for compiling the test code, mkstemps' declaration is
missing a
  extern "C"
as it is a C-Function in -liberty.

If I compare it to config.log from octave 3.2.3, I see that there it reads:

configure:27134: checking for mkstemps in libiberty
configure:27169: mingw32-gcc-4.4.0-dw2 -o conftest.exe -march=i686 -mtune=generic -O3 -Wall -shared-libgcc -Wl,--allow-multiple-definition conftest.c -liberty -lhdf5 -lz -lm -lgdi32 -lws2_32 -luser32 -lkernel32 >&5
configure:27176: $? = 0
configure:27184: result: yes

So here gcc is used, in contrast to g++ above.
I don't see why it picks a different compiler here.

| make[2]: Entering directory | `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2' | make[2]: *** No rule to make target `mkoctfile.exe', needed by `all-am'. | Stop.

At what point in the build process did this error occur?


The make transcript reads

$ ./build-testautomake-4.sh build
build
time make -j8
making run-octave from /octmgw32/octave/octave-tip-automake/run-octave.in
run-octave is unchanged
chmod a+rx "run-octave"
make  all-recursive
make[1]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2'
Making all in libgnu
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/libgnu'
make  all-recursive
make[3]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/libgnu' make[4]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/libgnu'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/libgnu' make[3]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/libgnu' make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/libgnu'
Making all in libcruft
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/libcruft'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/libcruft'
Making all in liboctave
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/liboctave'
make  all-am
make[3]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/liboctave'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/liboctave' make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/liboctave'
Making all in src
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/src' making defaults.h from /octmgw32/octave/octave-tip-automake/src/defaults.h.in
defaults.h is unchanged
make  all-am
make[3]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/src' making defaults.h from /octmgw32/octave/octave-tip-automake/src/defaults.h.in
defaults.h is unchanged
rm -f DLD-FUNCTIONS/daspk.oct
rm -f DLD-FUNCTIONS/eig.oct
rm -f DLD-FUNCTIONS/find.oct
la=`echo DLD-FUNCTIONS/daspk.la | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
of=`echo DLD-FUNCTIONS/daspk.oct | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
          cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of
rm -f DLD-FUNCTIONS/fltk_backend.oct
la=`echo DLD-FUNCTIONS/eig.la | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
of=`echo DLD-FUNCTIONS/eig.oct | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
          cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of
la=`echo DLD-FUNCTIONS/find.la | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
of=`echo DLD-FUNCTIONS/find.oct | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
          cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of la=`echo DLD-FUNCTIONS/fltk_backend.la | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \ of=`echo DLD-FUNCTIONS/fltk_backend.oct | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
          cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of
rm -f DLD-FUNCTIONS/hess.oct
rm -f DLD-FUNCTIONS/md5sum.oct
rm -f DLD-FUNCTIONS/pinv.oct
rm -f DLD-FUNCTIONS/sparse.oct
la=`echo DLD-FUNCTIONS/hess.la | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
of=`echo DLD-FUNCTIONS/hess.oct | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
          cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of
la=`echo DLD-FUNCTIONS/md5sum.la | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
of=`echo DLD-FUNCTIONS/md5sum.oct | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
          cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of
la=`echo DLD-FUNCTIONS/pinv.la | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
of=`echo DLD-FUNCTIONS/pinv.oct | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
          cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of
la=`echo DLD-FUNCTIONS/sparse.la | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
of=`echo DLD-FUNCTIONS/sparse.oct | /usr/bin/sed 's,DLD-FUNCTIONS/,,'` && \
          cd DLD-FUNCTIONS && \
ln -s .libs/`/usr/bin/sed -n -e "s/dlname='\([^']*\)'/\1/p" < $la` $of make[3]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/src' make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/src'
Making all in scripts
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/scripts' making plot/gnuplot_binary.m from /octmgw32/octave/octave-tip-automake/scripts/plot/gnuplot_binary.in
plot/gnuplot_binary.m is unchanged
make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/scripts'
Making all in doc
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc'
Making all in faq
make[3]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc/faq'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc/faq'
Making all in interpreter
make[3]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc/interpreter' ../../run-octave -f -q -H /octmgw32/octave/octave-tip-automake/doc/interpreter/mk_doc_cache.m doc-cache ../../src/DOCSTRINGS ../../scripts/DOCSTRINGS || rm -f doc-cache
error: : mkstemp: not supported on this sytem
make[3]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc/interpreter'
Making all in liboctave
make[3]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc/liboctave'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc/liboctave'
Making all in refcard
make[3]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc/refcard'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc/refcard' make[3]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc'
making conf.texi from /octmgw32/octave/octave-tip-automake/doc/conf.texi.in
/bin/sh: line 0: cd: /usr/local/octmgw32_gcc-4.4.0-dw2/octave/tip-automake-4: No such file or directory if [ -s conf.texi-t ]; then /octmgw32/octave/octave-tip-automake/move-if-change conf.texi-t conf.texi; else echo "conf.texi-t is empty!" 1>&2; rm -f conf.texi-t; exit 1; fi
conf.texi is unchanged
make[3]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc' make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/doc'
Making all in examples
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/examples'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/examples'
Making all in test
make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/test'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2/test' make[2]: Entering directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2' make[2]: *** No rule to make target `mkoctfile.exe', needed by `all-am'. Stop. make[2]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/octmgw32/octave/.build_mingw32_octave-tip-automake-4_gcc-4.4.0-dw2'
make: *** [all] Error 2

benjamin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]