Subject: Re: Your Installation isn't able to compile simple C++ programs.
To: None <tech-pkg@netbsd.org>
From: Thomas devreese <thomasdevreese@hotmail.com>
List: tech-pkg
Date: 02/23/2004 18:26:56
Hi,

Re: http://news.gw.com/netbsd.tech.pkg/18334

walter wrote:
>Are there any helpful error messages in the config.log of the arts
>build directory?  Anything that would give a clue why the test for
>c++ compiler is failing.

There are some errors reported in pthread.h.
I suppose the relevant part of it is the following.

configure:27069: checking if C++ programs can be compiled
configure:27099: c++ -c -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W 
-Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O2 
-DGLX_GLXEXT_LEGACY -I/usr/pkg/inc
lude -I/usr/X11R6/include  -fno-check-new -fno-common 
-I/usr/pkg/include/freetype2 -DGLX_GLXEXT_LEGACY -I/usr/pkg/include 
-I/usr/X11R6/include conftest.cc >&5
In file included from /usr/include/g++/bits/gthr-default.h:40,
                 from /usr/include/g++/bits/gthr.h:101,
                 from /usr/include/g++/bits/c++io.h:37,
                 from /usr/include/g++/bits/fpos.h:44,
                 from /usr/include/g++/bits/char_traits.h:46,
                 from /usr/include/g++/string:47,
                 from conftest.cc:63:
/usr/pkg/include/pthread.h:285: error: conflicting types for `typedef struct
   pthread_st*pthread_t'
/usr/include/pthread_types.h:71: error: previous declaration as `typedef 
struct
   __pthread_st*pthread_t'
/usr/pkg/include/pthread.h:286: error: conflicting types for `typedef struct
   pthread_attr_st*pthread_attr_t'
/usr/include/pthread_types.h:72: error: previous declaration as `typedef 
struct
   __pthread_attr_st pthread_attr_t'
/usr/pkg/include/pthread.h:288: error: conflicting types for `typedef int
   pthread_once_t'
/usr/include/pthread_types.h:77: error: previous declaration as `typedef 
struct
   __pthread_once_st pthread_once_t'
/usr/pkg/include/pthread.h:289: error: conflicting types for `typedef int
   pthread_mutexattr_t'
/usr/include/pthread_types.h:74: error: previous declaration as `typedef 
struct
   __pthread_mutexattr_st pthread_mutexattr_t'

/usr/pkg/include/pthread.h:290: error: conflicting types for `typedef struct
   pthread_mutex_st*pthread_mutex_t'
/usr/include/pthread_types.h:73: error: previous declaration as `typedef 
struct
   __pthread_mutex_st pthread_mutex_t'
/usr/pkg/include/pthread.h:291: error: conflicting types for `typedef int
   pthread_condattr_t'
/usr/include/pthread_types.h:76: error: previous declaration as `typedef 
struct
   __pthread_condattr_st pthread_condattr_t'
/usr/pkg/include/pthread.h:292: error: conflicting types for `typedef struct
   pthread_cond_st*pthread_cond_t'
/usr/include/pthread_types.h:75: error: previous declaration as `typedef 
struct
   __pthread_cond_st pthread_cond_t'
/usr/pkg/include/pthread.h:293: error: conflicting types for `typedef int
   pthread_rwlockattr_t'
/usr/include/pthread_types.h:80: error: previous declaration as `typedef 
struct
   __pthread_rwlockattr_st pthread_rwlockattr_t'
/usr/pkg/include/pthread.h:294: error: conflicting types for `typedef struct
   pthread_rwlock_st*pthread_rwlock_t'
/usr/include/pthread_types.h:79: error: previous declaration as `typedef 
struct
   __pthread_rwlock_st pthread_rwlock_t'
configure:27102: $? = 1
configure: failed program was:
| /* #line 27076 "configure" */
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "arts"
| #define VERSION "1.2.0"
| #ifdef __cplusplus
| #include <stdlib.h>
| #endif
| #define KDELIBSUFF ""
| #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_DLFCN_H 1
| #define LTDL_SHLIBPATH_VAR "LD_LIBRARY_PATH"
| #define LTDL_SYSSEARCHPATH "/lib:/usr/lib"
| #define LTDL_OBJDIR ".libs/"
| #define HAVE_PRELOADED_SYMBOLS 1
| #define HAVE_LIBDL 1
| #define HAVE_DLERROR 1
| #define HAVE_MALLOC_H 1

| #define HAVE_MALLOC_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STDIO_H 1
| #define HAVE_CTYPE_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRCHR 1
| #define HAVE_STRRCHR 1
| #define HAVE_MEMCPY 1
| #define HAVE_STRCMP 1
| #define HAVE_STRLCAT 1
| #define HAVE_STRLCAT_PROTO 1
| #define HAVE_STRLCPY 1
| #define HAVE_STRLCPY_PROTO 1
| #define HAVE_CRYPT 1
| #define ksize_t socklen_t
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_RES_INIT 1
| #define HAVE_RES_INIT 1
| #define SIZEOF_INT 4
| #define SIZEOF_SHORT 2
| #define SIZEOF_LONG 4
| #define SIZEOF_CHAR_P 4
| #define SIZEOF_SIZE_T 4
| #define SIZEOF_UNSIGNED_LONG 4
| #define HAVE_VSNPRINTF 1
| #define HAVE_SNPRINTF 1
| /* end confdefs.h.  */
|
| #include <string>
| using namespace std;
|
| int
| main ()
| {
|
|   string astring="Hallo Welt.";
|   astring.erase(0, 6); // now astring is "Welt"
|   return 0;
|
|   ;
|   return 0;
| }
configure:27122: result: no
configure:27133: error: Your Installation isn't able to compile simple C++ 
programs.
Check config.log for details - if you're using a Linux distribution you 
might miss
a package named similiar to libstd++-dev.


What should I try to resolve the problem?

Thanks,
Thomas Devreese

_________________________________________________________________
Ben jij klaar voor De Vuilbek? http://devuilbek.msn.be/start.php Nu op JIM 
en MSN