Bug 9892 - v86d fails to build on arm64 host
Summary: v86d fails to build on arm64 host
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.1
Hardware: x86 arm64
: Low enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-07-07 10:08 UTC by Ross Burton
Modified: 2017-02-23 16:53 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2016-07-07 10:08:39 UTC
When building v86d with MACHINE=qemux86 on aarch64:

 In file included from v86_lrmi.c:3:0:
| v86.h:8:20: fatal error: config.h: No such file or directory
|  #include "config.h"

It probably is assuming that its being built on x86 and failing somewhere in configure.
Comment 1 Ross Burton 2016-07-07 11:58:17 UTC
This is the v86d do_configure log:

DEBUG: Executing shell function do_configure
It looks like your architecture 'aarch64' isn't supported by this version of v86d.
Unrecognized setting x86emu.
Comment 2 Nicolas Dechesne 2016-07-13 17:01:08 UTC
looking at the configure script for v86d, it uses 'uname -m' to check for the target arch.. in other words, it doesn't cope very well with cross compilation.. 

in fact, it looks like even today building on x86 or x86-64 will yield to different results.. independently of the x86 MACHINE we are building for..  

e.g.

copt_x86emu_test()
{
	local m=`uname -m`
	if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then
		echo "n";
	elif [ "$m" = "x86_64" ]; then
		echo "y";
	else
		echo "It looks like your architecture '$m' isn't supported by this version of v86d." >&2
		exit 1
	fi
}
Comment 3 Ross Burton 2016-07-13 19:14:51 UTC
Yes, v86d's default behaviour and cross compiling is terrible and is a clear example of why autotools are great.

Luckily we bypass the autodetection logic and force-enable x86emu, so this autodetection logic just has to execute without aborting and nothing else.

Khem has already sent a patch for this, changing state.
Comment 4 Ross Burton 2017-02-23 16:53:42 UTC
Merged in oe-core 709c603dec19690bcf21034867b815b5679b921a.