* [PATCH] sanity: removed broken compiler check
@ 2016-11-16 11:39 Enrico Scholz
2016-11-22 3:22 ` Christopher Larson
0 siblings, 1 reply; 8+ messages in thread
From: Enrico Scholz @ 2016-11-16 11:39 UTC (permalink / raw)
To: openembedded-core; +Cc: Enrico Scholz
From: Enrico Scholz <enrico.scholz@ensc.de>
The compiler check is broken because it checks for the existance of
${CC} as a file. This fails with ccache with
| Please install the following missing utilities: C Compiler (ccache
gcc ),C++ Compiler (ccache g++ )
Remove this check for now.
Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
---
meta/classes/sanity.bbclass | 6 ------
1 file changed, 6 deletions(-)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 7388da6..46f54df 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -669,12 +669,6 @@ def check_sanity_version_change(status, d):
if not check_app_exists("${MAKE}", d):
missing = missing + "GNU make,"
- if not check_app_exists('${BUILD_CC}', d):
- missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC", True)
-
- if not check_app_exists('${BUILD_CXX}', d):
- missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX", True)
-
required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES', True)
for util in required_utilities.split():
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] sanity: removed broken compiler check
2016-11-16 11:39 [PATCH] sanity: removed broken compiler check Enrico Scholz
@ 2016-11-22 3:22 ` Christopher Larson
2016-11-22 11:11 ` Enrico Scholz
2016-11-22 11:42 ` Burton, Ross
0 siblings, 2 replies; 8+ messages in thread
From: Christopher Larson @ 2016-11-22 3:22 UTC (permalink / raw)
To: Enrico Scholz
Cc: Enrico Scholz, Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]
On Wed, Nov 16, 2016 at 4:39 AM, Enrico Scholz <
enrico.scholz@sigma-chemnitz.de> wrote:
> From: Enrico Scholz <enrico.scholz@ensc.de>
>
> The compiler check is broken because it checks for the existance of
> ${CC} as a file. This fails with ccache with
>
> | Please install the following missing utilities: C Compiler (ccache
> gcc ),C++ Compiler (ccache g++ )
>
> Remove this check for now.
>
> Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
> ---
> meta/classes/sanity.bbclass | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 7388da6..46f54df 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -669,12 +669,6 @@ def check_sanity_version_change(status, d):
> if not check_app_exists("${MAKE}", d):
> missing = missing + "GNU make,"
>
> - if not check_app_exists('${BUILD_CC}', d):
> - missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC",
> True)
> -
> - if not check_app_exists('${BUILD_CXX}', d):
> - missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX",
> True)
> -
>
Is there a reason check_app_exists() wasn’t fixed to handle symlinks
instead?
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 2130 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] sanity: removed broken compiler check
2016-11-22 3:22 ` Christopher Larson
@ 2016-11-22 11:11 ` Enrico Scholz
2016-11-22 11:42 ` Burton, Ross
1 sibling, 0 replies; 8+ messages in thread
From: Enrico Scholz @ 2016-11-22 11:11 UTC (permalink / raw)
To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer
Christopher Larson <clarson@kergoth.com> writes:
>> | Please install the following missing utilities: C Compiler (ccache gcc ),C++ Compiler (ccache g++ )
>>
>> Remove this check for now.
>> [...]
>> +++ b/meta/classes/sanity.bbclass
>> [...]
>> - if not check_app_exists('${BUILD_CC}', d):
>> - missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC", True)
>> -
>> - if not check_app_exists('${BUILD_CXX}', d):
>> - missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX", True)
>> -
>>
>
> Is there a reason check_app_exists() wasn’t fixed to handle symlinks
> instead?
This will not help. 'check_app_exist()' checks for the existence of a
file (e.g. like 'test -x "${BUILD_CC}"' with iterating $PATH). But
'ccache gcc' is not a single file but a chain of files.
A more reliable method would be to call the program with '--version' or
so and check the exit code.
But gcc and g++ are elementary tools which are existing very likely on
every developers machine and which will not introduce silent and difficulty
to detect breakage. So I removed the check for now instead to implement
the method above.
Enrico
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] sanity: removed broken compiler check
2016-11-22 3:22 ` Christopher Larson
2016-11-22 11:11 ` Enrico Scholz
@ 2016-11-22 11:42 ` Burton, Ross
2016-11-22 12:01 ` Enrico Scholz
1 sibling, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2016-11-22 11:42 UTC (permalink / raw)
To: Christopher Larson
Cc: Enrico Scholz, Enrico Scholz,
Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
On 22 November 2016 at 03:22, Christopher Larson <clarson@kergoth.com>
wrote:
> Is there a reason check_app_exists() wasn’t fixed to handle symlinks
> instead?
>
Agreed, the check should handle splitting the argument and links, instead
of removing a key sanity check.
Ross
[-- Attachment #2: Type: text/html, Size: 721 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sanity: removed broken compiler check
2016-11-22 11:42 ` Burton, Ross
@ 2016-11-22 12:01 ` Enrico Scholz
2016-11-22 12:11 ` Burton, Ross
0 siblings, 1 reply; 8+ messages in thread
From: Enrico Scholz @ 2016-11-22 12:01 UTC (permalink / raw)
To: Burton, Ross
Cc: Christopher Larson,
Patches and discussions about the oe-core layer
"Burton, Ross" <ross.burton@intel.com> writes:
>> Is there a reason check_app_exists() wasn’t fixed to handle symlinks
>> instead?
>
> Agreed, the check should handle splitting the argument and links, instead
> of removing a key sanity check.
Is this check really so useful? gcc + g++ are elementary tools which can
be expected.
The check is just broken and there is no workaround (except crafting
'conf/sanity_info' manually).
Enrico
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sanity: removed broken compiler check
2016-11-22 12:01 ` Enrico Scholz
@ 2016-11-22 12:11 ` Burton, Ross
2016-11-22 12:16 ` Enrico Scholz
0 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2016-11-22 12:11 UTC (permalink / raw)
To: Enrico Scholz
Cc: Christopher Larson,
Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
On 22 November 2016 at 12:01, Enrico Scholz <enrico.scholz@sigma-chemnitz.de
> wrote:
> Is this check really so useful? gcc + g++ are elementary tools which can
> be expected.
>
But they're not if BUILD_CC is overridden. For example if the host gcc is
actually too old/new for OE to work and BUILD_CC has been set to point at a
different compiler.
Ross
[-- Attachment #2: Type: text/html, Size: 790 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sanity: removed broken compiler check
2016-11-22 12:11 ` Burton, Ross
@ 2016-11-22 12:16 ` Enrico Scholz
2016-11-22 20:33 ` Andre McCurdy
0 siblings, 1 reply; 8+ messages in thread
From: Enrico Scholz @ 2016-11-22 12:16 UTC (permalink / raw)
To: Burton, Ross
Cc: Christopher Larson,
Patches and discussions about the oe-core layer
"Burton, Ross" <ross.burton@intel.com> writes:
>> Is this check really so useful? gcc + g++ are elementary tools which can
>> be expected.
>
> But they're not if BUILD_CC is overridden. For example if the host gcc is
> actually too old/new for OE to work and BUILD_CC has been set to point at a
> different compiler.
then, you will see a '<your-gcc>: command not found' very early in the
build and every developer knows that '<your-gcc>' could not be found.
When a misconfiguration is difficulty to detect or causes hidden breakage,
sanity checks are important.
But in this case, the check causes much more harm than it tries to solve
(it will trigger e.g. for 'gcc -m32' too).
Enrico
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sanity: removed broken compiler check
2016-11-22 12:16 ` Enrico Scholz
@ 2016-11-22 20:33 ` Andre McCurdy
0 siblings, 0 replies; 8+ messages in thread
From: Andre McCurdy @ 2016-11-22 20:33 UTC (permalink / raw)
To: Enrico Scholz
Cc: Christopher Larson,
Patches and discussions about the oe-core layer
On Tue, Nov 22, 2016 at 4:16 AM, Enrico Scholz
<enrico.scholz@sigma-chemnitz.de> wrote:
> "Burton, Ross" <ross.burton@intel.com> writes:
>
>>> Is this check really so useful? gcc + g++ are elementary tools which can
>>> be expected.
>>
>> But they're not if BUILD_CC is overridden. For example if the host gcc is
>> actually too old/new for OE to work and BUILD_CC has been set to point at a
>> different compiler.
>
> then, you will see a '<your-gcc>: command not found' very early in the
> build and every developer knows that '<your-gcc>' could not be found.
>
> When a misconfiguration is difficulty to detect or causes hidden breakage,
> sanity checks are important.
>
> But in this case, the check causes much more harm than it tries to solve
> (it will trigger e.g. for 'gcc -m32' too).
The existing check_gcc_march() sanity test can already do a much
better job of verifying BUILD_CC than check_app_exists(). If
check_gcc_march() could be generalised (e.g. renamed check_gcc() and
updated to always confirm that BUILD_CC can successfully compile
something) then the check_app_exists() test could be safely removed.
> Enrico
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-11-22 20:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 11:39 [PATCH] sanity: removed broken compiler check Enrico Scholz
2016-11-22 3:22 ` Christopher Larson
2016-11-22 11:11 ` Enrico Scholz
2016-11-22 11:42 ` Burton, Ross
2016-11-22 12:01 ` Enrico Scholz
2016-11-22 12:11 ` Burton, Ross
2016-11-22 12:16 ` Enrico Scholz
2016-11-22 20:33 ` Andre McCurdy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox