Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803473 - media-video/vlc-3.0.16-r6: missing libatomic (undefined reference to __atomic_exchange_1)
Summary: media-video/vlc-3.0.16-r6: missing libatomic (undefined reference to __atomic...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libatomic-linking
  Show dependency tree
 
Reported: 2021-07-23 06:12 UTC by Alex Fan
Modified: 2021-08-28 20:25 UTC (History)
0 users

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


Attachments
build log (vlc-3.0.16-r6:20210723-032726.log,147.57 KB, text/x-log)
2021-07-23 06:13 UTC, Alex Fan
Details
emerge --info (emerge.info,5.04 KB, application/x-info)
2021-07-23 06:14 UTC, Alex Fan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Fan archtester 2021-07-23 06:12:15 UTC
I had this bug when compiling on qemu riscv64 with gcc-11.1.0-r2

It is a bug happends on arch without 1 or 2-bit atomic operations e.g. riscv and therefore requires to link against libatomic.

There is also reports for Raspberry Pi, please refer to this mailing list thread. https://mailman.videolan.org/pipermail/vlc-devel/2020-January/130770.html

Reproducible: Always
Comment 1 Alex Fan archtester 2021-07-23 06:13:23 UTC
Created attachment 725959 [details]
build log
Comment 2 Alex Fan archtester 2021-07-23 06:14:27 UTC
Created attachment 725962 [details]
emerge --info
Comment 3 Alex Fan archtester 2021-07-23 06:17:46 UTC
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: modules/.libs/bank.o: in function `module_InitBank':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/modules/bank.c:582: undefined reference to `__atomic_exchange_1'
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: audio_output/.libs/dec.o: in function `aout_DecDelete':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/audio_output/dec.c:134: undefined reference to `__atomic_fetch_or_1'
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: audio_output/.libs/dec.o: in function `aout_RequestRestart':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/audio_output/dec.c:201: undefined reference to `__atomic_exchange_1'
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: audio_output/.libs/dec.o: in function `aout_DecPlay':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/audio_output/dec.c:368: undefined reference to `__atomic_exchange_1'
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: misc/.libs/picture_pool.o: in function `picture_pool_ReleasePicture':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/misc/picture_pool.c:88: undefined reference to `__atomic_fetch_sub_2'
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: misc/.libs/picture_pool.o: in function `picture_pool_Release':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/misc/picture_pool.c:65: undefined reference to `__atomic_fetch_sub_2'
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: misc/.libs/picture_pool.o: in function `picture_pool_Release':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/misc/picture_pool.c:65: undefined reference to `__atomic_fetch_sub_2'
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: misc/.libs/picture_pool.o: in function `picture_pool_Get':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/misc/picture_pool.c:213: undefined reference to `__atomic_fetch_add_2'
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: misc/.libs/picture_pool.o: in function `picture_pool_Reserve':
/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src/misc/picture_pool.c:192: undefined reference to `__atomic_fetch_add_2'
collect2: error: ld returned 1 exit status
distcc[518209] ERROR: compile (null) on localhost failed
make[3]: *** [Makefile:2359: libvlccore.la] Error 1
make[3]: Leaving directory '/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src'
make[2]: *** [Makefile:1903: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16/src'
make[1]: *** [Makefile:1563: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-video/vlc-3.0.16-r6/work/vlc-3.0.16'
make: *** [Makefile:1450: all] Error 2
 * ERROR: media-video/vlc-3.0.16-r6::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-video/vlc-3.0.16-r6::gentoo'`,
Comment 4 Marek Szuba archtester gentoo-dev 2021-08-28 20:25:31 UTC
This got addressed by commit e924fc0b2dd85d16a5a537affe4be23cf213e0e5.