Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Problem compiling Crafty 19.3 on Linux platform

Author: Frank Phillips

Date: 10:27:26 02/10/03

Go up one level in this thread


On February 10, 2003 at 02:11:21, Martin Andersen wrote:

>Hi !
>
>I'm running Redhat 8.0 on an Athlon 1Ghz system.
>To compile Crafty 19.3, I try the command
>make linux-i686.
>
>Here is the output when it goes wrong.
>btw I'm using the tar.gz file found on Hyatt's server.
>
>
>evaluate.o: In function `Evaluate':
>evaluate.o(.text+0xb47): undefined reference to `FirstOne'
>evaluate.o(.text+0xbc5): undefined reference to `PopCnt'
>evaluate.o(.text+0xd67): undefined reference to `FirstOne'
>evaluate.o(.text+0xde5): undefined reference to `PopCnt'
>evaluate.o(.text+0xf87): undefined reference to `FirstOne'
>evaluate.o(.text+0xfb4): undefined reference to `MobilityDiaga1Func'
>evaluate.o(.text+0xfc6): undefined reference to `MobilityDiagh1Func'
>evaluate.o(.text+0x10e1): undefined reference to `FirstOne'
>evaluate.o(.text+0x110e): undefined reference to `MobilityDiaga1Func'
>evaluate.o(.text+0x1120): undefined reference to `MobilityDiagh1Func'
>evaluate.o(.text+0x129e): undefined reference to `PopCnt'
>evaluate.o(.text+0x14d2): undefined reference to `PopCnt'
>evaluate.o(.text+0x1506): undefined reference to `PopCnt'
>evaluate.o(.text+0x16f3): undefined reference to `FirstOne'
>evaluate.o(.text+0x1760): undefined reference to `AttacksRankFunc'
>evaluate.o(.text+0x189a): undefined reference to `LastOne'
>evaluate.o(.text+0x1911): undefined reference to `FirstOne'
>evaluate.o(.text+0x19b5): undefined reference to `AttacksRankFunc'
>evaluate.o(.text+0x1aa7): undefined reference to `FirstOne'
>evaluate.o(.text+0x1b14): undefined reference to `AttacksRankFunc'
>evaluate.o(.text+0x1c4e): undefined reference to `FirstOne'
>evaluate.o(.text+0x1cc4): undefined reference to `LastOne'
>evaluate.o(.text+0x1d67): undefined reference to `AttacksRankFunc'
>evaluate.o(.text+0x1e5f): undefined reference to `FirstOne'
>evaluate.o(.text+0x1eb3): undefined reference to `AttacksRankFunc'
>evaluate.o(.text+0x2063): undefined reference to `FirstOne'
>evaluate.o(.text+0x20b7): undefined reference to `AttacksRankFunc'
>evaluate.o(.text+0x22ea): undefined reference to `FirstOne'
>evaluate.o(.text+0x2302): undefined reference to `FirstOne'
>evaluate.o: In function `EvaluatePassedPawns':
>evaluate.o(.text+0x3494): undefined reference to `FirstOne'
>evaluate.o(.text+0x356f): undefined reference to `FirstOne'
>evaluate.o(.text+0x3599): undefined reference to `FirstOne'
>evaluate.o(.text+0x3768): undefined reference to `LastOne'
>evaluate.o(.text+0x3835): undefined reference to `LastOne'
>evaluate.o(.text+0x385f): undefined reference to `LastOne'
>evaluate.o(.text+0x3a07): undefined reference to `FirstOne'
>evaluate.o(.text+0x3acb): undefined reference to `FirstOne'
>evaluate.o: In function `EvaluatePassedPawnRaces':
>evaluate.o(.text+0x3bcf): undefined reference to `LastOne'
>evaluate.o(.text+0x3df5): undefined reference to `FirstOne'
>evaluate.o(.text+0x4037): undefined reference to `FirstOne'
>evaluate.o(.text+0x416b): undefined reference to `FirstOne'
>evaluate.o(.text+0x419c): undefined reference to `FirstOne'
>evaluate.o(.text+0x42b8): undefined reference to `LastOne'
>evaluate.o(.text+0x43f8): undefined reference to `LastOne'
>evaluate.o(.text+0x4429): undefined reference to `LastOne'
>evaluate.o: In function `EvaluatePawns':
>evaluate.o(.text+0x4ba0): undefined reference to `FirstOne'
>evaluate.o(.text+0x4c4d): undefined reference to `PopCnt'
>evaluate.o(.text+0x4c7a): undefined reference to `PopCnt'
>evaluate.o(.text+0x4d28): undefined reference to `FirstOne'
>evaluate.o(.text+0x4dd5): undefined reference to `PopCnt'
>evaluate.o(.text+0x4e02): undefined reference to `PopCnt'
>evaluate.o(.text+0x4e9e): undefined reference to `LastOne'
>evaluate.o(.text+0x4f85): undefined reference to `PopCnt'
>evaluate.o(.text+0x4fb2): undefined reference to `PopCnt'
>evaluate.o(.text+0x50bc): undefined reference to `PopCnt'
>evaluate.o(.text+0x50ee): undefined reference to `PopCnt'
>evaluate.o(.text+0x5127): undefined reference to `PopCnt'
>evaluate.o(.text+0x5155): more undefined references to `PopCnt' follow
>evaluate.o: In function `EvaluatePawns':
>evaluate.o(.text+0x5225): undefined reference to `LastOne'
>evaluate.o(.text+0x529d): undefined reference to `PopCnt'
>evaluate.o(.text+0x531e): undefined reference to `LastOne'
>evaluate.o(.text+0x5396): undefined reference to `PopCnt'
>evaluate.o(.text+0x542f): undefined reference to `PopCnt'
>evaluate.o(.text+0x5633): undefined reference to `PopCnt'
>evaluate.o(.text+0x5660): undefined reference to `PopCnt'
>evaluate.o(.text+0x58ca): undefined reference to `PopCnt'
>evaluate.o(.text+0x5aef): undefined reference to `FirstOne'
>evaluate.o(.text+0x5bd9): undefined reference to `PopCnt'
>evaluate.o(.text+0x5c03): undefined reference to `PopCnt'
>evaluate.o(.text+0x5d09): undefined reference to `PopCnt'
>evaluate.o(.text+0x5d3b): undefined reference to `PopCnt'
>evaluate.o(.text+0x5d6f): undefined reference to `PopCnt'
>evaluate.o(.text+0x5da2): more undefined references to `PopCnt' follow
>evaluate.o: In function `EvaluatePawns':
>evaluate.o(.text+0x5e74): undefined reference to `FirstOne'
>evaluate.o(.text+0x5f08): undefined reference to `PopCnt'
>evaluate.o(.text+0x5f89): undefined reference to `FirstOne'
>evaluate.o(.text+0x601d): undefined reference to `PopCnt'
>evaluate.o(.text+0x60b6): undefined reference to `PopCnt'
>evaluate.o(.text+0x62c4): undefined reference to `PopCnt'
>evaluate.o(.text+0x62ee): undefined reference to `PopCnt'
>evaluate.o(.text+0x6546): undefined reference to `PopCnt'
>evaluate.o(.text+0x6882): more undefined references to `PopCnt' follow
>evaluate.o: In function `EvaluateStalemate':
>evaluate.o(.text+0x73b4): undefined reference to `FirstOne'
>evaluate.o(.text+0x746a): undefined reference to `FirstOne'
>evaluate.o: In function `EvaluateWinner':
>evaluate.o(.text+0x7858): undefined reference to `LastOne'
>evaluate.o(.text+0x7881): undefined reference to `LastOne'
>evaluate.o(.text+0x78b9): undefined reference to `LastOne'
>evaluate.o(.text+0x78e6): undefined reference to `LastOne'
>evaluate.o(.text+0x79b3): undefined reference to `LastOne'
>evaluate.o(.text+0x79e5): more undefined references to `LastOne' follow
>evaluate.o: In function `EvaluateWinner':
>evaluate.o(.text+0x7caa): undefined reference to `FirstOne'
>evaluate.o(.text+0x7cd3): undefined reference to `FirstOne'
>evaluate.o(.text+0x7d08): undefined reference to `FirstOne'
>evaluate.o(.text+0x7d35): undefined reference to `FirstOne'
>evaluate.o(.text+0x7df8): undefined reference to `FirstOne'
>evaluate.o(.text+0x7e2a): more undefined references to `FirstOne' follow
>movgen.o: In function `GenerateCaptures':
>movgen.o(.text+0x3c): undefined reference to `LastOne'
>movgen.o(.text+0x7c): undefined reference to `LastOne'
>movgen.o(.text+0x125): undefined reference to `LastOne'
>movgen.o(.text+0x147): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x175): undefined reference to `LastOne'
>movgen.o(.text+0x21e): undefined reference to `LastOne'
>movgen.o(.text+0x232): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x260): undefined reference to `LastOne'
>movgen.o(.text+0x309): undefined reference to `LastOne'
>movgen.o(.text+0x32b): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x343): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x379): undefined reference to `LastOne'
>movgen.o(.text+0x43f): undefined reference to `LastOne'
>movgen.o(.text+0x4e0): undefined reference to `LastOne'
>movgen.o(.text+0x5b3): undefined reference to `LastOne'
>movgen.o(.text+0x69a): undefined reference to `LastOne'
>movgen.o(.text+0x76a): undefined reference to `FirstOne'
>movgen.o(.text+0x7a9): undefined reference to `FirstOne'
>movgen.o(.text+0x850): undefined reference to `FirstOne'
>movgen.o(.text+0x872): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x89f): undefined reference to `FirstOne'
>movgen.o(.text+0x946): undefined reference to `FirstOne'
>movgen.o(.text+0x95a): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x987): undefined reference to `FirstOne'
>movgen.o(.text+0xa34): undefined reference to `FirstOne'
>movgen.o(.text+0xa56): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0xa6e): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0xaa3): undefined reference to `FirstOne'
>movgen.o(.text+0xb66): undefined reference to `FirstOne'
>movgen.o(.text+0xc05): undefined reference to `FirstOne'
>movgen.o(.text+0xcd7): undefined reference to `FirstOne'
>movgen.o(.text+0xdb5): undefined reference to `FirstOne'
>movgen.o: In function `GenerateCheckEvasions':
>movgen.o(.text+0xeb5): undefined reference to `PopCnt'
>movgen.o(.text+0xeec): undefined reference to `FirstOne'
>movgen.o(.text+0xfb0): undefined reference to `FirstOne'
>movgen.o(.text+0xff1): undefined reference to `FirstOne'
>movgen.o(.text+0x105c): undefined reference to `LastOne'
>movgen.o(.text+0x1110): undefined reference to `LastOne'
>movgen.o(.text+0x1164): undefined reference to `LastOne'
>movgen.o(.text+0x120b): undefined reference to `LastOne'
>movgen.o(.text+0x124d): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x1275): undefined reference to `LastOne'
>movgen.o(.text+0x131c): undefined reference to `LastOne'
>movgen.o(.text+0x134e): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x1376): undefined reference to `LastOne'
>movgen.o(.text+0x141d): undefined reference to `LastOne'
>movgen.o(.text+0x145f): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x146f): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x149f): undefined reference to `LastOne'
>movgen.o(.text+0x15d6): undefined reference to `LastOne'
>movgen.o(.text+0x1652): undefined reference to `LastOne'
>movgen.o(.text+0x1869): undefined reference to `LastOne'
>movgen.o(.text+0x19c5): undefined reference to `LastOne'
>movgen.o(.text+0x1b2d): undefined reference to `PopCnt'
>movgen.o(.text+0x1b63): undefined reference to `FirstOne'
>movgen.o(.text+0x1c26): undefined reference to `FirstOne'
>movgen.o(.text+0x1c67): undefined reference to `FirstOne'
>movgen.o(.text+0x1cd3): undefined reference to `FirstOne'
>movgen.o(.text+0x1d85): undefined reference to `FirstOne'
>movgen.o(.text+0x1dd9): more undefined references to `FirstOne' follow
>movgen.o: In function `GenerateCheckEvasions':
>movgen.o(.text+0x1ec0): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x1ee8): undefined reference to `FirstOne'
>movgen.o(.text+0x1f8d): undefined reference to `FirstOne'
>movgen.o(.text+0x1fbb): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x1fe3): undefined reference to `FirstOne'
>movgen.o(.text+0x208e): undefined reference to `FirstOne'
>movgen.o(.text+0x20d0): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x20e0): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x2110): undefined reference to `FirstOne'
>movgen.o(.text+0x2245): undefined reference to `FirstOne'
>movgen.o(.text+0x22c1): undefined reference to `FirstOne'
>movgen.o(.text+0x24d7): undefined reference to `FirstOne'
>movgen.o(.text+0x261a): undefined reference to `FirstOne'
>movgen.o: In function `GenerateNonCaptures':
>movgen.o(.text+0x28f5): undefined reference to `LastOne'
>movgen.o(.text+0x2934): undefined reference to `LastOne'
>movgen.o(.text+0x29c5): undefined reference to `LastOne'
>movgen.o(.text+0x29e7): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x2a12): undefined reference to `LastOne'
>movgen.o(.text+0x2aa3): undefined reference to `LastOne'
>movgen.o(.text+0x2ab7): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x2ae2): undefined reference to `LastOne'
>movgen.o(.text+0x2b73): undefined reference to `LastOne'
>movgen.o(.text+0x2b95): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x2ba9): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x2bdd): undefined reference to `LastOne'
>movgen.o(.text+0x2c87): undefined reference to `LastOne'
>movgen.o(.text+0x2d27): undefined reference to `LastOne'
>movgen.o(.text+0x2d80): undefined reference to `LastOne'
>movgen.o(.text+0x2eb2): undefined reference to `LastOne'
>movgen.o(.text+0x2f55): more undefined references to `LastOne' follow
>movgen.o: In function `GenerateNonCaptures':
>movgen.o(.text+0x3184): undefined reference to `FirstOne'
>movgen.o(.text+0x31c3): undefined reference to `FirstOne'
>movgen.o(.text+0x3254): undefined reference to `FirstOne'
>movgen.o(.text+0x3276): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x32a1): undefined reference to `FirstOne'
>movgen.o(.text+0x3332): undefined reference to `FirstOne'
>movgen.o(.text+0x3346): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x3371): undefined reference to `FirstOne'
>movgen.o(.text+0x3408): undefined reference to `FirstOne'
>movgen.o(.text+0x342a): undefined reference to `AttacksBishopFunc'
>movgen.o(.text+0x343e): undefined reference to `AttacksRookFunc'
>movgen.o(.text+0x3472): undefined reference to `FirstOne'
>movgen.o(.text+0x351c): undefined reference to `FirstOne'
>movgen.o(.text+0x35bc): undefined reference to `FirstOne'
>movgen.o(.text+0x3615): undefined reference to `FirstOne'
>movgen.o(.text+0x3746): undefined reference to `FirstOne'
>movgen.o(.text+0x37e3): more undefined references to `FirstOne' follow
>attacks.o: In function `AttacksTo':
>attacks.o(.text+0xb7): undefined reference to `AttacksBishopFunc'
>attacks.o(.text+0xe5): undefined reference to `AttacksRookFunc'
>attacks.o: In function `Attacked':
>attacks.o(.text+0x1e4): undefined reference to `AttacksBishopFunc'
>attacks.o(.text+0x212): undefined reference to `AttacksRookFunc'
>attacks.o(.text+0x2aa): undefined reference to `AttacksBishopFunc'
>attacks.o(.text+0x2d5): undefined reference to `AttacksRookFunc'
>swap.o: In function `Swap':
>swap.o(.text+0x249): undefined reference to `FirstOne'
>swap.o: In function `SwapXray':
>swap.o(.text+0x386): undefined reference to `AttacksRankFunc'
>swap.o(.text+0x3bf): undefined reference to `AttacksDiaga1Func'
>swap.o(.text+0x3e8): undefined reference to `AttacksFileFunc'
>swap.o(.text+0x421): undefined reference to `AttacksDiagh1Func'
>swap.o(.text+0x44a): undefined reference to `AttacksRankFunc'
>swap.o(.text+0x483): undefined reference to `AttacksDiaga1Func'
>swap.o(.text+0x4a9): undefined reference to `AttacksFileFunc'
>swap.o(.text+0x4df): undefined reference to `AttacksDiagh1Func'
>utility.o: In function `PinnedOnKing':
>utility.o(.text+0x24a8): undefined reference to `AttacksRankFunc'
>utility.o(.text+0x24d7): undefined reference to `AttacksRankFunc'
>utility.o(.text+0x24f8): undefined reference to `AttacksDiaga1Func'
>utility.o(.text+0x2527): undefined reference to `AttacksDiaga1Func'
>utility.o(.text+0x2538): undefined reference to `AttacksFileFunc'
>utility.o(.text+0x2567): undefined reference to `AttacksFileFunc'
>utility.o(.text+0x258b): undefined reference to `AttacksDiagh1Func'
>utility.o(.text+0x25ba): undefined reference to `AttacksDiagh1Func'
>utility.o(.text+0x262f): undefined reference to `AttacksRankFunc'
>utility.o(.text+0x265e): undefined reference to `AttacksRankFunc'
>utility.o(.text+0x267f): undefined reference to `AttacksDiaga1Func'
>utility.o(.text+0x26ae): undefined reference to `AttacksDiaga1Func'
>utility.o(.text+0x26bf): undefined reference to `AttacksFileFunc'
>utility.o(.text+0x26ea): undefined reference to `AttacksFileFunc'
>utility.o(.text+0x270e): undefined reference to `AttacksDiagh1Func'
>utility.o(.text+0x2739): undefined reference to `AttacksDiagh1Func'
>probe.o: In function `EGTBProbe':
>probe.o(.text+0x2a): undefined reference to `FirstOne'
>probe.o(.text+0x7a): undefined reference to `FirstOne'
>probe.o(.text+0xc8): undefined reference to `FirstOne'
>probe.o(.text+0x118): undefined reference to `FirstOne'
>probe.o(.text+0x166): undefined reference to `FirstOne'
>probe.o(.text+0x1b9): more undefined references to `FirstOne' follow
>book.o: In function `BookRejectMove':
>book.o(.text+0x3c76): undefined reference to `PopCnt'
>book.o(.text+0x3ce9): undefined reference to `PopCnt'
>init.o: In function `InitializeAttackBoards':
>init.o(.text+0x13fa): undefined reference to `FirstOne'
>init.o(.text+0x14b8): undefined reference to `FirstOne'
>init.o(.text+0x1582): undefined reference to `FirstOne'
>init.o(.text+0x1649): undefined reference to `FirstOne'
>init.o(.text+0x170d): undefined reference to `FirstOne'
>init.o(.text+0x17d1): more undefined references to `FirstOne' follow
>init.o: In function `SetChessBitBoards':
>init.o(.text+0x2422): undefined reference to `PopCnt'
>iterate.o: In function `Iterate':
>iterate.o(.text+0x1b1): undefined reference to `FirstOne'
>iterate.o(.text+0x1c9): undefined reference to `FirstOne'
>validate.o: In function `ValidatePosition':
>validate.o(.text+0x80b): undefined reference to `PopCnt'
>validate.o(.text+0x82a): undefined reference to `PopCnt'
>validate.o(.text+0x847): undefined reference to `PopCnt'
>validate.o(.text+0x861): undefined reference to `PopCnt'
>validate.o(.text+0x87b): undefined reference to `PopCnt'
>validate.o(.text+0x895): more undefined references to `PopCnt' follow
>validate.o: In function `ValidatePosition':
>validate.o(.text+0xc6e): undefined reference to `FirstOne'
>validate.o(.text+0xce1): undefined reference to `FirstOne'
>validate.o(.text+0xd54): undefined reference to `FirstOne'
>validate.o(.text+0xdc7): undefined reference to `FirstOne'
>validate.o(.text+0xe3a): undefined reference to `FirstOne'
>validate.o(.text+0xead): more undefined references to `FirstOne' follow
>validate.o: In function `ValidatePosition':
>validate.o(.text+0x1634): undefined reference to `PopCnt'
>egtb.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
>X86-aout.o: In function `_AttacksRankFunc':
>X86-aout.o(.text+0x1ae): undefined reference to `_at'
>X86-aout.o(.text+0x1b7): undefined reference to `_at'
>X86-aout.o: In function `_AttacksFileFunc':
>X86-aout.o(.text+0x202): undefined reference to `_at'
>X86-aout.o(.text+0x20a): undefined reference to `_at'
>X86-aout.o(.text+0x214): undefined reference to `_at'
>X86-aout.o(.text+0x253): more undefined references to `_at' follow
>collect2: ld returned 1 exit status
>make[2]: *** [crafty] Error 1
>make[2]: Leaving directory `/home/martin/skak/Crafty'
>make[1]: *** [crafty-make] Error 2
>make[1]: Leaving directory `/home/martin/skak/Crafty'
>make: *** [linux-i686] Error 2

Athlons do not like the cmov instruction I think, so you need to replace the
pentium specific compiler flags with Athlon ones or some generic.  For example,
using the Intel compiler I replace the relevant sections of the Makefile the
following.  Not clever, but it works.



linux-icc-elf-profile:
	$(MAKE) target=LINUX \
		CC=icc CXX=icc \
		CFLAGS='$(CFLAGS) -D_REENTRANT -O2 -prof_genx -prof_dir ./profdir' \
		CXFLAGS='$(CFLAGS) -D_REENTRANT -O2 -prof_genx -prof_dir ./profdir' \
		LDFLAGS=$(LDFLAGS) \
		opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \
		     -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST \
		     -DSMP -DCPUS=4 -DCLONE -DDGT' \
		asm=X86-elf.o \
		crafty-make

linux-icc-elf:
	$(MAKE) target=LINUX \
		CC=icc CXX=icc \
		CFLAGS='$(CFLAGS) -D_REENTRANT -O2 -prof_use -prof_dir ./profdir' \
		CXFLAGS='$(CFLAGS) -D_REENTRANT -O2 -prof_use -prof_dir ./profdir' \
		LDFLAGS=$(LDFLAGS) \
		opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \
		     -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST \
		     -DSMP -DCPUS=4 -DCLONE -DDGT' \
		asm=X86-elf.o \
		crafty-make



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.