From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 6 Aug 2007 23:07:51 +0300 From: Michael Shigorin To: ALT Devel discussion list Message-ID: <20070806200751.GA29773@osdn.org.ua> Mail-Followup-To: ALT Devel discussion list References: Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.1i Subject: Re: [devel] C++ libraries linking X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2007 20:07:52 -0000 Archived-At: List-Archive: List-Post: On Mon, Mar 20, 2006 at 10:29:56PM +0200, Igor Vlasenko wrote: > борясь с --as-needed в одном кривом софте (yacas), > заметил, что его библиотеки имеют undefined symbols из > libstdc++, и действительно, линкуются gcc: О, а я сегодня по старой памяти и поводу в виде 1.1.0 попробовал его упакетить. Спек в аттаче, итог сборки таков: /bin/sh ../libtool --mode=link g++ -pipe -Wall -O2 -march=athlon -mtune=athlon-xp -Wall -o yacas yacasmain.o unixcommandline.o stdcommandline.o libyacasnumbers.la libyacas.la libyacasplatform.la ../libltdl/libltdlc.la -lm g++ -pipe -Wall -O2 -march=athlon -mtune=athlon-xp -Wall -o .libs/yacas yacasmain.o unixcommandline.o stdcommandline.o ./.libs/libyacasnumbers.so ./.libs/libyacas.so ./.libs/libyacasplatform.so ../libltdl/.libs/libltdlc.a -ldl -lm ./.libs/libyacas.so: undefined reference to `sqrt' ./.libs/libyacas.so: undefined reference to `tan' ./.libs/libyacas.so: undefined reference to `asin' ./.libs/libyacas.so: undefined reference to `log' ./.libs/libyacas.so: undefined reference to `atan' ./.libs/libyacas.so: undefined reference to `fmod' ./.libs/libyacas.so: undefined reference to `acos' ./.libs/libyacas.so: undefined reference to `exp' ./.libs/libyacas.so: undefined reference to `sin' ./.libs/libyacas.so: undefined reference to `pow' ./.libs/libyacas.so: undefined reference to `cos' > gcc -shared .libs/deffile.o ... > ./.libs/libyacasnumbers.so ./.libs/libyacasplatform.so -lm -ldl > -march=athlon -Wl,--as-needed -Wl,-soname -Wl,libyacas.so.0 -o > .libs/libyacas.so.0.0.0 > > однако это получается из > > ../libtool --mode=link g++ -pipe -Wall -O2 -march=athlon -Wall > -Wl,--as-needed -o libyacas.la -rpath /usr/lib deffile.lo ... > ... .lo libyacasnumbers.la libyacasplatform.la -lm -ldl > > где явно указан g++. > > Кто знает в чем причина? -- ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/