From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Date: Mon, 8 Sep 2008 11:43:38 +0400 From: "Konstantin A. Lepikhov" To: ALT Linux kernel packages development Message-ID: <20080908074338.GA16753@lks.home> Mail-Followup-To: ALT Linux kernel packages development References: <48C3E965.7010909@altlinux.ru> <20080907181006.GA31227@lks.home> <20080907192006.GA9989@lks.home> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operation-System: ALT Linux Sisyphus (20071221) 2.6.26-wks-pae-alt2 User-Agent: Mutt/1.5.18 (2008-05-29) Subject: Re: [d-kernel] =?koi8-r?b?88LP0svBIM3PxNXM0SBkcmJk?= X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.10b3 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 07:43:45 -0000 Archived-At: List-Archive: List-Post: Hi Eugene! Monday 08, at 11:03:59 AM you wrote: > Совсем дурацкая проблема - не могу собрать бенчмарки (хотя нужно ли их > собирать?): > > cc -pthread -lm -o io-latency-test io-latency-test.c > /tmp/.private/enp/cc6mXiyl.o: In function `main': > io-latency-test.c:(.text+0x93d): undefined reference to `sqrt' > collect2: выполнение ld завершилось с кодом возврата 1 > make: *** [io-latency-test] Ошибка 1 --as-needed ;) Библиотеки должны идти после объектных файлов. > > в этом же самом окружении: > > $ cat test.c > #include > #include > > int main() > { > printf("%f\n",sqrt(2)); > return 0; > } > > $ cc -pthread -lm -o test test.c > $ ./test > 1.414214 > $ ldd test > linux-gate.so.1 => (0xffffe000) > libc.so.6 => /lib/libc.so.6 (0xb7e69000) > /lib/ld-linux.so.2 (0x80000000) > > -- WBR et al.