Tanu Kaskinen
2015-Jul-06 14:35 UTC
[Speex-dev] Compilation failure in resample_neon.h on aarch64
Hi all, I'm updating OpenEmbedded-core's speexdsp from 1.2rc1 (when it still was a part of the speex source tree) to 1.2rc3. I found out that building the new version for aarch64 fails in resample_neon.h (the target machine is OE-core's default qemuarm64 target). This is the error message: .../speexdsp-1.2rc3/libspeexdsp/resample_neon.h:148:5: error: impossible constraint in 'asm' asm volatile (" cmp %[len], #0\n" ^ I haven't dealt with assembly code enough to be able to decipher the error message. Does anyone have ideas how to fix this, or have further debugging advice? For the time being I'll resort to using --disable-neon when building for aarch64, that allows the build to succeed. I don't know for sure that this is aarch64 specific, because it seems that OE-core's 32-bit qemuarm target doesn't have NEON support available, so I haven't tested building for NEON-enabled 32-bit ARM. (Jyri, in case you wonder, I put you in CC since you're the author of the failing code. The commit is from 2011, though, so you might not remember anything about it :) -- Tanu
On Mon, Jul 06, 2015 at 05:35:51PM +0300, Tanu Kaskinen wrote:> Hi all, > > I'm updating OpenEmbedded-core's speexdsp from 1.2rc1 (when it still was > a part of the speex source tree) to 1.2rc3. I found out that building > the new version for aarch64 fails in resample_neon.h (the target machine > is OE-core's default qemuarm64 target). This is the error message: > > .../speexdsp-1.2rc3/libspeexdsp/resample_neon.h:148:5: error: impossible constraint in 'asm' > asm volatile (" cmp %[len], #0\n" > ^ > > I haven't dealt with assembly code enough to be able to decipher the > error message. Does anyone have ideas how to fix this, or have further > debugging advice? For the time being I'll resort to using --disable-neon > when building for aarch64, that allows the build to succeed. > > I don't know for sure that this is aarch64 specific, because it seems > that OE-core's 32-bit qemuarm target doesn't have NEON support > available, so I haven't tested building for NEON-enabled 32-bit ARM. > > (Jyri, in case you wonder, I put you in CC since you're the author of > the failing code. The commit is from 2011, though, so you might not > remember anything about it :)It's possibly complaining about the 'l' constraints, which might not be valid for aarch64. I think pretty much all of the ARM asm we have here needs to be reworked for aarch64 still. We had to disable it for the Debian port to that platform, and there were a few promises by people to look at fixing that but I'm not aware of any patches emerging yet. Ron
Tanu Kaskinen
2015-Jul-07 14:43 UTC
[Speex-dev] Compilation failure in resample_neon.h on aarch64
On Tue, 2015-07-07 at 18:40 +0930, Ron wrote:> On Mon, Jul 06, 2015 at 05:35:51PM +0300, Tanu Kaskinen wrote: > > Hi all, > > > > I'm updating OpenEmbedded-core's speexdsp from 1.2rc1 (when it still was > > a part of the speex source tree) to 1.2rc3. I found out that building > > the new version for aarch64 fails in resample_neon.h (the target machine > > is OE-core's default qemuarm64 target). This is the error message: > > > > .../speexdsp-1.2rc3/libspeexdsp/resample_neon.h:148:5: error: impossible constraint in 'asm' > > asm volatile (" cmp %[len], #0\n" > > ^ > > > > I haven't dealt with assembly code enough to be able to decipher the > > error message. Does anyone have ideas how to fix this, or have further > > debugging advice? For the time being I'll resort to using --disable-neon > > when building for aarch64, that allows the build to succeed. > > > > I don't know for sure that this is aarch64 specific, because it seems > > that OE-core's 32-bit qemuarm target doesn't have NEON support > > available, so I haven't tested building for NEON-enabled 32-bit ARM. > > > > (Jyri, in case you wonder, I put you in CC since you're the author of > > the failing code. The commit is from 2011, though, so you might not > > remember anything about it :) > > It's possibly complaining about the 'l' constraints, which might not be > valid for aarch64. I think pretty much all of the ARM asm we have here > needs to be reworked for aarch64 still. We had to disable it for the > Debian port to that platform, and there were a few promises by people > to look at fixing that but I'm not aware of any patches emerging yet.Thanks for the tip about the "l" constraints. I'll join the crowd of people who will maybe some day look deeper into this. -- Tanu