bug-lilypond
[Top][All Lists]
Advanced

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

Re: lilypond-1.8.0 d'ont compile


From: Thomas Willhalm
Subject: Re: lilypond-1.8.0 d'ont compile
Date: Mon, 01 Sep 2003 17:54:52 +0200
User-agent: KNode/0.7.2

On Mon, 18 Aug 2003 05:23:34 -0700, Edmundo Marcelo Navarrete wrote:
> I am runnning SuSE-8.2 , gcc-3.3 (from SuSE) guile-1.6.4 (tarball) and 
> flex-2.5.31 (tarball).-
> 1) ./configure is OK
> 2) the out oF "make all" is:
[...]
> libc-extension.cc: In function `int snprintf(char*, unsigned int, const
> char*,...)':
> libc-extension.cc:143: error: declaration of `int snprintf(char*, unsigned 
> int, const char*, ...)' throws different exceptions
> include/libc-extension.hh:29: error: than previous declaration `int
> snprintf(char*, unsigned int, const char*, ...) throw ()'

I get the same error with SuSE-8.2 and lilypond 1.8.1. 

If I'm right, the problem is that the configure script concludes that
snprintf is not provided by stdio.h although it is. If I change in
config.h the setting for HAVE_SNPRINTF and HAVE_VSNPRINTF, the file
compiles. (I get another error in the directory lily, but I assume that this
is not related to this problem.)

Since I always avoided function pointers, I cannot judge whether the test in
configure should work. Here is the exerpt from config.h:

configure:7307: checking for snprintf
configure:7357: g++ -o conftest  -O2 -finline-functions -g  
-I/usr/include/python2.2   conftest.cc -lkpathsea  >&5
configure:7320:1: warning: "PACKAGE_NAME" redefined
configure:7314:1: warning: this is the location of the previous definition
configure:7376: error: nonnull argument with out-of-range operand number
(arg 1
   , operand 3)
configure:7360: $? = 1
configure: failed program was:
| #line 7312 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "lilypond"
| #define PACKAGE_NAME "LilyPond"
| #define TOPLEVEL_VERSION "1.8.1"
| #define DIRSEP '/'
| #define PATHSEP ':'
| #define DATADIR "/usr/local/share"
| #define BUILD_PACKAGE_DATADIR
"/export/home/i11pc210/thomas/linux/src/lilypond-1.8.1/share/lilypond"
| #define LIBDIR "NONE/lib"
| #define BUILD_PACKAGE_LIBDIR
"/export/home/i11pc210/thomas/linux/src/lilypond-1.8.1/lib/lilypond"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #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 HAVE_FLEXLEXER_H 1
| #define HAVE_FLEXLEXER_YY_CURRENT_BUFFER 1
| #define LOCALEDIR "/usr/local/share/locale"
| #define HAVE_GETTEXT 1
| #define GUILE_MAJOR_VERSION 1
| #define GUILE_MINOR_VERSION 6
| #define GUILE_PATCH_LEVEL 2
| #define HAVE_KPATHSEA_KPATHSEA_H 1
| #define HAVE_LIBKPATHSEA 1
| #define HAVE_KPSE_FIND_FILE 1
| #define KPATHSEA 1
| #define HAVE_PYTHON_H 1
| #define HAVE_ASSERT_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SSTREAM 1
| #define HAVE_GETTEXT 1
| #define HAVE_ISINF 1
| #define HAVE_MEMMEM 1
| /* end confdefs.h.  */
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char snprintf (); 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
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char snprintf ();
| /* 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_snprintf) || defined (__stub___snprintf)
| choke me
| #else
| char (*f) () = snprintf;
| #endif
| #ifdef __cplusplus
| }
| #endif
|
| int
| main ()
| {
| return f != snprintf;
|   ;
|   return 0;
| }
configure:7377: result: no

The definition in /usr/include/stdio.h is:

#if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
__BEGIN_NAMESPACE_C99
/* Maximum chars of output to write in MAXLEN.  */
extern int snprintf (char *__restrict __s, size_t __maxlen,
                     __const char *__restrict __format, ...)
     __THROW __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
                      __const char *__restrict __format, _G_va_list __arg)
     __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
__END_NAMESPACE_C99
#endif

Best regards
Thomas





reply via email to

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