From owner-freebsd-questions Mon Aug 17 11:18:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA15693 for freebsd-questions-outgoing; Mon, 17 Aug 1998 11:18:11 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from nightfall.forlorn.net (nightfall.forlorn.net [207.114.150.221]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA15556 for ; Mon, 17 Aug 1998 11:17:35 -0700 (PDT) (envelope-from dspencer@nightfall.forlorn.net) Received: (from dspencer@localhost) by nightfall.forlorn.net (8.8.8/8.8.8) id LAA02456; Mon, 17 Aug 1998 11:16:46 -0700 (PDT) Message-ID: <19980817111646.B2355@nightfall.forlorn.net> Date: Mon, 17 Aug 1998 11:16:46 -0700 From: Dave Spencer To: freebsd-questions@FreeBSD.ORG Subject: mysterious compilation failure Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 -L -g -l -lm -lc_r -ll -lstdc++ -o 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