Subject: about log2 function in GCC on cygwin
From: Tatsuro MATSUOKA <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Fri, 25 Jul 2008 09:52:14 +0900 (JST)
List-Id: <cygwin.cygwin.com>

Hello 

I am now trying to buid octave-3.1.51 on cywin.

I have a question.

The following lines the config.log which are related to log2. 
The existence of log2 is found.  However it did not go well octave configure test.

This gcc is prepared from source with disable-sjlj-exception.
However other options are the same as standard gcc-3.4.4-3.

I would like to know the place where function log2 defined.

Regards

Tatsuro

*******************************************
configure:25965: checking for log2
configure:26029: /opt/octave/gcc-3.4.4dw2/bin/gcc -o conftest.exe -g -O2
-I/opt/octave/gcc-3.4.4dw2/include -I/usr/include -I/opt/octave/octave-3.1.51/include 
-L/opt/octave/gcc-3.4.4dw2/lib -L/opt/octave/octave-3.1.51/lib conftest.c -ldl -lwsock32 -lblas -lhdf5
-lz -lm  -lwsock32 >&5
conftest.c:265: warning: conflicting types for built-in function 'log2'
/cygdrive/c/DOCUME~1/Tatsu/LOCALS~1/Temp/cccEhDNQ.o: In function `main':
/home/octaves/octave-3.1.51/conftest.c:284: undefined reference to `_log2'
collect2: ld returned 1 exit status
configure:26035: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define OCTAVE_SOURCE 1
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define SEPCHAR ':'
| #define SEPCHAR_STR ":"
| #define __NO_MATH_INLINES 1
| #define CXX_NEW_FRIEND_TEMPLATE_DECL 1
| #define CXX_ISO_COMPLIANT_LIBRARY 1
| #define CXX_BROKEN_REINTERPRET_CAST 1
| #define CXX_ABI gnu_v3
| #define HAVE_LIBM 1
| #define HAVE_QHULL 1
| #define HAVE_PCRE 1
| #define HAVE_REGEXEC 1
| #define HAVE_REGEX 1
| #define HAVE_ZLIB_H 1
| #define HAVE_ZLIB 1
| #define HAVE_HDF5_H 1
| #define HAVE_HDF5 1
| #define HAVE_H5GGET_NUM_OBJS 1
| #define HAVE_FFTW3 1
| #define HAVE_GLPK_H 1
| #define HAVE_GLPK 1
| #define HAVE_CURL_CURL_H 1
| #define HAVE_CURL 1
| #define HAVE_MAGICK 1
| #define HAVE_GL_GL_H 1
| #define HAVE_GL_GLU_H 1
| #define HAVE_OPENGL 1
| #define HAVE_FLTK 1
| #define HAVE_IEEE754_DATA_FORMAT 1
| #define F77_FUNC(name,NAME) name ## _
| #define F77_FUNC_(name,NAME) name ## __
| #define HAVE_BLAS 1
| #define HAVE_SUITESPARSE_AMD_H 1
| #define HAVE_AMD 1
| #define HAVE_SUITESPARSE_UMFPACK_H 1
| #define HAVE_UMFPACK 1
| #define UMFPACK_SEPARATE_SPLIT 1
| #define HAVE_SUITESPARSE_COLAMD_H 1
| #define HAVE_COLAMD 1
| #define HAVE_SUITESPARSE_CCOLAMD_H 1
| #define HAVE_CCOLAMD 1
| #define HAVE_SUITESPARSE_CHOLMOD_H 1
| #define HAVE_CHOLMOD 1
| #define HAVE_SUITESPARSE_CS_H 1
| #define HAVE_CXSPARSE 1
| #define HAVE_GETHOSTNAME 1
| #define HAVE_GETPWNAM 1
| #define HAVE_LIBWSOCK32 1
| #define HAVE_DEV_T 1
| #define HAVE_INO_T 1
| #define HAVE_NLINK_T 1
| #define HAVE_NLINK_T 1
| #define HAVE_LONG_LONG_INT 1
| #define HAVE_UNSIGNED_LONG_LONG_INT 1
| #define HAVE_SIGSET_T 1
| #define HAVE_SIG_ATOMIC_T 1
| #define SIZEOF_SHORT 2
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 4
| #define SIZEOF_LONG_LONG 8
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define NPOS std::string::npos
| #define HAVE_PLACEMENT_DELETE 1
| #define HAVE_DYNAMIC_AUTO_ARRAYS 1
| #define STDC_HEADERS 1
| #define HAVE_DIRENT_H 1
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_ASSERT_H 1
| #define HAVE_CURSES_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_FLOAT_H 1
| #define HAVE_GRP_H 1
| #define HAVE_IEEEFP_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_NCURSES_H 1
| #define HAVE_POLL_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_PWD_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_POLL_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TIMES_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_SYS_UTIME_H 1
| #define HAVE_TERMCAP_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_SSTREAM 1
| #define HAVE_TERMIO_H 1
| #define HAVE_GLOB_H 1
| #define HAVE_FNMATCH_H 1
| #define HAVE_FNMATCH 1
| #define HAVE_GLOB 1
| #define HAVE_ATEXIT 1
| #define HAVE_BASENAME 1
| #define HAVE_BCOPY 1
| #define HAVE_BZERO 1
| #define HAVE_CHMOD 1
| #define HAVE_DUP2 1
| #define HAVE_ENDGRENT 1
| #define HAVE_ENDPWENT 1
| #define HAVE_EXECVP 1
| #define HAVE_EXPM1 1
| #define HAVE_EXPM1F 1
| #define HAVE_FCNTL 1
| #define HAVE_FORK 1
| #define HAVE_GETCWD 1
| #define HAVE_GETEGID 1
| #define HAVE_GETEUID 1
| #define HAVE_GETGID 1
| #define HAVE_GETGRENT 1
| #define HAVE_GETGRGID 1
| #define HAVE_GETGRNAM 1
| #define HAVE_GETPGRP 1
| #define HAVE_GETPID 1
| #define HAVE_GETPPID 1
| #define HAVE_GETPWENT 1
| #define HAVE_GETPWUID 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_GETUID 1
| #define HAVE_GETWD 1
| #define HAVE_KILL 1
| #define HAVE_LGAMMA 1
| #define HAVE_LGAMMAF 1
| #define HAVE_LGAMMA_R 1
| #define HAVE_LGAMMAF_R 1
| #define HAVE_LINK 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_LOG1P 1
| #define HAVE_LOG1PF 1
| #define HAVE_LSTAT 1
| #define HAVE_MEMMOVE 1
| #define HAVE_MKDIR 1
| #define HAVE_MKFIFO 1
| #define HAVE_MKSTEMP 1
| #define HAVE_ON_EXIT 1
| #define HAVE_PIPE 1
| #define HAVE_POLL 1
| #define HAVE_PUTENV 1
| #define HAVE_RAISE 1
| #define HAVE_READLINK 1
| #define HAVE_REALPATH 1
| #define HAVE_RENAME 1
| #define HAVE_RINDEX 1
| #define HAVE_RMDIR 1
| #define HAVE_ROUND 1
| #define HAVE_SELECT 1
| #define HAVE_SETGRENT 1
| #define HAVE_SETLOCALE 1
| #define HAVE_SETPWENT 1
| #define HAVE_SETVBUF 1
| #define HAVE_SIGACTION 1
| #define HAVE_SIGPENDING 1
| #define HAVE_SIGPROCMASK 1
| #define HAVE_SIGSUSPEND 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STAT 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR 1
| #define HAVE_STRNCASECMP 1
| #define HAVE_STRPTIME 1
| #define HAVE_STRSIGNAL 1
| #define HAVE_SYMLINK 1
| #define HAVE_TEMPNAM 1
| #define HAVE_TGAMMA 1
| #define HAVE_TGAMMAF 1
| #define HAVE_TRUNC 1
| #define HAVE_UMASK 1
| #define HAVE_UNAME 1
| #define HAVE_UNLINK 1
| #define HAVE_USLEEP 1
| #define HAVE_UTIME 1
| #define HAVE_VFPRINTF 1
| #define HAVE_VSPRINTF 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_WAITPID 1
| #define HAVE__CHMOD 1
| #define HAVE__SNPRINTF 1
| #define HAVE_STRFTIME 1
| #define OCTAVE_HAVE_BROKEN_STRPTIME 1
| #define HAVE_LIBDL 1
| #define HAVE_DLOPEN 1
| #define HAVE_DLSYM 1
| #define HAVE_DLERROR 1
| #define HAVE_DLCLOSE 1
| #define HAVE_DLOPEN_API 1
| #define ENABLE_DYNAMIC_LINKING 1
| #define HAVE_TIMEVAL 1
| #define HAVE_FINITE 1
| #define HAVE_ISNAN 1
| #define HAVE_ISINF 1
| #define HAVE_COPYSIGN 1
| #define HAVE__FINITE 1
| #define HAVE__ISNAN 1
| #define HAVE__COPYSIGN 1
| #define HAVE_DECL_SIGNBIT 1
| #define HAVE_ACOSH 1
| #define HAVE_ACOSHF 1
| #define HAVE_ASINH 1
| #define HAVE_ASINHF 1
| #define HAVE_ATANH 1
| #define HAVE_ATANHF 1
| #define HAVE_ERF 1
| #define HAVE_ERFF 1
| #define HAVE_ERFC 1
| #define HAVE_ERFCF 1
| #define HAVE_EXP2 1
| #define HAVE_EXP2F 1
| /* end confdefs.h.  */
| /* Define log2 to an innocuous variant, in case <limits.h> declares log2.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define log2 innocuous_log2
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char log2 (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef log2
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char log2 ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_log2 || defined __stub___log2
| choke me
| #endif
| 
| #ifdef F77_DUMMY_MAIN
| 
| #  ifdef __cplusplus
|      extern "C"
| #  endif
|    int F77_DUMMY_MAIN() { return 1; }
| 
| #endif
| int
| main ()
| {
| return log2 ();
|   ;
|   return 0;
| }

--------------------------------------
Stop! Global Warming ~ Yahoo! JAPAN Earth Project
http://pr.mail.yahoo.co.jp/earthproject/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/