Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504270 - media-libs/libtheora-1.1.1 needs -lm for player_example
Summary: media-libs/libtheora-1.1.1 needs -lm for player_example
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PATCH
: 522522 (view as bug list)
Depends on:
Blocks: underlinking
  Show dependency tree
 
Reported: 2014-03-11 23:23 UTC by Hector Martin
Modified: 2014-09-14 12:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add -lm to the linker flags for player_example. (libtheora-1.1.1-libm.patch,564 bytes, patch)
2014-03-11 23:23 UTC, Hector Martin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hector Martin 2014-03-11 23:23:15 UTC
Created attachment 372452 [details, diff]
Add -lm to the linker flags for player_example.

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: player_example-player_example.o: undefined reference to symbol 'rintf@@GLIBC_2.2.5'
/lib64/libm.so.6: error adding symbols: DSO missing from command line

examples/Makefile.am needs an extra -lm (note that player_example.c calls 'rint', not 'rintf', but the compiler converts that). Patch attached. This seems to be in upstream SVN already, but 1.1.1 is still the most recent release version.
Comment 1 renato gallo 2014-03-26 12:12:15 UTC
same problem here
Comment 2 renato gallo 2014-03-26 12:13:56 UTC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: player_example-player_example.o: undefined reference to symbol 'rintf@@GLIBC_2.2.5'
/lib64/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:449: recipe for target 'player_example' failed
make[2]: *** [player_example] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: link: x86_64-pc-linux-gnu-gcc -I/usr/include/libpng16 -Wall -Wno-parentheses -O2 -pipe -Wl,-O1 -o .libs/png2theora png2theora-png2theora.o  -Wl,--as-needed ../lib/.libs/libtheoraenc.so ../lib/.libs/libtheoradec.so -logg -lpng16 -lm
make[2]: Leaving directory '/var/tmp/portage/media-libs/libtheora-1.1.1-r1/work/libtheora-1.1.1-amd64/examples'
Makefile:521: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-libs/libtheora-1.1.1-r1/work/libtheora-1.1.1-amd64'
Makefile:417: recipe for target 'all' failed
make: *** [all] Error 2
Comment 3 renato gallo 2014-03-26 12:19:42 UTC
I confirm the patch fixes everything just fine :)
thank you hector
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2014-03-29 05:10:28 UTC
patch in portage. thanks!
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2014-09-12 03:34:13 UTC
*** Bug 522522 has been marked as a duplicate of this bug. ***
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2014-09-14 12:19:56 UTC
*** Bug 522522 has been marked as a duplicate of this bug. ***