Code review comment for lp:~wiml-omni/libdrizzle/date-time

Revision history for this message
Wim Lewis (wiml-omni) wrote :

On 2 Apr 2013, at 11:36 AM, Andrew Hutchings wrote:
> So, there are two problems that flagged up when trying to merge this. I don't quite see how they are related to this branch yet, but:
>
> Ubuntu 12.04:
>
> ../tests/unit/numbers.c:307: main Assertion 'FLOAT_EQ_EXACT(col_dblval, expect_dblval)' [ Floating-point values 291.000000 != 291.271111 (difference is -0.271111) ]

Oho. I've fixed that, but haven't cleaned it up to commit yet, and had forgotten that numbers.c would hit it. (The problem, IIRC, is that drizzle_stmt_get_double() casts the value to uint64 or something before returning it as a double.)

> Fedora 17:
> /usr/bin/ld: tests/unit/numbers.o: undefined reference to symbol 'truncf@@GLIBC_2.2.5'
> /usr/bin/ld: note: 'truncf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
> /lib64/libm.so.6: could not read symbols: Invalid operation
> collect2: error: ld returned 1 exit status
> make[1]: *** [tests/unit/numbers] Error 1

I guess the unit tests need to be linked against -lm if they're using trunc(). I missed that one since libc and libm are the same library on OSX.

« Back to merge proposal