[ebuild U ] media-sound/jack-audio-connection-kit-0.101.1-r1 [0.99.0-r1] USE="cpudetection%* mmx%* sndfile%* (-coreaudio) -doc* -netjack% -sse%" port.c: In function 'x86_3dnow_add2f': port.c:98: error: unknown register name 'mm0' in 'asm' port.c:109: error: unknown register name 'mm1' in 'asm' port.c:109: error: unknown register name 'mm0' in 'asm' port.c: In function 'x86_3dnow_copyf': port.c:135: error: unknown register name 'mm0' in 'asm' port.c:137: error: unknown register name 'mm1' in 'asm' port.c:139: error: unknown register name 'mm2' in 'asm' port.c:141: error: unknown register name 'mm3' in 'asm' port.c:143: error: unknown register name 'mm4' in 'asm' port.c:145: error: unknown register name 'mm5' in 'asm' port.c:147: error: unknown register name 'mm6' in 'asm' port.c:149: error: unknown register name 'xmm7' in 'asm' port.c:152: error: unknown register name 'mm0' in 'asm' port.c:154: error: unknown register name 'mm1' in 'asm' port.c:156: error: unknown register name 'mm2' in 'asm' port.c:158: error: unknown register name 'mm3' in 'asm' port.c:160: error: unknown register name 'mm4' in 'asm' port.c:162: error: unknown register name 'mm5' in 'asm' port.c:164: error: unknown register name 'mm6' in 'asm' port.c:166: error: unknown register name 'mm7' in 'asm' port.c:171: error: unknown register name 'mm0' in 'asm' port.c:180: error: unknown register name 'mm0' in 'asm' port.c: In function 'x86_sse_copyf': port.c:204: error: unknown register name 'xmm0' in 'asm' port.c:206: error: unknown register name 'xmm1' in 'asm' port.c:208: error: unknown register name 'xmm2' in 'asm' port.c:210: error: unknown register name 'xmm3' in 'asm' port.c:212: error: unknown register name 'xmm4' in 'asm' port.c:214: error: unknown register name 'xmm5' in 'asm' port.c:216: error: unknown register name 'xmm6' in 'asm' port.c:218: error: unknown register name 'xmm7' in 'asm' port.c:221: error: unknown register name 'xmm0' in 'asm' port.c:223: error: unknown register name 'xmm1' in 'asm' port.c:225: error: unknown register name 'xmm2' in 'asm' port.c:227: error: unknown register name 'xmm3' in 'asm' port.c:229: error: unknown register name 'xmm4' in 'asm' port.c:231: error: unknown register name 'xmm5' in 'asm' port.c:233: error: unknown register name 'xmm6' in 'asm' port.c:235: error: unknown register name 'xmm7' in 'asm' port.c:240: error: unknown register name 'xmm0' in 'asm' port.c:249: error: unknown register name 'xmm0' in 'asm' port.c: In function 'x86_sse_add2f': port.c:275: error: unknown register name 'xmm0' in 'asm' port.c:287: error: unknown register name 'xmm0' in 'asm' make[2]: *** [libjack_la-port.lo] Error 1 Portage 2.1.1 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686) ================================================================= System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) processor Gentoo Base System version 1.12.5 Last Sync: Fri, 27 Oct 2006 10:00:01 +0000 ccache version 2.3 [enabled] app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ ftp://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo" LINGUAS="" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dfx 3dnow 3dnowext X Xaw3d a52 aac aalib acpi aim alsa apache2 arts asf audacious audiofile automount bash-completion berkdb bitmap-fonts bzip2 cddb cdparanoia cdr cgi clamav cli colordiff cracklib crypt cups curl dbus djbfft dlloader dri dvd elibc_glibc encode exif festival flac font-server foomaticdb fortran freetype gaim gdbm gif gimpprint gnome gpm gs gstreamer gtk hbci icq imagemagick input_devices_evdev input_devices_joystick input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 isdnlog ivtv jabber jack java joystick jpeg jpeg2k kde kdexdeltas kernel_linux libclamav libg++ live lm_sensors logitech-mouse logrotate mikmod mmx mmxext mp3 mp4 mpeg mysql ncurses network new-login nls nptl nptlonly ofx ogg openexr opengl oss pam pcre pdf perl png postgres ppds pppd python qt qt4 quicktime quotes readline real reflection samba scanner sdl sensord session smime sndfile spl ssl syslog tcpd theora tidy tiff tk transcode truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l v4l2 vcd vhosts video_cards_tdfx vim voodoo3 vorbis win32codecs wmf xanim xine xorg xosd xprint xscreensaver xv xvid yahoo zeroconf zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
*** This bug has been marked as a duplicate of 136565 ***
Not a duplicate of 136565. Same symptom, different underlying problem. I'm attempting to build this on an Athlon Thunderbird (which supports mmx, mmxext, 3dnow, and 3dnowext, but not sse), so the fixed 0.101.1-r1 ebuild detects 3dnow and enables dynsimd, but the build still fails with the same errors. The primary underlying problem is that the code being compiled is using MMX and SSE registers without adding -mmmx and -msse to CFLAGS, hence gcc reports unknown register names. Manually adding these two flags to JACK_CFLAGS in libjack/Makefile allowed the build to complete. The secondary underlying problem is that even when the configure script is run with --disable-sse, the SSE code is still compiled.
Don't see any different problem here, the code is still broken the same way...
(In reply to comment #3) My point is that bug 136565 is marked Fixed, even though the resolution was just an ebuild modification that masks the problem on platforms that don't support 3dnow. The underlying defect is still there. Since it's an upstream issue, I've reported it via the <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1585979&group_id=39687&atid=425937">on JACK project SourceForge Tracker</a>. I've also tried both 0.101.1 and 0.102.20 downloaded directly from SF, and confirmed the same problem in both.
Created attachment 100935 [details, diff] Patches configure.ac to force enabling mmx and sse when dynsimd is enabled. Also ensures MMX and SSE flags will be included even if --enable-optimize is not used. This patch fixed the problem for me. It alters configure.ac to force enabling MMX and SSE CFLAGS if dynsimd is enabled, and ensures that the flags are used even if --enable-optimize is not given to configure.
If you're aiming for a real solution then create a patch to port.c encapsulating 3dnow asm instructions with a processor test.
(In reply to comment #6) It's in there already: void jack_port_set_funcs () { if (ARCH_X86_HAVE_SSE2(cpu_type)) { opt_copy = x86_sse_copyf; opt_mix = x86_sse_add2f; } else if (ARCH_X86_HAVE_3DNOW(cpu_type)) { opt_copy = x86_3dnow_copyf; opt_mix = x86_3dnow_add2f; } else { opt_copy = gen_copyf; opt_mix = gen_mixf; } } ...with supporting functions have_3dnow() and have_sse() in client.c, and ARCH_X86_* macros in intsimd.h. The 3dnow, SSE, or generic implementations are selected at runtime based on detected CPU capabilities, which is the whole point of the dynsimd feature. The problem I'm reporting is that when dynsimd is enabled, gcc is not informed that it will be seeing MMX and SSE assembly, so of course it fails _during compilation_ when it sees the mm* and xmm* registers. This really is just a build issue. The detection code is already there. Please let me know if I'm missing something.
You are right. What I meant is to encapsulate the calls with macros so that during build time gcc won't get to 3dnow instructions if the architecture is not amd (and that should be backed by a processor test in the configure scripts...)
Basically changing the configure script is just the same as doing it in the ebuild. I've changed the ebuild to test for mmx and sse as well, and add -mmmx and -msse (and also -m3dnow...). Another thing I've hit is that without -O2, gcc (4.1.1) won't compile it, so I added this flag as well. in CVS.