Closed linuxenko closed 5 years ago
Should work. I guess that platform supports posix and BSD sockets. First try to disable everything possible, see all possible definitions by running
perl -nle 'print $1 if /^#if (MG_\S+)/' mongoose.c | sort | uniq
Finally found some time to report it properly
I think, it does not require any explanation:
mips-gcc echo_server.c ../../mongoose.c -o echo_server -g -W -Wall -Werror -I../.. -Wno-unused-function
cc1: warnings being treated as errors
../../mongoose.c:1558: warning: weak declaration of 'mbuf_resize' after first use results in unspecified behavior
../../mongoose.c:1693: warning: weak declaration of 'mg_mk_str' after first use results in unspecified behavior
../../mongoose.c:1821: warning: weak declaration of 'mg_str_starts_with' after first use results in unspecified behavior
../../mongoose.c:2270: warning: weak declaration of 'mg_next_comma_list_entry_n' after first use results in unspecified behavior
Ok then, lets try without strict flags:
mips-gcc echo_server.c ../../mongoose.c -o echo_server -g -W -I../.. -Wno-unused-function
../../mongoose.c:1558: warning: weak declaration of 'mbuf_resize' after first use results in unspecified behavior
../../mongoose.c:1693: warning: weak declaration of 'mg_mk_str' after first use results in unspecified behavior
../../mongoose.c:1821: warning: weak declaration of 'mg_str_starts_with' after first use results in unspecified behavior
../../mongoose.c:2212: warning: weak declaration of 'mg_avprintf' after first use results in unspecified behavior
../../mongoose.c:2270: warning: weak declaration of 'mg_next_comma_list_entry_n' after first use results in unspecified behavior
Yahoo! we got the binary echo_server
, lets run it inside of the mips
environment:
./echo_server: can't resolve symbol '__sysv_signal'
Aha.. there are no such calls support .. How can I fix it ? (rebuild uClibc is not an option ) Thanks ) :owl: :owl: :owl:
Define your own dummy signal
function, i guess. The linker should pick it up instead of the libc's signal
.
Unfortunately it has crashed when I ran it on the device. But ! it runs just fine inside of the environment built upon qemu. Which debug options could you recommend ? gdb and jtags does not work for me, it is too expensive and requires soldering skills :) Thanks
:turtle: :turtle::turtle:
The approach i usually take is to stick printfs all around, and narrow it down to a place of a crash. Is your system capable of showing the printf logs ?
Closing for now, please reopen if required.
Hi :unicorn:
It is one of the craziest
mips
es I've ever seen, it has nopthreads
and super duper events support. Just plain old selects and forks )) So I decided to try runmongoose
on it )) It seems like an appropriate option for such hardware ))The problems started at the beginning of this "journey", with following output:
The gcc is the uClibc crosscompiler toolchain (uclibc v0.9.30.1) from their website, it compiles my procets I've been working/experimenting with.
And, it dies yelling "interuption error" or something like this when I ran it on the device. Just curious if it possible to run it there, maybe I didn't notice a build option or something.. ? Thanks if you have a time to help me )) :steam_locomotive: :steam_locomotive: :steam_locomotive: :steam_locomotive: :steam_locomotive: :steam_locomotive: :steam_locomotive: