compile errors, unknown register name

Forum for questions and support relating to the 1.26.x releases only.
Locked
petesantos
Posts: 5
Joined: Fri May 02, 2014 6:37 pm

compile errors, unknown register name

Post by petesantos »

I am trying to build ZoneMinder on an Odroid running Ubuntu Linux. Kernel version 3.8.13.16. g++ version 4.8.1.

uname -a says

Code: Select all

Linux odroid 3.8.13.16 #1 SMP PREEMPT Tue Feb 11 10:47:21 BRST 2014 armv7l armv7l armv7l GNU/Linux
The command line where everything fails:

Code: Select all

    # g++  -I. -I..  -I/usr/include -I/usr/include -D__STDC_CONSTANT_MACROS -Wall -finline-functions -fomit-frame-pointer -I/usr/include -D__STDC_CONSTANT_MACROS  -D__STDC_CONSTANT_MACROS -MT zm_image.o -MD -MP -MF .deps/zm_image.Tpo -c -o zm_image.o zm_image.cpp
Output:

Code: Select all

zm_image.cpp: In member function ‘bool Image::ReadRaw(const char*)’:
zm_image.cpp:597:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if ( statbuf.st_size != size )
                          ^
zm_image.cpp: At global scope:
zm_image.cpp:2991:165: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("sse2"))) void sse2_fastblend(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count, double blendpercent) {
                                                                                                                                                                     ^
zm_image.cpp:3333:147: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_gray8(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                   ^
zm_image.cpp:3361:146: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_rgba(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                  ^
zm_image.cpp:3416:146: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_bgra(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                  ^
zm_image.cpp:3471:146: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_argb(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                  ^
zm_image.cpp:3527:146: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("sse2"))) void sse2_delta8_abgr(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                  ^
zm_image.cpp:3583:148: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_delta8_rgba(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                    ^
zm_image.cpp:3635:148: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_delta8_bgra(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                    ^
zm_image.cpp:3687:148: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_delta8_argb(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                    ^
zm_image.cpp:3740:148: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_delta8_abgr(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
                                                                                                                                                    ^
zm_image.cpp:3992:134: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_convert_rgba_gray8(const uint8_t* col1, uint8_t* result, unsigned long count) {
                                                                                                                                      ^
zm_image.cpp:4038:134: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_convert_yuyv_gray8(const uint8_t* col1, uint8_t* result, unsigned long count) {
                                                                                                                                      ^
zm_image.cpp:4655:176: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_gray8(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
                                                                                                                                                                                ^
zm_image.cpp:4784:175: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_rgba(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
                                                                                                                                                                               ^
zm_image.cpp:4960:175: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_bgra(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
                                                                                                                                                                               ^
zm_image.cpp:5136:175: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_argb(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
                                                                                                                                                                               ^
zm_image.cpp:5312:175: warning: target attribute is not supported on this machine [-Wattributes]
 __attribute__((noinline,__target__("ssse3"))) void ssse3_deinterlace_4field_abgr(uint8_t* col1, uint8_t* col2, unsigned int threshold, unsigned int width, unsigned int height) {
                                                                                                                                                                               ^
zm_image.cpp: In function ‘void ssse3_deinterlace_4field_gray8(uint8_t*, uint8_t*, unsigned int, unsigned int, unsigned int)’:
zm_image.cpp:4780:3: error: unknown register name ‘%xmm7’ in ‘asm’
  );
   ^
zm_image.cpp:4780:3: error: unknown register name ‘%xmm6’ in ‘asm’
zm_image.cpp:4780:3: error: unknown register name ‘%xmm5’ in ‘asm’
zm_image.cpp:4780:3: error: unknown register name ‘%xmm4’ in ‘asm’
zm_image.cpp:4780:3: error: unknown register name ‘%xmm3’ in ‘asm’
zm_image.cpp:4780:3: error: unknown register name ‘%xmm2’ in ‘asm’
zm_image.cpp:4780:3: error: unknown register name ‘%xmm1’ in ‘asm’
zm_image.cpp:4780:3: error: unknown register name ‘%xmm0’ in ‘asm’
zm_image.cpp:4780:3: error: unknown register name ‘%eax’ in ‘asm’
zm_image.cpp: In function ‘void ssse3_deinterlace_4field_rgba(uint8_t*, uint8_t*, unsigned int, unsigned int, unsigned int)’:
zm_image.cpp:4956:3: error: unknown register name ‘%xmm7’ in ‘asm’
  );
   ^
zm_image.cpp:4956:3: error: unknown register name ‘%xmm6’ in ‘asm’
zm_image.cpp:4956:3: error: unknown register name ‘%xmm5’ in ‘asm’
zm_image.cpp:4956:3: error: unknown register name ‘%xmm4’ in ‘asm’
zm_image.cpp:4956:3: error: unknown register name ‘%xmm3’ in ‘asm’
zm_image.cpp:4956:3: error: unknown register name ‘%xmm2’ in ‘asm’
zm_image.cpp:4956:3: error: unknown register name ‘%xmm1’ in ‘asm’
zm_image.cpp:4956:3: error: unknown register name ‘%xmm0’ in ‘asm’
zm_image.cpp:4956:3: error: unknown register name ‘%eax’ in ‘asm’
zm_image.cpp: In function ‘void ssse3_deinterlace_4field_bgra(uint8_t*, uint8_t*, unsigned int, unsigned int, unsigned int)’:
zm_image.cpp:5132:3: error: unknown register name ‘%xmm7’ in ‘asm’
  );
   ^
zm_image.cpp:5132:3: error: unknown register name ‘%xmm6’ in ‘asm’
zm_image.cpp:5132:3: error: unknown register name ‘%xmm5’ in ‘asm’
zm_image.cpp:5132:3: error: unknown register name ‘%xmm4’ in ‘asm’
zm_image.cpp:5132:3: error: unknown register name ‘%xmm3’ in ‘asm’
zm_image.cpp:5132:3: error: unknown register name ‘%xmm2’ in ‘asm’
zm_image.cpp:5132:3: error: unknown register name ‘%xmm1’ in ‘asm’
zm_image.cpp:5132:3: error: unknown register name ‘%xmm0’ in ‘asm’
zm_image.cpp:5132:3: error: unknown register name ‘%eax’ in ‘asm’
zm_image.cpp: In function ‘void ssse3_deinterlace_4field_argb(uint8_t*, uint8_t*, unsigned int, unsigned int, unsigned int)’:
zm_image.cpp:5308:3: error: unknown register name ‘%xmm7’ in ‘asm’
  );
   ^
zm_image.cpp:5308:3: error: unknown register name ‘%xmm6’ in ‘asm’
zm_image.cpp:5308:3: error: unknown register name ‘%xmm5’ in ‘asm’
zm_image.cpp:5308:3: error: unknown register name ‘%xmm4’ in ‘asm’
zm_image.cpp:5308:3: error: unknown register name ‘%xmm3’ in ‘asm’
zm_image.cpp:5308:3: error: unknown register name ‘%xmm2’ in ‘asm’
zm_image.cpp:5308:3: error: unknown register name ‘%xmm1’ in ‘asm’
zm_image.cpp:5308:3: error: unknown register name ‘%xmm0’ in ‘asm’
zm_image.cpp:5308:3: error: unknown register name ‘%eax’ in ‘asm’
zm_image.cpp: In function ‘void ssse3_deinterlace_4field_abgr(uint8_t*, uint8_t*, unsigned int, unsigned int, unsigned int)’:
zm_image.cpp:5485:3: error: unknown register name ‘%xmm7’ in ‘asm’
  );
   ^
zm_image.cpp:5485:3: error: unknown register name ‘%xmm6’ in ‘asm’
zm_image.cpp:5485:3: error: unknown register name ‘%xmm5’ in ‘asm’
zm_image.cpp:5485:3: error: unknown register name ‘%xmm4’ in ‘asm’
zm_image.cpp:5485:3: error: unknown register name ‘%xmm3’ in ‘asm’
zm_image.cpp:5485:3: error: unknown register name ‘%xmm2’ in ‘asm’
zm_image.cpp:5485:3: error: unknown register name ‘%xmm1’ in ‘asm’
zm_image.cpp:5485:3: error: unknown register name ‘%xmm0’ in ‘asm’
zm_image.cpp:5485:3: error: unknown register name ‘%eax’ in ‘asm’
EDIT: On a lark I edited out all the lines containing those errors and got a bunch of complaints about bad assembly:

Code: Select all

/tmp/ccNMDI1G.s: Assembler messages:
/tmp/ccNMDI1G.s:26709: Error: ARM register expected -- `mov [sp,#32],%eax'
/tmp/ccNMDI1G.s:26710: Error: bad instruction `movd %eax,%xmm4'
/tmp/ccNMDI1G.s:26711: Error: bad instruction `pshufd $0x0,%xmm4,%xmm4'
/tmp/ccNMDI1G.s:26712: Error: bad instruction `pxor %xmm0,%xmm0'
/tmp/ccNMDI1G.s:26714: Error: bad instruction `movdqa (r3),%xmm1'
/tmp/ccNMDI1G.s:26715: Error: bad instruction `movdqa (r2),%xmm2'
/tmp/ccNMDI1G.s:26716: Error: bad instruction `movdqa %xmm1,%xmm5'
/tmp/ccNMDI1G.s:26717: Error: bad instruction `pmaxub %xmm2,%xmm1'
/tmp/ccNMDI1G.s:26718: Error: bad instruction `pminub %xmm5,%xmm2'
/tmp/ccNMDI1G.s:26719: Error: bad instruction `psubb %xmm2,%xmm1'
/tmp/ccNMDI1G.s:26720: Error: bad instruction `movdqa %xmm1,%xmm7'
/tmp/ccNMDI1G.s:26723: Error: bad instruction `movdqa (r3),%xmm1'
/tmp/ccNMDI1G.s:26724: Error: bad instruction `movdqa (r2),%xmm2'
/tmp/ccNMDI1G.s:26725: Error: bad instruction `movdqa %xmm1,%xmm6'
/tmp/ccNMDI1G.s:26726: Error: bad instruction `pmaxub %xmm2,%xmm1'
/tmp/ccNMDI1G.s:26727: Error: bad instruction `pminub %xmm6,%xmm2'
/tmp/ccNMDI1G.s:26728: Error: bad instruction `psubb %xmm2,%xmm1'
/tmp/ccNMDI1G.s:26729: Error: bad instruction `pavgb %xmm7,%xmm1'
/tmp/ccNMDI1G.s:26730: Error: bad instruction `movdqa %xmm1,%xmm2'
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: compile errors, unknown register name

Post by mastertheknife »

This is probably not a x86 processor, so it doesn't have XMM (SSE) registers.
Add -DZM_STRIP_SSE to your compiler's c++ flags (CXXFLAGS or CPPFLAGS usually)
Kfir Itzhak.
petesantos
Posts: 5
Joined: Fri May 02, 2014 6:37 pm

Re: compile errors, unknown register name

Post by petesantos »

I have added -DZM_STRIP_SSE and got the same result.

There seem to be several calls that don't have this wrapper

Code: Select all

#if ((defined(__i386__) || defined(__x86_64__) || defined(ZM_KEEP_SSE)) && !defined(ZM_STRIP_SSE))
like ssse3_deinterlace_4field_gray8()

*EDIT*

Okay, I added in those wrappers. Now I am crashing in zm_signal.cpp

Code: Select all

# g++ -DZM_STRIP_SSE -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include -D__STDC_CONSTANT_MACROS -Wall -finline-functions -fomit-frame-pointer -I/usr/include -D__STDC_CONSTANT_MACROS  -D__STDC_CONSTANT_MACROS -g -O2 -MT zm_signal.o -MD -MP -MF .deps/zm_signal.Tpo -c -o zm_signal.o zm_signal.cpp
zm_signal.cpp: In function ‘void zm_die_handler(int, siginfo_t*, void*)’:
zm_signal.cpp:71:33: error: ‘mcontext_t’ has no member named ‘gregs’
   ip = (void *)(uc->uc_mcontext.gregs[REG_EIP]);
                                 ^
zm_signal.cpp:71:39: error: ‘REG_EIP’ was not declared in this scope
   ip = (void *)(uc->uc_mcontext.gregs[REG_EIP]);
                                       ^
Locked