Page 1 of 1

build failed on SH-4

Posted: Fri Oct 18, 2013 3:09 am
by suzuke
Here is the log when I was building VPN server on SH-4 devices,
=================================================================================
Preparing SoftEther VPN Server...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnserver.a
gcc code/vpnserver.a -O2 -fsigned-char -pthread -lm -ldl -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a -o vpnserver
ranlib code/vpncmd.a
gcc code/vpncmd.a -O2 -fsigned-char -pthread -lm -ldl -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a -o vpncmd
./vpncmd /tool /cmd:Check
vpncmd: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
make[1]: *** [i_read_and_agree_the_license_agreement] Aborted (core dumped)
make[1]: Leaving directory `/mnt/sda3/vpnserver'
=================================================================================


And, the CPU information of my SH-4 device
=======================================
machine : pdk7105
processor : 0
cpu family : sh4
cpu variant : st40-300
cpu type : STx7105
cut : 3.x
cpu flags : fpu icbi synco fpchg
cache type : split (harvard)
icache size : 32KiB (2-way)
dcache size : 32KiB (2-way)
address sizes : 32 bits physical
bogomips : 448.51
========================================

Any suggestion are welcome, Thanks!!

Re: build failed on SH-4

Posted: Fri Oct 18, 2013 1:37 pm
by kh_tsang
Run "uname -a" and see your CPU type. Then re-download the package of the correct CPU type.

Re: build failed on SH-4

Posted: Sat Oct 19, 2013 11:36 am
by suzuke
My cpu type is sh4,

uname -a
Linux wheezy 2.6.32.59_stm24_0211-PDK7105-32BITS #5 PREEMPT Thu Aug 22 14:45:31 CST 2013 sh4 GNU/Linux

This is what I downloaded:
"softether-vpnserver-v2.00-9387-rtm-2013.09.16-linux-sh4-32bit.tar.gz"

Is it correct or not ?

And thank you for your reply.

Re: build failed on SH-4

Posted: Sat Oct 19, 2013 4:05 pm
by kh_tsang
It is correct. Since it is correct, I think you should look up for similar errors(e.g. library errors) on other servers to see how to fix the problem. Since your problem may be on the compiler.

Re: build failed on SH-4

Posted: Sun Nov 24, 2013 2:43 am
by suzuke
I had searched this problem, and all information indicated that it intensely seems like a memory management corruption happened prior to this call to malloc().

Have anyone tested it or run it successful on any sh4 machine?

If any, please provide me the version number of the compiler.

Your help was greatly appreciated.