make-w32
[Top][All Lists]
Advanced

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

make'ing make-3.18beta4 under mingw/msys - "undefined reference to `slee


From: Markus Mauhart
Subject: make'ing make-3.18beta4 under mingw/msys - "undefined reference to `sleep'"
Date: Fri, 30 Dec 2005 19:24:13 +0100

Hi,


I built make-3.18beta4 (-> ftp://alpha.gnu.org/gnu/make) both under
cygwin and under mingw/msys, using basically the same commands inside
cygwin's and msys' bash:

  ---
  srcroot=/c/usr/src
  dstroot=/c/mau/out/cyg <------ for cygwin
  dstroot=/c/mau/out/mss <------ for msys/mingw
  pkg=make-3.81beta4
  src=$srcroot/$pkg
  dst=$dstroot/$pkg
  [ -d $dst ] || mkdir $dst && cd $dst
  $src/configure --enable-case-insensitive-file-system --disable-rpath
  make CFLAGS='-O3 -s'
  ---

100% ok for cygwin.

 99% ok for msys -- the last build instruction fails:

  ---
  gcc  -O3 -s   -o loadavg.exe  loadavg-getloadavg.o
  loadavg-getloadavg.o:getloadavg.c:(.text+0xd5): undefined reference to `sleep'
  collect2: ld returned 1 exit status
  make[2]: *** [loadavg.exe] Error 1
  make[2]: Leaving directory `/c/mau/out/mss/make-3.81beta4'

  ---

... getloadavg.c unconditionally uses POSIX sleep() which comes from
<unistd.h> ... but it has #ifdef HAVE_UNISTD_H #include <unistd.h> #endif.
And config.h has "#define HAVE_UNISTD_H 1" ... looks like we are missing
the corresponding lib during linking.

Q: Is this a problem of my msys/mingw installation|usage, or a general
   problem of current msys/mingw ?


Thanks,
Markus.







reply via email to

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