We are trying to compile ser 0.8.11 on Solaris 2.8 using gcc 3.3. Since we don't have librt.so on our system, we change the Makefile.defs to use libpthread instead, we also added "<sched.h>" to be inclueded in the main.c file. However, during the compilation, we still got the error message:
Extra objs: gcc -O2 action.o crc.o data_lump.o data_lump_rpl.o dprint.o dset.o error.o fifo_server.o flags.o forward.o hash_func.o ip_addr.o main.o md5.o md5utils.o modparam.o msg_translator.o pass_fd.o proxy.o receive.o resolve.o route.o route_struct.o script_cb.o sr_module.o stats.o tcp_main.o tcp_read.o timer.o udp_server.o mem/f_malloc.o mem/mem.o mem/memtest.o mem/q_malloc.o mem/shm_mem.o mem/vq_malloc.o parser/hf.o parser/msg_parser.o parser/parse_content.o parser/parse_cseq.o parser/parse_event.o parser/parse_expires.o parser/parse_fline.o parser/parse_from.o parser/parse_hname2.o parser/parse_hostport.o parser/parse_nameaddr.o parser/parse_param.o parser/parse_rr.o parser/parse_to.o parser/parse_uri.o parser/parse_via.o parser/parser_f.o parser/digest/digest.o parser/digest/digest_parser.o parser/digest/param_parser.o parser/contact/contact.o parser/contact/parse_contact.o db/db.o lex.yy.o cfg.tab.o -lfl -ldl -lresolv -L/usr/local/lib -lfl -lxnet -lpthread -lnsl -o ser Undefined first referenced symbol in file sched_yield main.o ld: fatal: Symbol referencing errors. No output written to ser collect2: ld returned 1 exit status make: *** [ser] Error 1
Do we really need librt.so? Which GNU package does that come from? Are there anyone who successfully install ser 0.8.11 on Solaris?
Thanks very much. Ziying Sherwin
On Nov 19, 2003 at 11:59, Ziying Sherwin sherwin@lhc.nlm.nih.gov wrote:
We are trying to compile ser 0.8.11 on Solaris 2.8 using gcc 3.3. Since we don't have librt.so on our system, we change the Makefile.defs to use libpthread instead, we also added "<sched.h>" to be inclueded in the main.c file. However, during the compilation, we still got the error message:
[...]
Undefined first referenced symbol in file sched_yield main.o ld: fatal: Symbol referencing errors. No output written to ser collect2: ld returned 1 exit status make: *** [ser] Error 1
Do we really need librt.so? Which GNU package does that come from?
If you want sched_yield yes (better than sleep(0)). It doesn't come from any GNU package, it comes from SUNWcsl (man librt => librt, libposix4 - POSIX.1b Realtime Extensions library ...).
To compile without librt and without sched_yield remove -DHAVE_SCHED_YIELD from Makefile.defs: ifeq ($(OS), solaris) ...
Are there anyone who successfully install ser 0.8.11 on Solaris?
Yes, on several machines.
Andrei