[Klone-users] C++ compilation

Mickael Auger mickael.auger at gmail.com
Tue May 27 12:49:42 EDT 2008


Hi,

I use :
- m68k-elf-gcc and m68k-elf-g++ 4.2.3 (toolchain of
"freescale-coldfire-4.2")
- klone-2.1.1rc0 with a single "webapp" folder contains a single KLX page
(named index.klx)

I have not "badly punctuated parameter list in `#define'" errors again :)


But I have four new errors (detailed after this trace) at the compilation of
.cc file :
==========================================================================
In file included from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/missing.h:15,
                 from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/libu.h:13,
                 from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/klone/emb.h:19,
                 from
klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/site/pg_96999b9cde0a341e168e8a972bcdc019.cc:10:
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/missing/timegm.h:14:
error: declaration of 'time_t timegm(tm*)' throws different exceptions
/opt/uClinux-dist/uClibc/include/time.h:273: error: from previous
declaration 'time_t timegm(tm*) throw ()'
In file included from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/missing.h:17,
                 from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/libu.h:13,
                 from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/klone/emb.h:19,
                 from
klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/site/pg_96999b9cde0a341e168e8a972bcdc019.cc:10:
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/missing/strlcpy.h:17:
error: declaration of 'size_t strlcpy(char*, const char*, size_t)' throws
different exceptions
/opt/uClinux-dist/uClibc/include/string.h:398: error: from previous
declaration 'size_t strlcpy(char*, const char*, size_t) throw ()'
In file included from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/missing.h:18,
                 from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/libu.h:13,
                 from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/klone/emb.h:19,
                 from
klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/site/pg_96999b9cde0a341e168e8a972bcdc019.cc:10:
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/missing/strlcat.h:17:
error: declaration of 'size_t strlcat(char*, const char*, size_t)' throws
different exceptions
/opt/uClinux-dist/uClibc/include/string.h:396: error: from previous
declaration 'size_t strlcat(char*, const char*, size_t) throw ()'
In file included from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/missing.h:20,
                 from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/libu.h:13,
                 from
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/klone/emb.h:19,
                 from
klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/site/pg_96999b9cde0a341e168e8a972bcdc019.cc:10:
./klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include/u/missing/daemon.h:23:
error: declaration of 'int daemon(int, int)' throws different exceptions
/opt/uClinux-dist/uClibc/include/unistd.h:789: error: from previous
declaration 'int daemon(int, int) throw ()'
==========================================================================

*Error 1 : timegm*
My extract from "libu/include/u/libu_conf.h" :
=====================
    #undef HAVE_TIMEGM
=====================

My extract from "libu/include/u/missing/timegm.h" :
======================
    #ifndef HAVE_TIMEGM
    time_t timegm(struct tm *tm);
    #endif
======================

However my uClinux library contents the definition of this function.
My extract from "/opt/uClinux-dist/uClibc/include/unistd.h" :
====================
    # ifdef __USE_MISC
    /* Miscellaneous functions many Unices inherited from the public domain
   localtime package.  These are included only for compatibility.  */

    /* Like `mktime', but for TP represents Universal Time, not local time.
*/
    extern time_t timegm (struct tm *__tp)
__THROW;                                             //this is the line 273
    ...
    # endif
====================


*Error 2 and 3 : strlcpy/strlcat*
My extract from "libu/include/u/libu_conf.h" :
====================
    #undef HAVE_STRLCPY
    #define HAVE_STRLCPY 1

    #undef HAVE_STRLCAT
    #define HAVE_STRLCAT 1
====================

I think that these errors are caused by a syntax error (it lacks a'L') from
"libu/include/u/missing/strlcpy.h" :
====================
    #ifdef HAVE_STRCPY    --> HAVE_STRLCPY
    #include <string.h>
    #else

    #ifdef __cplusplus
    extern "C" {
    #endif

    size_t strlcpy(char *dst, const char *src, size_t siz);

    #ifdef __cplusplus
    }
    #endif
====================


and from "libu/include/u/missing/strlcat.h"
====================
    #ifdef HAVE_STRCAT    --> HAVE_STRLCAT
    #include <string.h>
    #else

    #ifdef __cplusplus
    extern "C" {
    #endif

    size_t strlcat(char *dst, const char *src, size_t siz);

    #ifdef __cplusplus
    }
    #endif
====================


*Error 4 : daemon*
My extract from "libu/include/u/libu_conf.h" :
====================
    #undef HAVE_DAEMON
    #undef HAVE_MKSTEMPS
    #undef HAVE_UNISTD
    #define HAVE_UNISTD 1

    #undef HAVE_STDLIB
    #define HAVE_STDLIB 1
====================

My extract from "libu/include/u/missing/daemon.h" :
====================
    #ifdef HAVE_DAEMON
    #ifdef HAVE_STDLIB
    #include <stdlib.h>
    #endif

    #ifdef HAVE_UNISTD
    #include <unistd.h>
    #endif

    #else /* HAVE_DAEMON */

    #ifdef __cplusplus
    extern "C" {
    #endif

    int daemon(int nochdir, int noclose);

    #ifdef __cplusplus
    }
    #endif
====================

However my uClinux library contents the definition of this function.
My extract from "/opt/uClinux-dist/uClibc/include/unistd.h" :
====================
    #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
    ...
    /* Put the program in the background, and dissociate from the
controlling
   terminal.  If NOCHDIR is zero, do `chdir ("/")'.  If NOCLOSE is zero,
   redirects stdin, stdout, and stderr to /dev/null.  */
    extern int daemon (int __nochdir, int __noclose)
__THROW;                                                //this is the line
789
    #endif /* Use BSD || X/Open.  */
====================



Thank.

-- 
Mickaël AUGER
mickael.auger at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20080527/1a8b36ef/attachment.htm


More information about the klone-users mailing list