[ODE] linux amd64 compile error - 0.6-rc1

Chris M. czb182 at hotmail.com
Fri May 26 23:12:57 MST 2006


I added a % to push and pop to get this


  asm volatile (
	"mov $0,%%rax\n"
	"push %%rbx\n"
	"cpuid\n"
	"pop %%rbx\n"
	: : : "%rax","%rcx","%rdx","cc","memory");

and it compiled , however the test programs that I have run all crash. 
test_ode gives this
testRandomNumberGenerator()
        passed
testInfinity()
        passed
testPad()
        passed
testCrossProduct()
        passed
testSetZero()
        FAILED
testNormalize3()
        FAILED (code=3)
testPlaneSpace()
        FAILED
testMatrixMultiply()
        FAILED (1)
        FAILED (2)
        FAILED (3)
testSmallMatrixMultiply()
        passed (1)
        passed (2)
        passed (3)
        passed (4)
        passed (5)
        passed (6)
testCholeskyFactorization()
        FAILED (1)
        maximum difference = 0.000000e+00 - passed (2)
testCholeskySolve()
        FAILED (1)
        maximum difference = 0.000000e+00 - passed (2)
testInvertPDMatrix()
        FAILED (1)
        FAILED (2)
testIsPositiveDefinite()
        passed (1)
        FAILED (2)
testFastLDLTFactorization()
        maximum difference = 5.336397e-315 - passed
testSolveLDLT()
        maximum difference = 0.000000e+00 - passed
testLDLTAddTL()
        maximum difference = 5.336397e-315 - passed
testLDLTRemove()
        row/col removal FAILED for row 0
        row/col removal FAILED for row 1
        row/col removal FAILED for row 2
        row/col removal FAILED for row 3
        row/col removal FAILED for row 4
        row/col removal FAILED for row 5
        row/col removal FAILED for row 6
        row/col removal FAILED for row 7
        row/col removal FAILED for row 8
        row/col removal FAILED for row 9
        row/col removal FAILED for row 10
        row/col removal FAILED for row 11
        row/col removal FAILED for row 12
        row/col removal FAILED for row 13
        row/col removal FAILED for row 14
        row/col removal FAILED for row 15
        row/col removal FAILED for row 16
        row/col removal FAILED for row 17
        row/col removal FAILED for row 18
        row/col removal FAILED for row 19
        maximum difference = 5.336397e-315 - passed
testMassFunctions()
        (Message 2: mass must be > 0 in checkMass()) passed (1)
        (Message 2: mass must be > 0 in checkMass()) FAILED (2)
        FAILED (3)

ODE Message 2: mass must be > 0 in checkMass()
        FAILED (4)
./test_ode: symbol lookup error: ./test_ode: undefined symbol: 
dMassSetCapsule

------------------

This is with double precision.
If I rebuild without double precision some things do run and test_ode gives 
this

-----------------------

testRandomNumberGenerator()
        passed
testInfinity()
        passed
testPad()
        passed
testCrossProduct()
        passed
testSetZero()
        passed
testNormalize3()
        passed
testPlaneSpace()
        passed
testMatrixMultiply()
        passed (1)
        passed (2)
        passed (3)
testSmallMatrixMultiply()
        passed (1)
        passed (2)
        passed (3)
        passed (4)
        passed (5)
        passed (6)
testCholeskyFactorization()
        passed (1)
        maximum difference = 9.536743e-07 - passed (2)
testCholeskySolve()
        passed (1)
        maximum difference = 3.325939e-05 - FAILED (2)
testInvertPDMatrix()
        passed (1)
        FAILED (2)
testIsPositiveDefinite()
        passed (1)
        passed (2)
testFastLDLTFactorization()
        maximum difference = 4.768372e-07 - passed
testSolveLDLT()
        maximum difference = 2.095699e-04 - FAILED
testLDLTAddTL()
        maximum difference = 9.536743e-07 - passed
testLDLTRemove()
        maximum difference = 4.768372e-07 - passed
testMassFunctions()
        (Message 2: inertia must be positive definite in checkMass()) passed 
(1)
         passed (2)
        passed (3)
        passed (4)
./test_ode: symbol lookup error: ./test_ode: undefined symbol: 
dMassSetCapsule



>From: Bram Stolk <bram at sara.nl>
>To: "Chris M." <czb182 at hotmail.com>
>CC: ode at q12.org
>Subject: Re: [ODE] linux amd64 compile error - 0.6-rc1
>Date: Thu, 25 May 2006 10:22:41 +0200
>
>Chris M. wrote:
>>Hello, I just downloaded the 0.6-rc1 to give it a test of my gentoo linux 
>>athlon64 box.
>>Im getting some compilation errors.  I'm wasn't sure where to file a bug 
>>report, hopefully this is fine.
>
>This is the perfect place, we need to iron out matters like these for
>0.6, just here.
>
>>timer.cpp: In function `void dStopwatchStart(dStopwatch*)':
>>timer.cpp:139: error: invalid `asm': operand number missing after %-letter
>>timer.cpp:139: error: invalid `asm': operand number missing after %-letter
>
>The x64 code looks suspect to me:
>   asm volatile (
>         "mov $0,%%rax\n"
>         "push %rbx\n"
>         "cpuid\n"
>         "pop %rbx\n"
>         : : : "%rax","%rcx","%rdx","cc","memory");
>
>Why is rbx prefixed with one % char, and rax with two?
>
>Could you please try adding a '%' to the push and to the pop command?
>
>Thanks you for testing,
>
>    Bram
>
>
>>
>>This is with gcc 3.4.5
>>
>>
>>_______________________________________________
>>ODE mailing list
>>ODE at q12.org
>>http://q12.org/mailman/listinfo/ode
>




More information about the ODE mailing list