Date: Mon, 17 Aug 1998 11:16:46 -0700 From: Dave Spencer <dspencer@nightfall.forlorn.net> To: freebsd-questions@FreeBSD.ORG Subject: mysterious compilation failure Message-ID: <19980817111646.B2355@nightfall.forlorn.net>
next in thread | raw e-mail | index | archive | help
Hi folks, I'm trying to port to FreeBSD 2.2.7-RELEASE an application that we have previously ported to six flavors of UNIX, including BSDI. The compilation process succeedes until it reaches the linking stage. The link command is in the following format: gcc <object files> -L<our library paths> -g -l<our libraries> -lm -lc_r -ll -lstdc++ -o <target filename> At that point, I see many error messages such as the following: XFrameBuffer.o: Undefined symbol `RunningAverage::~RunningAverage(void)' referenced from text segment XFrameBuffer.o: Undefined symbol `RunningAverage::~RunningAverage(void)' referenced from text segment XFrameBuffer.o: Undefined symbol `RunningAverage::dAverage(void)' referenced from text segment XFrameBuffer.o: Undefined symbol `RunningAverage::dAverage(void)' referenced from text segment cup.o: Undefined symbol `_ba_init_set_buffer' referenced from text segment ecvt.o: Undefined symbol `_ba_init' referenced from text segment ecvt.o: Undefined symbol `_ba_smr' referenced from text segment ecvt.o: Undefined symbol `_ba_mono_low' referenced from text segment ecvt.o: Undefined symbol `_ba_stereo' referenced from data segment ecvt.o: Undefined symbol `_ba_joint' referenced from data segment ecvt.o: Undefined symbol `_ba_dual' referenced from data segment ecvt.o: Undefined symbol `_ba_mono' referenced from data segment init.o: Undefined symbol `_ba_init_addr' referenced from text segment parsetab.o: Undefined symbol `_yylex' referenced from text segment parsetab.o: Undefined symbol `_tabcount' referenced from text segment parsetab.o: Undefined symbol `_tabcount' referenced from text segment parsetab.o: Undefined symbol `_yyleng' referenced from text segment parsetab.o: Undefined symbol `_tokenpos' referenced from text segment parsetab.o: Undefined symbol `_tokenpos' referenced from text segment parsetab.o: Undefined symbol `_lineno' referenced from text segment parsetab.o: Undefined symbol `_lineno' referenced from text segment parsetab.o: Undefined symbol `_lineno' referenced from text segment parsetab.o: Undefined symbol `_tokenpos' referenced from text segment parsetab.o: Undefined symbol `_yyleng' referenced from text segment parsetab.o: Undefined symbol `_tabcount' referenced from text segment parsetab.o: Undefined symbol `_yyin' referenced from text segment parsetab.o: Undefined symbol `_yyrestart' referenced from text segment parsetab.o: Undefined symbol `_yyin' referenced from text segment Usually, these mean that, well, the symbol hasn't been defined. Unfortunately for me, a look at the ar archives with nm leads me to conclude that, yes, these symbols _are_ (theoretically) present in the libraries that I'm linking together here. They are noted to have T or D mode where they're supposed to, and U mode in the objects that reference them externally. Just like they do on the other platforms. I've done a symbol-by-symbol comparison between the FreeBSD archives and some on other platforms, and I have to conclude that something is uniquely different in the FreeBSD link stage. The archives seem fine. I am using gmake 3.76.1 and gcc 2.8.1. I have also tried with gcc 2.7.2.2, to this same result. When I tried it on a 2.2.5-RELEASE box, the compile failed due to some unsupported threading structures in 2.2.5. I'm stumped. The linking command I showed above is the latest attempt I've made at it, but it's only working slightly better than the original attempt. (It helped to ask libc_r for pthreads support instead of asking libc...) Can anybody help me track down what's causing this? Thanks much, -Dave To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980817111646.B2355>