문제

I am using OpenIMSCore on x86 architecture. I need to cross compile OpenIMS for power-pc. In /ser_ims/Makefile.defs file there is a option for ppc. But I am not able to figure out how to cross compile it for ppc. There is no configure file through which I can configure IMS and compile it for ppc. Has anyone cross compiled IMS? I tried compiling through command

  • make CFLAGS="arch=Power Macintosh"
  • make CFLAGS="arch=ppc"

But both the commands are not working. It is giving following error:

Makefile.defs:598: You are using an old and unsupported gcc version (G++), compile at your own risk! powerpc-linux-gnu-gcc -g -O9 -funroll-loops -Wcast-align -Wall -DNAME='"ser"' -DVERSION='"2.1.0-dev1 OpenIMSCore"' -DARCH='"i386"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"powerpc-linux-gnu-gcc G++"' -D__CPU_i386 -D__OS_linux -DSER_VER=2001000 -DCFG_DIR='"/usr/local/etc/ser/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DDBG_QM_MALLOC -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -ggdb -DUSE_TLS -DTLS_HOOKS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND -DHAVE_SELECT -c core_cmd.c -o core_cmd.o

core_cmd.c: In function 'core_shmmem': mem/../fastlock.h:181: error: can't find a register in class 'MQ_REGS' while reloading 'asm' mem/../fastlock.h:358: error: can't find a register in class 'MQ_REGS' while reloading 'asm' mem/../fastlock.h:181: error: can't find a register in class 'MQ_REGS' while reloading 'asm' mem/../fastlock.h:181: error: 'asm' operand has impossible constraints

도움이 되었습니까?

해결책

Probably, the error you are getting is due to the separate header file definition and most importantly different shared library files for x86 architecture and different header files for PowerPC architecture. You can change the header file definitions with the new ones using "-I" flag and the shared library file path which is for PowerPC architecture, which can be changed by using -L option. But these all changes might be implemented in Makefile, so u just need to change the location in different flags, like LDFLAG, CFLAGS etc.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top