error in os_auto.h

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

 



Hi,

The first thing to do is to ensure that you have the cross-toolchain
(cross compiler, cross linker, cross binutils, cross libc)  installed.
In the majority case, you cannot use the default gcc in your Linux
development PC (assuming you are using an x86-based PC) because it
doesn't support ARM9 architecture by default. I assume that you have
the cross-toolchain installed correctly, and the toolchain
installation directory is /opt/linux/arm9-linux/, then you can
cross-compile using the autoconf configure script. If you haven't try
it, give it a try. What you have to invoke in the Pjsip source code
root directory is something similar to this (I don't know for sure the
"triplet" of your cross-toochain, so adapt the parameters as needed):

./configure CC=arm-linux-gnu-gcc --host=arm-linux-gnu
--build=i686-linux --with-li
b-path=/opt/linux/arm9-linux/lib LDFLAGS='-Wl,-elf2flt' CFLAGS=-O2
make dep && make

I think that you don't need to configure the setting manually because
autoconf will figure out the compilation parameters as needed.

If you still have problems, please don't hesitate to ask. Configuring
build.mak pehaps is a little trickier than trying to use autconf
configure script ;-)


Regards,

Darmawan


On Jan 22, 2008 5:08 PM, chethana hegde <hegdechethana at yahoo.com> wrote:
> Hi,
> I am trying to crosscompile pjsip for ARM9 ( Linux 2.6.19).
> I have downloaded the latest SVN-version.
>
> This is the build.mak i am using
>
> export MACHINE_NAME := arm
> export OS_NAME := auto
> export HOST_NAME := unix
> export CC_NAME := gcc
> export TARGET_NAME := arm-unknown-linux
> export CROSS_COMPILE := arm-linux-gnu-
> export LINUX_POLL := select
>
> Since i am using OS_NAME=auto, os_auto.h and m_auto.h are created in
> pjlib/include/pj/compat , but none of the macros are defined .....
> here is the os_auto.h file...
>
> /**********************************************************************************************************/
> #ifndef __PJ_COMPAT_OS_AUTO_H__
> #define __PJ_COMPAT_OS_AUTO_H__
> /**
>  * @file os_auto.h
>  * @brief Describes operating system specifics (automatically detected by
>  *        autoconf)
>  */
> /* Canonical OS name */
> /* #undef PJ_OS_NAME */
> /* Legacy macros */
> /* #undef PJ_WIN32 */
> /* #undef PJ_WIN32_WINNT */
> /* #undef WIN32_LEAN_AND_MEAN */
> /* #undef PJ_DARWINOS */
> /* #undef PJ_LINUX */
> /* #undef PJ_RTEMS */
> /* #undef PJ_SUNOS */
> #if defined(PJ_WIN32_WINNT) && !defined(_WIN32_WINNT)
> #  define _WIN32_WINNT PJ_WIN32_WINNT
> #endif
> /* Headers availability */
> /* #undef PJ_HAS_ARPA_INET_H */
> /* #undef PJ_HAS_ASSERT_H */
> /* #undef PJ_HAS_CTYPE_H */
> /* #undef PJ_HAS_ERRNO_H */
> /* #undef PJ_HAS_LINUX_SOCKET_H */
> /* #undef PJ_HAS_MALLOC_H */
> /* #undef PJ_HAS_NETDB_H */
> /* #undef PJ_HAS_NETINET_IN_H */
> /* #undef PJ_HAS_NETINET_IP_H */
> /* #undef PJ_HAS_NET_IF_H */
> /* #undef PJ_HAS_IFADDRS_H */
> /* #undef PJ_HAS_SETJMP_H */
> /* #undef PJ_HAS_STDARG_H */
> /* #undef PJ_HAS_STDDEF_H */
> /* #undef PJ_HAS_STDIO_H */
> /* #undef PJ_HAS_STDLIB_H */
> /* #undef PJ_HAS_STRING_H */
> /* #undef PJ_HAS_SYS_IOCTL_H */
> /* #undef PJ_HAS_SYS_SELECT_H */
> /* #undef PJ_HAS_SYS_SOCKET_H */
> /* #undef PJ_HAS_SYS_TIME_H */
> /* #undef PJ_HAS_SYS_TIMEB_H */
> /* #undef PJ_HAS_SYS_TYPES_H */
> /* #undef PJ_HAS_TIME_H */
> /* #undef PJ_HAS_UNISTD_H */
> /* #undef PJ_HAS_MSWSOCK_H */
> /* #undef PJ_HAS_WINSOCK_H */
> /* #undef PJ_HAS_WINSOCK2_H */
> /* #undef PJ_SOCK_HAS_INET_ATON */
> /* #undef PJ_SOCK_HAS_INET_PTON */
> /* #undef PJ_SOCK_HAS_INET_NTOP */
> /* #undef PJ_SOCK_HAS_GETADDRINFO */
> /* Set 1 if native sockaddr_in has sin_len member.
>  * Default: 0
>  */
> /* #undef PJ_SOCKADDR_HAS_LEN */
> /* Does the OS have socklen_t? */
> /* #undef PJ_HAS_SOCKLEN_T */
> #if !defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T==0
> # define PJ_HAS_SOCKLEN_T 1
>   typedef int socklen_t;
> #endif
> /**
>   */
> /* #undef PJ_SELECT_NEEDS_NFDS */
> /* Is errno a good way to retrieve OS errors?
>  */
> /* #undef PJ_HAS_ERRNO_VAR */
> /* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
>  * the status of non-blocking connect() operation.
>  */
> /* #undef PJ_HAS_SO_ERROR */
> /* This value specifies the value set in errno by the OS when a non-blocking
>  * socket recv() can not return immediate daata.
>  */
> /* #undef PJ_BLOCKING_ERROR_VAL */
> /* This value specifies the value set in errno by the OS when a non-blocking
>  * socket connect() can not get connected immediately.
>  */
> /* #undef PJ_BLOCKING_CONNECT_ERROR_VAL */
> /* Default threading is enabled, unless it's overridden. */
> #ifndef PJ_HAS_THREADS
> #  define PJ_HAS_THREADS     (1)
> #endif
> /* Do we need high resolution timer? */
> /* #undef PJ_HAS_HIGH_RES_TIMER */
> /* Is malloc() available? */
> /* #undef PJ_HAS_MALLOC */
> #ifndef PJ_OS_HAS_CHECK_STACK
> #   define PJ_OS_HAS_CHECK_STACK    0
> #endif
> /* Unicode? */
> /* #undef PJ_NATIVE_STRING_IS_UNICODE */
> /* Pool alignment in bytes */
> /* #undef PJ_POOL_ALIGNMENT */
> /* The type of atomic variable value: */
> /* #undef PJ_ATOMIC_VALUE_TYPE */
> /* If 1, use Read/Write mutex emulation for platforms that don't support it
> */
> /* #undef PJ_EMULATE_RWMUTEX */
> /* If 1, pj_thread_create() should enforce the stack size when creating
>  * threads.
>  * Default: 0 (let OS decide the thread's stack size).
>  */
> /* #undef PJ_THREAD_SET_STACK_SIZE */
> /* If 1, pj_thread_create() should allocate stack from the pool supplied.
>  * Default: 0 (let OS allocate memory for thread's stack).
>  */
> /* #undef PJ_THREAD_ALLOCATE_STACK */
> #endif /* __PJ_COMPAT_OS_AUTO_H__ */
>
> /*******************************************************************************************************/
>
> This is the error i am getting while building.....
>
> In file included from ../include/pj/types.h:35,
>                  from ../include/pj/os.h:26,
>                  from ../src/pj/os_time_unix.c:19:
> ../include/pj/config.h:948:4: #error "PJ_HAS_HIGH_RES_TIMER is not defined!"
> ../include/pj/config.h:964:4: #error "PJ_EMULATE_RWMUTEX should be defined
> in compat/os_xx.h"
> ../include/pj/config.h:968:4: #error "PJ_THREAD_SET_STACK_SIZE should be
> defined in compat/os_xx.h"
> ../include/pj/config.h:972:4: #error "PJ_THREAD_ALLOCATE_STACK should be
> defined in compat/os_xx.h"
> In file included from ../include/pj/errno.h:27,
>                  from ../src/pj/os_time_unix.c:20:
> ../include/pj/compat/errno.h:37:5: #error "Please define how to get errno
> for this platform here!"
>
> could any one please help....
> Chethana
>
>
>  ________________________________
> Looking for last minute shopping deals? Find them fast with Yahoo! Search.
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>



-- 
Regards,

Darmawan Salihun
--------------------------------------------------------------------
-= Human knowledge belongs to the world =-



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux