Gentoo: undefined NeAAC* symbols in avcodec-*.so
#1
Gentoo, XBMC from SVN.

For some time now, xbmc builds fine (i use a slightly modified 9999 ebuild), it starts, but when I try to start a video I get errors like this in the log:

Quote:21:50:24 T:3030116208 M:1195216896 NOTICE: DVDPlayer: Opening: /mnt/u/???.avi
21:50:24 T:3030116208 M:1195216896 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
21:50:24 T:2979384176 M:1195216896 NOTICE: Creating InputStream
21:50:24 T:2979384176 M:1194700800 NOTICE: Creating Demuxer
21:50:24 T:2979384176 M:1194700800 ERROR: Unable to load /usr/lib/xbmc/system/players/dvdplayer/avcodec-52-i486-linux.so, reason: /usr/lib/xbmc/system/players/dvdplayer/avcodec-52-i486-linux.so: undefined symbol: NeAACDecSetConfiguration
21:50:24 T:2979384176 M:1194573824 ERROR: CDVDDemuxFFmpeg::Open - failed to load ffmpeg libraries
21:50:24 T:2979384176 M:1194573824 ERROR: OpenDemuxStream - Error creating demuxer
21:50:24 T:2979384176 M:1194573824 NOTICE: CDVDPlayer::OnExit()
21:50:24 T:2979384176 M:1194573824 NOTICE: CDVDPlayer::OnExit() deleting input stream
21:50:24 T:3030116208 M:1194573824 ERROR: Playlist Player: skipping unplayable item: 0, path [/mnt/u/???.avi]

Or, to put it short:

/usr/lib/xbmc/system/players/dvdplayer/avcodec-52-i486-linux.so: undefined symbol: NeAACDecSetConfiguration

NeAAC* symbols belong to faad2, I believe.

There is a similar bug on Gentoo bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=330477

The same error appears even if I compile old revisions of XBMC with old ebuilds, which I am sure earlier worked fine.

Any thoughts anyone? Some linking problems?
Reply
#2
nasty fix is to LD_PRELOAD the faad binary before running xbmc.

we have an issue where we're saved by an implicit dep for faad, i haven't quite been able to nail exactly what it is. to summarize; your xbmc.bin is not linked to libfaad. hence the symbols cannot be resolved. either LD_PRELOAD it, or hack the Makefile to link to faad.
Reply
#3
Thanks, spiff!

Added 'export LD_PRELOAD="/usr/lib/libfaad.so"' to the XBMC startup script, now it plays videos no problem.
Reply
#4
I suspect this is related to the ld flag "--as-needed", which has recently been enabled by default. This would explain why you also have the problem with older XBMC ebuilds that previously did work.

You might want to check eselect news item "2010-08-01 --as-needed enabled in default profiles", and http://www.gentoo.org/proj/en/qa/asneeded.xml. Maybe you can find a saner way to fix it.
Reply
#5
You're absolutely right, stintel. I modified my ebuild to filter out the --as-needed flag and everything is back to normal.
Reply
#6
hey kinbot,

nice. would you mind to post your solution here and/or in the original bug report?

regards,
einhänder
Reply
#7
Right, einhälder. I requested reopening of the bug.

The exact solution was to add the following to the ebuild:

Code:
pkg_setup() {
    append-ldflags $(no-as-needed)
}
Reply
#8
Same problem occurred on Arch, due to the --as-needed flag being passed to the linker.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#9
same problem, thx for pointing me to the thread spiff. i had to do:

export LD_PRELOAD="/usr/lib/libfaad.so:/lib/libbz2.so"

will fix my ebuild for the next beta.
xbmc-pvr-ppa-odk68, Gentoo x86 3.0.7-pf, xorg-server-1.11.2, mesa-7.11, nvidia-drivers-290.10
Reply

Logout Mark Read Team Forum Stats Members Help
Gentoo: undefined NeAAC* symbols in avcodec-*.so0