compilation fails to link with math library

Bug #944899 reported by Dávid Gábor Bodor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sakura
Fix Released
High
Dávid Gábor Bodor

Bug Description

During the linker phase ln fails, because math library is not linked with explicitly.

How to reproduce:
$ cmake .
$ make
Scanning dependencies of target man
[ 0%] Built target man
Scanning dependencies of target sakura
[100%] Building C object CMakeFiles/sakura.dir/src/sakura.o
Linking C executable src/sakura
/usr/bin/ld: CMakeFiles/sakura.dir/src/sakura.o: undefined reference to symbol 'roundf@@GLIBC_2.2.5'
/usr/bin/ld: note: 'roundf@@GLIBC_2.2.5' is defined in DSO /lib/libm.so.6 so try adding it to the linker command line
/lib/libm.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [src/sakura] Error 1
make[1]: *** [CMakeFiles/sakura.dir/all] Error 2
make: *** [all] Error 2

Versions:
coreutils 8.15
glibc 2.15
cmake 2.8.7
gcc 4.6.2

Tags: error linker

Related branches

Changed in sakura:
assignee: nobody → Dávid Gábor Bodor (david.gabor.bodor)
Changed in sakura:
status: New → In Progress
Changed in sakura:
status: In Progress → Fix Committed
Changed in sakura:
status: Fix Committed → In Progress
David Gómez (dabisu)
Changed in sakura:
importance: Undecided → High
David Gómez (dabisu)
Changed in sakura:
status: In Progress → Fix Committed
David Gómez (dabisu)
Changed in sakura:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.