stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pegasus2000 <pegasus2...@email.it>
Subject Undefined symbols in STDCXX library for Nanodesktop
Date Tue, 06 May 2008 04:58:29 GMT

The library has been compiled using a
special makefile.gcc, compatible with
the features of Nanodesktop. 

After, I write a simple test program 
as this:

#include <nanodesktop.h>

#include <iostream>

int main()
{
    ndInitSystem ();
    using namespace std;

    cout << "Hello World!";
    return 0;
}

The linker finds undefined references:

  [Linker error] undefined reference to `vtable for 
__cxxabiv1::__vmi_class_type_info'
  [Linker error] undefined reference to `vtable for 
__cxxabiv1::__class_type_info'
  [Linker error] undefined reference to `std::basic_ostream<char, 
std::char_traits<char> >& __rw::__rw_insert<char, std::char_traits<char>,

long double>(std::basic_ostream<char, std::char_traits<char> >&, long 
double)'

I have already applied Sebor's patch for 
disabling MMAP/MUNMAP and it works.

The strange thing is the undefined reference in
basic_ostream. Have you some ideas about this ?

And... what about the CXXABI symbols ?

Thanks
Filippo Battaglia



NOTE:

Under Nanodesktop there isn't a command like
"make", so we have used the test programs in
/etc/config to create a particular homebrew
(i.e. a nd application) that generates
a config.h file.

The config.h file that we are using is this:

#define _RWSTD_BOOL_SIZE    1 /* sizeof (bool) */
#define _RWSTD_CHAR_SIZE    1 /* sizeof (char) */
#define _RWSTD_SHRT_SIZE    2 /* sizeof (short) */
#define _RWSTD_INT_SIZE     4 /* sizeof (int) */
#define _RWSTD_LONG_SIZE    4 /* sizeof (long) */
#define _RWSTD_FLT_SIZE     4 /* sizeof (float) */
#define _RWSTD_DBL_SIZE     4 /* sizeof (double) */
#define _RWSTD_PTR_SIZE     4 /* sizeof (void*) */
#define _RWSTD_FUNPTR_SIZE  4 /* sizeof (void(*)()) */
#define _RWSTD_MEMPTR_SIZE  8 /* sizeof (void (struct::*)()) */
#define _RWSTD_CHAR_BIT     8
#define _RWSTD_BOOL_MIN   !!0
#define _RWSTD_BOOL_MAX    !0
// #define _RWSTD_NO_TWOS_COMPLEMENT
#define _RWSTD_CHAR_MAX    '\x7f'
#define _RWSTD_CHAR_MIN    (-_RWSTD_CHAR_MAX - 1)
#define _RWSTD_SCHAR_MAX   0x7f
#define _RWSTD_SCHAR_MIN   (-_RWSTD_SCHAR_MAX - 1)
#define _RWSTD_UCHAR_MAX   0xffU
#define _RWSTD_UCHAR_MIN   0x1U
#define _RWSTD_SHRT_MAX    0x7fff
#define _RWSTD_SHRT_MIN    (-_RWSTD_SHRT_MAX - 1)
#define _RWSTD_USHRT_MAX   0xffffU
#define _RWSTD_USHRT_MIN   0x1U
#define _RWSTD_INT_MAX     0x7fffffff
#define _RWSTD_INT_MIN     (-_RWSTD_INT_MAX - 1)
#define _RWSTD_UINT_MAX    0xffffffffU
#define _RWSTD_UINT_MIN    0x1U
#define _RWSTD_LONG_MAX    0x7fffffffL
#define _RWSTD_LONG_MIN    (-_RWSTD_LONG_MAX - 1L)
#define _RWSTD_ULONG_MAX   0xffffffffUL
#define _RWSTD_ULONG_MIN   0x1UL
#define _RWSTD_LLONG_SIZE   8
#define _RWSTD_LLONG_MAX   0x7fffffffffffffffLL
#define _RWSTD_LLONG_MIN   (-_RWSTD_LLONG_MAX - 1LL)
#define _RWSTD_ULLONG_MAX  0xffffffffffffffffULL
#define _RWSTD_ULLONG_MIN  0x1ULL
#define _RWSTD_WCHAR_SIZE   4 /* sizeof (wchar_t) */
#define _RWSTD_WCHAR_MAX   0x7fffffff
#define _RWSTD_WCHAR_MIN   (-_RWSTD_WCHAR_MAX - 1)
#define _RWSTD_MB_LEN_MAX    1   /* libc value */
#define _RWSTD_INT8_T            signed char
#define _RWSTD_UINT8_T           unsigned char
#define _RWSTD_INT16_T           short
#define _RWSTD_UINT16_T          unsigned short
#define _RWSTD_INT32_T           int
#define _RWSTD_UINT32_T          unsigned int
#define _RWSTD_INT64_T           long long
#define _RWSTD_UINT64_T          unsigned long long
#define _RWSTD_INT_LEAST8_T     _RWSTD_INT8_T
#define _RWSTD_UINT_LEAST8_T    _RWSTD_UINT8_T
#define _RWSTD_INT_LEAST16_T    _RWSTD_INT16_T
#define _RWSTD_UINT_LEAST16_T   _RWSTD_UINT16_T
#define _RWSTD_INT_LEAST32_T    _RWSTD_INT32_T
#define _RWSTD_UINT_LEAST32_T   _RWSTD_UINT32_T
#define _RWSTD_INT_LEAST64_T    _RWSTD_INT64_T
#define _RWSTD_UINT_LEAST64_T   _RWSTD_UINT64_T

#define _RWSTD_FLT_ROUNDS            1   /* round to nearest */
#define _RWSTD_DBL_DIG               6
#define _RWSTD_DBL_MANT_DIG         24
#define _RWSTD_DBL_MAX_10_EXP       38
#define _RWSTD_DBL_MAX_EXP         128
#define _RWSTD_DBL_MIN_10_EXP      -37
#define _RWSTD_DBL_MIN_EXP        -125
#define _RWSTD_FLT_DIG               6
#define _RWSTD_FLT_MANT_DIG         24
#define _RWSTD_FLT_MAX_10_EXP       38
#define _RWSTD_FLT_MAX_EXP         128
#define _RWSTD_FLT_MIN_10_EXP      -37
#define _RWSTD_FLT_MIN_EXP        -125
#define _RWSTD_FLT_RADIX             2
#define _RWSTD_DBL_MAX          3.40282347e+38
#define _RWSTD_FLT_MAX          3.40282347e+38F
#define _RWSTD_DBL_EPSILON      1.19209290e-7
#define _RWSTD_DBL_MIN          1.17549435e-38
#define _RWSTD_FLT_EPSILON      1.19209290e-7F
#define _RWSTD_FLT_MIN          1.17549435e-38F
#define _RWSTD_NO_STRTOF_UFLOW
#define _RWSTD_NO_STRTOD_UFLOW

#define _RWSTD_CLOCK_T        unsigned long
#define _RWSTD_PTRDIFF_T      int
#define _RWSTD_SIZE_T         unsigned
#define _RWSTD_SIZE_MAX       _RWSTD_UINT_MAX
#define _RWSTD_PTRDIFF_MIN    _RWSTD_INT_MIN
#define _RWSTD_PTRDIFF_MAX    _RWSTD_INT_MAX
#define _RWSTD_TIME_T         long
#define _RWSTD_NO_CLOCKS_PER_SEC
#define _RWSTD_RAND_MAX       2147483647
#define _RWSTD_EOF            -1
#define _RWSTD_WEOF           -1
#define _RWSTD_NO_L_TMPNAM
#define _RWSTD_IOFBF          0
#define _RWSTD_IOLBF          256
#define _RWSTD_IONBF          4
#define _RWSTD_BUFSIZ         1024
#define _RWSTD_FOPEN_MAX      20
#define _RWSTD_FILENAME_MAX   1024
#define _RWSTD_NO_TMP_MAX
#define _RWSTD_FPOS_T         long

#define _RWSTD_NO_ABS_BOOL
#define _RWSTD_NO_ABS_CHAR
#define _RWSTD_NO_ABS_SCHAR
#define _RWSTD_NO_ABS_UCHAR
#define _RWSTD_NO_ABS_SHRT
#define _RWSTD_NO_ABS_USHRT
// #define _RWSTD_NO_ABS_INT
#define _RWSTD_NO_ABS_UINT
#define _RWSTD_NO_ABS_LONG
#define _RWSTD_NO_ABS_ULONG
#define _RWSTD_NO_ABS_LLONG
#define _RWSTD_NO_ABS_ULLONG

#define _RWSTD_STDIN_FILENO    (int)(&StreamsArray [0])
#define _RWSTD_STDOUT_FILENO   (int)(&StreamsArray [1])
#define _RWSTD_STDERR_FILENO   (int)(&StreamsArray [2])
#define _RWSTD_O_RDONLY                  0x1   // O_RDONLY
#define _RWSTD_O_WRONLY                  0x2   // O_WRONLY
#define _RWSTD_O_RDWR                    0x3   // O_RDWR
#define _RWSTD_O_ACCMODE                 0x3   // O_ACCMODE
#define _RWSTD_O_APPEND                0x100   // O_APPEND
#define _RWSTD_O_EXCL                  0x800   // O_EXCL
#define _RWSTD_O_CREAT                 0x200   // O_CREAT
#define _RWSTD_O_TRUNC                 0x400   // O_TRUNC
#define _RWSTD_SEEK_SET                  0x0   // SEEK_SET
#define _RWSTD_SEEK_CUR                  0x1   // SEEK_CUR
#define _RWSTD_SEEK_END                  0x2   // SEEK_END
#define _RWSTD_F_GETFL                   0x3   // F_GETFL
#define _RWSTD_OFF_T long   // off_t
#define _RWSTD_SSIZE_T int   // ssize_t

#define _RWSTD_LC_COLLATE            1
#define _RWSTD_LC_CTYPE              2
#define _RWSTD_LC_MONETARY           3
#define _RWSTD_LC_NUMERIC            4
#define _RWSTD_LC_TIME               5
#define _RWSTD_LC_MESSAGES           6
#define _RWSTD_LC_ALL                0
#define _RWSTD_LC_MAX               _RWSTD_LC_MESSAGES
#define _RWSTD_LC_MIN               _RWSTD_LC_ALL
// no locales found, using Nanodesktop PSP format
// #define _RWSTD_NO_SETLOCALE_ENVIRONMENT
#define _RWSTD_NO_CAT_NAMES
#define _RWSTD_CAT_SEP "/"
#define _RWSTD_NO_CAT_EQ
#define _RWSTD_NO_INITIAL_CAT_SEP
#define _RWSTD_NO_CONDENSED_NAME

#define _RWSTD_WCTYPE_T unsigned long

// IEEE 754 infinities and NANs for a big endian architecture
// (values not computed due to floating exception trapping)
#define _RWSTD_FLT_INF_BITS  { '\x7f', '\x80', 0, 0 }
#define _RWSTD_FLT_QNAN_BITS  { '\xff', '\xc0', 0, 0 }
#define _RWSTD_FLT_SNAN_BITS  { '\x7f', '\x80', 0, '\x1' }
#define _RWSTD_FLT_DENORM_MIN_BITS  { 0, 0, 0, '\x1' }
#define _RWSTD_FLT_HAS_DENORM  1
#define _RWSTD_DBL_INF_BITS  { '\x7f', '\xf0', 0, 0 }
#define _RWSTD_DBL_QNAN_BITS  { '\xff', '\xf8', 0, 0 }
#define _RWSTD_DBL_SNAN_BITS  { '\x7f', '\xf0', 0, 0 }
#define _RWSTD_DBL_DENORM_MIN_BITS  { 0, 0, 0, 0 }
#define _RWSTD_DBL_HAS_DENORM  1


#define _RWSTD_LCONV {   /* sizeof (lconv) == 48 */ \
    char* decimal_point;   \
    char* thousands_sep;   \
    char* grouping;   \
    char* int_curr_symbol;   \
    char* currency_symbol;   \
    char* mon_decimal_point;   \
    char* mon_thousands_sep;   \
    char* mon_grouping;   \
    char* positive_sign;   \
    char* negative_sign;   \
    char int_frac_digits;   \
    char frac_digits;   \
    char p_cs_precedes;   \
    char p_sep_by_space;   \
    char n_cs_precedes;   \
    char n_sep_by_space;   \
    char p_sign_posn;   \
    char n_sign_posn;   \
  }

#define _RWSTD_NO_FWSCANF
#define _RWSTD_NO_SWSCANF
#define _RWSTD_NO_WSCANF
#define _RWSTD_NO_WCSFTIME
#define _RWSTD_NO_STD_MBSTATE_T
#define _RWSTD_NO_LONG_DOUBLE
#define _RWSTD_NO_STRUCT_TM_IN_WCHAR_H
#define _RWSTD_NO_FENV_H
#define _RWSTD_NO_LOCALE_NAME_FMAT
#define _RWSTD_NO_ABS_FLT
#define _RWSTD_NO_ABS_DBL
#define _RWSTD_NO_NL_TYPES_H
#define _RWSTD_NO_LCONV_INT_FMAT
#define _RWSTD_NO_NEW_OFLOW_SAFE
#define _RWSTD_NO_OPERATOR_NEW_PLACEMENT
#define _RWSTD_NO_OPERATOR_DELETE_PLACEMENT
#define _RWSTD_NO_DYNAMIC_CAST
#define _RWSTD_NO_STD_UNCAUGHT_EXCEPTION
#define _RWSTD_NO_GLOBAL_UNCAUGHT_EXCEPTION

#define _RWSTD_NO_EXCEPTION_DEFAULT_CTOR
#define _RWSTD_NO_EXCEPTION_COPY_CTOR
#define _RWSTD_NO_EXCEPTION_DTOR
#define _RWSTD_NO_EXCEPTION_ASSIGNMENT
#define _RWSTD_NO_EXCEPTION_WHAT
#define _RWSTD_NO_STD_NOTHROW
#define _RWSTD_NO_GLOBAL_NOTHROW
#define _RWSTD_NO_STD_NOTHROW_T
#define _RWSTD_NO_GLOBAL_NOTHROW_T
#define _RWSTD_NO_MMAP
#define _RWSTD_NO_MUNMAP

#define _RWSTD_NO_EXTERN_TEMPLATE_BEFORE_DEFINITION




The modules in /src are compiled one by one by
a particular makefile.gcc as this:

./obj_PSPE/core/assert.o:   ./src/assert.cpp
 $(CPP) -c ./src/assert.cpp -o ./obj_PSPE/core/assert.o $(CFLAGS_PSPE) 
$(INCLUDE)

./obj_PSPE/core/bitset.o:   ./src/bitset.cpp
 $(CPP) -c ./src/bitset.cpp -o ./obj_PSPE/core/bitset.o $(CFLAGS_PSPE) 
$(INCLUDE)

./obj_PSPE/core/catalog.o:   ./src/catalog.cpp
 $(CPP) -c ./src/catalog.cpp -o ./obj_PSPE/core/catalog.o $(CFLAGS_PSPE) 
$(INCLUDE)

./obj_PSPE/core/codecvt.o:   ./src/codecvt.cpp
 $(CPP) -c ./src/codecvt.cpp -o ./obj_PSPE/core/codecvt.o $(CFLAGS_PSPE) 
$(INCLUDE)

./obj_PSPE/core/collate.o:   ./src/collate.cpp
 $(CPP) -c ./src/collate.cpp -o ./obj_PSPE/core/collate.o $(CFLAGS_PSPE) 
$(INCLUDE)

./obj_PSPE/core/ctype.o:   ./src/ctype.cpp
 $(CPP) -c ./src/ctype.cpp -o ./obj_PSPE/core/ctype.o $(CFLAGS_PSPE) 
$(INCLUDE)

./obj_PSPE/core/ctype_bits.o:   ./src/ctype_bits.cpp
 $(CPP) -c ./src/ctype_bits.cpp -o ./obj_PSPE/core/ctype_bits.o 
$(CFLAGS_PSPE) $(INCLUDE)

<< and other modules.... >>


-- 
View this message in context: http://www.nabble.com/Undefined-symbols-in-STDCXX-library-for-Nanodesktop-tp17071586p17071586.html
Sent from the stdcxx-dev mailing list archive at Nabble.com.


Mime
View raw message