Summary: | jack-audio-connection-kit-0.101.1-r1 ebuild fails in compilation of port.c due to unknown register names | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Brett T. Warden <bwarden+gentoo+bugzilla> |
Component: | New packages | Assignee: | Eldad Zack (RETIRED) <eldad> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 2006.1 | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | 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. |
Description
Brett T. Warden
2006-10-27 09:45:01 UTC
*** 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. |