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

Re: Package dependencies in cross gcc



Hi Nikita, thanks for your reply.

Nikita V. Youshchenko wrote:
Now I am trying to cross-compile some more ambitious code, and I'm
encountering difficulties.  In particular it seems that the libstdc++
that I built built is inferior to the native one; I think that configure
decided that some platform headers (sys/time.h, for example) were
missing and disabled some things.

This is strange.
Could you please post some details (what exactly you tried to compile, what is written to config.log when tests behave unexpectedly, ...)?

I have Boost installed via dpkg-cross, and tried to compile this minimal example:

#include <boost/config/requires_threads.hpp>

It should do nothing, but instead I get a #error telling me that I don't have threads.

As you can imagine, debugging this back to the underlying problem would be a challenge. So I decided to try the native libraries instead. I then noticed the differences in /usr/armeb-linux/include/c++/3.3/armeb-linux/bits/c++config.h. Here are the things that my cross version is missing:

#define _GLIBCPP_MEM_LIMITS 1
#define _GLIBCPP_HAVE_DRAND48 1
#define _GLIBCPP_HAVE_GETPAGESIZE 1
#define _GLIBCPP_HAVE_SETENV 1
#define _GLIBCPP_HAVE_SIGSETJMP 1
#define _GLIBCPP_HAVE___BUILTIN_ABS 1
#define _GLIBCPP_HAVE___BUILTIN_LABS 1
#define _GLIBCPP_HAVE___BUILTIN_COS 1
#define _GLIBCPP_HAVE___BUILTIN_COSF 1
#define _GLIBCPP_HAVE___BUILTIN_COSL 1
#define _GLIBCPP_HAVE___BUILTIN_FABS 1
#define _GLIBCPP_HAVE___BUILTIN_FABSF 1
#define _GLIBCPP_HAVE___BUILTIN_FABSL 1
#define _GLIBCPP_HAVE___BUILTIN_SIN 1
#define _GLIBCPP_HAVE___BUILTIN_SINF 1
#define _GLIBCPP_HAVE___BUILTIN_SINL 1
#define _GLIBCPP_HAVE_LC_MESSAGES 1
#define _GLIBCPP_HAVE_DRAND48 1
#define _GLIBCPP_HAVE_GETPAGESIZE 1
#define _GLIBCPP_HAVE_HYPOT 1
#define _GLIBCPP_HAVE_ISATTY 1
#define _GLIBCPP_HAVE_SETENV 1
#define _GLIBCPP_HAVE_GCONV_H 1
#define _GLIBCPP_HAVE_SYS_RESOURCE_H 1
#define _GLIBCPP_HAVE_SYS_STAT_H 1
#define _GLIBCPP_HAVE_SYS_TIME_H 1
#define _GLIBCPP_HAVE_UNISTD_H 1
#define _GLIBCPP_HAVE_SIGSETJMP 1
#define _GLIBCPP_HAVE_MEMLIMIT_DATA 1
#define _GLIBCPP_HAVE_MEMLIMIT_RSS 1
#define _GLIBCPP_HAVE_MEMLIMIT_VMEM 0
#define _GLIBCPP_HAVE_MEMLIMIT_AS 1

(In the cross version, each one is like
  /* #undef XXXXXX */
)

I've looked in the libstdc++ config.log and, as far as I can see, it doesn't mention these things. For example, sys/time.h is not mentioned in the file, while in the libiberty config.log I see a sucessful test.

Before building gcc etc. I installed dpkg-cross'd versions of linux-kernel-headers, libdb1-compat, libc6 and libc6-dev. Perhaps I should have installed some other packages to provide whatever configure has not found?


Thanks for your help.

--Phil.



Reply to: