../libdjvu/.libs/libdjvulibre.so: undefined reference to `__sync_bool_compare_an d_swap_4' ../libdjvu/.libs/libdjvulibre.so: undefined reference to `__sync_add_and_fetch_4 ' Reproducible: Always Steps to Reproduce: 1. Have -mtune=athlon in CFLAGS 2. build 3. Actual Results: i686-pc-linux-gnu-g++ -o .libs/bzz -DHAVE_CONFIG_H -I.. -I.. -I../libdjvu -I. - DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIX THREADS -mtune=athlon -pipe -fomit-frame-pointer bzz.o -Wl,-O1 ../libdjvu/.libs /libdjvulibre.so /usr/lib/libjpeg.so -lpthread -lm ../libdjvu/.libs/libdjvulibre.so: undefined reference to `__sync_bool_compare_an d_swap_4' ../libdjvu/.libs/libdjvulibre.so: undefined reference to `__sync_add_and_fetch_4 ' collect2: ld returned 1 exit status make[1]: *** [bzz] Error 1 make[1]: Leaving directory `/var/tmp/paludis/app-text-djvu-3.5.21/work/djvulibre -3.5.21/tools' make: *** [all] Error 2 Expected Results: Build would complete. Replacing "-mtune=athlon" by "-march=athlon" in CFLAGS (my CXXFLAGS="${CFLAGS}") fixes the problem.
You seem to need a newer architecture with 32bit atomic compare-and-swap and add-and-fetch operation support which provide all newer architectures but not the old i686, so you need to specify -march=... to have the compiler use the newer arch features. If the atomic operations are required from upstream they should provide another way to replace those operations or require a minimum architecture higher than i686.
Please post your `emerge --info' in a comment and attach the entire build log file.
Created attachment 182038 [details] output of failed install of app-text/djvu-3.5.21 Hopefully, the fact that i use Paludis instead of Emerge is not going to be a problem
~ # paludis --info =app-text/djvu-3.5.21::gentoo paludis 0.34.0 Paludis build information: Compiler: CXX: i686-pc-linux-gnu-g++ 4.1.2 (Gentoo 4.1.2) CXXFLAGS: -mtune=athlon -pipe -O2 -fomit-frame-pointer LDFLAGS: -Wl,-O1 DATE: 2009-01-24T11:59:02-0600 Libraries: C++ Library: GNU libstdc++ 20070214 Reduced Privs: reduced_uid: 104 reduced_uid->name: paludisbuild reduced_uid->dir: /dev/null reduced_gid: 443 reduced_gid->name: paludisbuild Paths: DATADIR: /usr/share LIBDIR: /usr/lib LIBEXECDIR: /usr/libexec SYSCONFDIR: /etc PYTHONINSTALLDIR: RUBYINSTALLDIR: Environment: Format: paludis Config dir: /etc/paludis World file: /var/lib/portage/world Repository installed-virtuals: format: installed_virtuals root: / Repository virtuals: format: virtuals Repository gentoo: format: ebuild location: /usr/portage append_repository_name_to_write_cache: true binary_destination: false binary_keywords: binary_uri_prefix: builddir: /var/tmp/paludis cache: /usr/portage/metadata/cache distdir: /usr/portage/distfiles eapi_when_unknown: 0 eapi_when_unspecified: 0 eclassdirs: /usr/portage/eclass ignore_deprecated_profiles: false layout: traditional names_cache: /var/empty newsdir: /usr/portage/metadata/news profile_eapi_when_unspecified: 0 profiles: /usr/portage/profiles/default/linux/x86/2008.0/desktop securitydir: /usr/portage/metadata/glsa setsdir: /usr/portage/sets sync: rsync://rsync.namerica.gentoo.org/gentoo-portage sync_options: --exclude-from=/etc/sync.exclude --rsync-option=--filter=H_**/files/digest-* use_manifest: use write_cache: /var/cache/paludis/metadata Repository installed: format: vdb location: /var/db/pkg builddir: /var/tmp/paludis names_cache: /var/empty provides_cache: /var/empty root: / Repository installed-unpackaged: format: installed_unpackaged location: /var/paludis/repositories/installed-unpackaged root: / Repository proaudio: format: ebuild location: /var/paludis/repositories/pro-audio append_repository_name_to_write_cache: true binary_destination: false binary_keywords: binary_uri_prefix: builddir: /var/tmp/paludis cache: /var/empty distdir: /usr/portage/distfiles eapi_when_unknown: 0 eapi_when_unspecified: 0 eclassdirs: /usr/portage/eclass /var/paludis/repositories/pro-audio/eclass ignore_deprecated_profiles: false layout: traditional master_repository: gentoo names_cache: /var/paludis/repositories/pro-audio/.cache/names newsdir: /var/paludis/repositories/pro-audio/metadata/news profile_eapi_when_unspecified: 0 profiles: /usr/portage/profiles/default/linux/x86/2008.0/desktop securitydir: /var/paludis/repositories/pro-audio/metadata/glsa setsdir: /var/paludis/repositories/pro-audio/sets sync: svn://svn.tuxfamily.org/svnroot/proaudio/proaudio/trunk/overlays/proaudio sync_options: use_manifest: use write_cache: /var/cache/paludis/metadata Package app-text/djvu-3.5.21:0::gentoo: >>> Running ebuild phase killoldmisc as paludisbuild:paludisbuild... >>> Starting builtin_killoldmisc >>> Done builtin_killoldmisc >>> Completed ebuild phase killoldmisc >>> Running ebuild phases initmisc infovars as paludisbuild:paludisbuild... >>> Starting builtin_initmisc >>> Done builtin_initmisc >>> Starting builtin_infovars ACCEPT_KEYWORDS=x86 CBUILD=i686-pc-linux-gnu CFLAGS=-mtune=athlon -pipe -O2 -fomit-frame-pointer CHOST=i686-pc-linux-gnu CONFIG_PROTECT= CONFIG_PROTECT_MASK= CPPFLAGS= CTARGET= CXXFLAGS=-mtune=athlon -pipe -O2 -fomit-frame-pointer DISTDIR=/usr/portage/distfiles FEATURES=strict sfperms FFLAGS= GENTOO_MIRRORS= INSTALL_MASK= LANG= LC_ALL=C LDFLAGS=-Wl,-O1 LINGUAS=en en_US fr MAKEOPTS=-j1 PORTAGE_COMPRESS= PORTAGE_COMPRESS_FLAGS= PORTAGE_RSYNC_EXTRA_OPTS= PORTAGE_RSYNC_OPTS= PORTAGE_TMPDIR=/var/tmp/paludis PORTDIR=/usr/portage PORTDIR_OVERLAY= SYNC= USE=jpeg nls nsplugin qt3 threads tiff xml x86 alsa_cards_cmipci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mmap_emul alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apache2_modules_actions apache2_modules_alias apache2_modules_auth_basic apache2_modules_authn_alias apache2_modules_authn_anon apache2_modules_authn_dbm apache2_modules_authn_default apache2_modules_authn_file apache2_modules_authz_dbm apache2_modules_authz_default apache2_modules_authz_groupfile apache2_modules_authz_host apache2_modules_authz_owner apache2_modules_authz_user apache2_modules_autoindex apache2_modules_cache apache2_modules_dav apache2_modules_dav_fs apache2_modules_dav_lock apache2_modules_deflate apache2_modules_dir apache2_modules_disk_cache apache2_modules_env apache2_modules_expires apache2_modules_ext_filter apache2_modules_file_cache apache2_modules_filter apache2_modules_headers apache2_modules_include apache2_modules_info apache2_modules_log_config apache2_modules_logio apache2_modules_mem_cache apache2_modules_mime apache2_modules_mime_magic apache2_modules_negotiation apache2_modules_rewrite apache2_modules_setenvif apache2_modules_speling apache2_modules_status apache2_modules_unique_id apache2_modules_userdir apache2_modules_usertrack apache2_modules_vhost_alias elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text linguas_en linguas_en_US linguas_fr userland_GNU video_cards_fbdev video_cards_mga video_cards_vesa x86 >>> Done builtin_infovars >>> Completed ebuild phases initmisc infovars >>> Running ebuild phase tidyupmisc as paludisbuild:paludisbuild... >>> Starting builtin_tidyupmisc rm -fr /var/tmp/paludis/app-text-djvu-3.5.21-misc >>> Done builtin_tidyupmisc >>> Completed ebuild phase tidyupmisc
Thank you for report. Have you tried 3.5.21_p20090103? This bug should be solved there.
No answer. Closing as such.