Altera_Forum
Honored Contributor
15 years agowebserver compile issue
Hi all,
I am trying to find a small webserver with CGI/SSI support on uClinux (nios2nommu). here is it: http://code.google.com/p/mongoose/ adding '-Dfork=vfork' to CFLAGS to avoid fork call. but the compile still fails. does anyone have any experience about it ? gcc: nios2-linux-uclibc-gcc 3.4.6
nios2-linux-uclibc-gcc -W -Wall -std=c99 -pedantic -Os -mhw-div -mhw-mul -mhw-mulx -Wall -DNDEBUG -DNO_SSL -Dfork=vfork -D_POSIX_SOURCE -D_BSD_SOURCE -lpthread mongoose.c -fPIC -fpic -s -o _mongoose.so
mongoose.c:272: warning: 'crypto_sw' defined but not used
/opt/nios2/lib/gcc/nios2-linux-uclibc/3.4.6/../../../../nios2-linux-uclibc/lib/crt1.o(.text+0x10): In function `_start':
: undefined reference to `main'
/opt/nios2/lib/gcc/nios2-linux-uclibc/3.4.6/../../../../nios2-linux-uclibc/lib/crt1.o(.text+0x14): In function `_start':
: undefined reference to `main'
/tmp/cc7bRDaJ.o(.text+0x774): In function `start_thread':
: undefined reference to `pthread_attr_init'
/tmp/cc7bRDaJ.o(.text+0x780): In function `start_thread':
: undefined reference to `pthread_attr_setdetachstate'
/tmp/cc7bRDaJ.o(.text+0x794): In function `start_thread':
: undefined reference to `pthread_create'
/tmp/cc7bRDaJ.o(.text+0x7f0): In function `lock_option':
: undefined reference to `pthread_mutex_lock'
/tmp/cc7bRDaJ.o(.text+0x848): In function `unlock_option':
: undefined reference to `pthread_mutex_unlock'
/tmp/cc7bRDaJ.o(.text+0x3e8c): In function `mg_fini':
: undefined reference to `pthread_mutex_lock'
/tmp/cc7bRDaJ.o(.text+0x3ea0): In function `mg_fini':
: undefined reference to `pthread_cond_wait'
/tmp/cc7bRDaJ.o(.text+0x3eb0): In function `mg_fini':
: undefined reference to `pthread_mutex_unlock'
/tmp/cc7bRDaJ.o(.text+0x3f48): In function `mg_fini':
: undefined reference to `pthread_mutex_destroy'
/tmp/cc7bRDaJ.o(.text+0x3f60): In function `mg_fini':
: undefined reference to `pthread_mutex_destroy'
/tmp/cc7bRDaJ.o(.text+0x3f68): In function `mg_fini':
: undefined reference to `pthread_cond_destroy'
/tmp/cc7bRDaJ.o(.text+0x6360): In function `worker_thread':
: undefined reference to `pthread_mutex_lock'
/tmp/cc7bRDaJ.o(.text+0x6378): In function `worker_thread':
: undefined reference to `pthread_cond_signal'
/tmp/cc7bRDaJ.o(.text+0x6384): In function `worker_thread':
: undefined reference to `pthread_mutex_unlock'
/tmp/cc7bRDaJ.o(.text+0x65c0): In function `master_thread':
: undefined reference to `pthread_mutex_lock'
/tmp/cc7bRDaJ.o(.text+0x65d8): In function `master_thread':
: undefined reference to `pthread_cond_wait'
/tmp/cc7bRDaJ.o(.text+0x65f0): In function `master_thread':
: undefined reference to `pthread_mutex_unlock'
/tmp/cc7bRDaJ.o(.text+0x683c): In function `mg_start':
: undefined reference to `pthread_mutex_init'
/tmp/cc7bRDaJ.o(.text+0x6858): In function `mg_start':
: undefined reference to `pthread_mutex_init'
/tmp/cc7bRDaJ.o(.text+0x6864): In function `mg_start':
: undefined reference to `pthread_cond_init'
collect2: ld returned 1 exit status
make: *** Error 1