(SOLVED) Error compiling ZM1.25 in ARM based computer

Forum for questions and support relating to the 1.25.x releases only.
Locked
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

(SOLVED) Error compiling ZM1.25 in ARM based computer

Post by PacoLM »

Hello,

I just tried to install ZM1.25 in one of my guruplugs. I have some problems when running the make command. This is the configure command:

Code: Select all

export CFLAGS="-march=native -O2 -pipe" && \
export CXXFLAGS="${CFLAGS}" && \
export CPPFLAGS="${CFLAGS}"
./configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin \
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser \
ZM_DB_PASS=zmpass ZM_SSL_LIB=openssl --enable-debug=no \
--with-webgroup=www-data --with-webuser=www-data --enable-mmap=yes CPPFLAGS="-D__STDC_CONSTANT_MACROS ${CPPFLAGS}"
I have an error when compiling zm_signal.cpp:

Code: Select all

zm_signal.cpp: In function ‘void zm_die_handler(int, sigcontext)’:
zm_signal.cpp:91:2: error: ‘struct sigcontext’ has no member named ‘cr2’
make[2]: *** [zm_signal.o] Error 1
make[2]: Leaving directory `/usr/src/zm/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zm'
Is there anything wrong in the configuration parameters? I have googled looking for the error and seems related to the registers (page fault register indeed), could anyone confirm this?
If so, which registers should I put instead of the cr2 (i386) register?. Is there any configuration to compile the package for armel architectures to avoid this error?.

Thanks in advance,

PacoLM
Last edited by PacoLM on Tue Oct 18, 2011 7:49 pm, edited 1 time in total.

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Help needed-> Error compiling ZM1.25 in ARM based comput

Post by bb99 »

I've done a bunch of reading and have come to the conclusion I can't definitively help you! But a major difference between RISC and x386 based processors is how they handle memory. Because I know you've had this running on sub releases (thanks for your posts) I'm going to suggest an experimental build with mmap=no. Relatively new to ZM, mmap may be causing your register issues; just a WAG but in looking at the different CRx values I can't suggest a better one (maybe 0).
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Help needed-> Error compiling ZM1.25 in ARM based comput

Post by PacoLM »

Hi,

I have compared the file zm_signal.cpp of the version 1.24.4 and the registers are the same, so I believe the source of the problem is not the register name. As suggested by another forum user, I need to check the compilation parameters and compiler versions.

Thanks,

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Help needed-> Error compiling ZM1.25 in ARM based comput

Post by PacoLM »

Hi,

Fixed with the help of my friend Paco Gil:
Well the fix turned out to be changing cr2 to fault_address in zm_signal.cpp. I forgot where I got that solution from but it compiles without problem now.
Now I'm reinstalling the complete OS, I did too many dirty things on the guruplug and only to have Zoneminder working it's 89% full.

Hope it helps,

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
Locked