<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AWX &#8211; Made For Cloud</title>
	<atom:link href="https://madeforcloud.com/category/awx/feed/" rel="self" type="application/rss+xml" />
	<link>https://madeforcloud.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sat, 27 Jan 2024 00:10:42 +0000</lastBuildDate>
	<language>en-AU</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>Fatal glibc error: CPU does not support x86-64-v2</title>
		<link>https://madeforcloud.com/2024/01/27/fatal-glibc-error-cpu-does-not-support-x86-64-v2/</link>
					<comments>https://madeforcloud.com/2024/01/27/fatal-glibc-error-cpu-does-not-support-x86-64-v2/#respond</comments>
		
		<dc:creator><![CDATA[gocallag]]></dc:creator>
		<pubDate>Sat, 27 Jan 2024 00:10:42 +0000</pubDate>
				<category><![CDATA[Ansible]]></category>
		<category><![CDATA[AWX]]></category>
		<category><![CDATA[Red Hat]]></category>
		<guid isPermaLink="false">https://madeforcloud.com/?p=163</guid>

					<description><![CDATA[I&#8217;m just writing this down in case anyone has a similar issue. As per Building Red Hat Enterprise Linux 9 for the x86-64-v2 microarchitecture level &#124; Red Hat Developer, back in 2020, AMD, Intel, Red Hat, and SUSE collaborated to define three x86-64 microarchitecture levels on top of the x86-64 baseline. The three microarchitectures group together CPU&#8230;<p><a class="more-link" href="https://madeforcloud.com/2024/01/27/fatal-glibc-error-cpu-does-not-support-x86-64-v2/" title="Continue reading &#8216;Fatal glibc error: CPU does not support x86-64-v2&#8217;">Continue reading <span class="meta-nav">&#8594;</span></a></p>]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;m just writing this down in case anyone has a similar issue.</p>



<p>As per <a href="https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level">Building Red Hat Enterprise Linux 9 for the x86-64-v2 microarchitecture level | Red Hat Developer</a>, back in 2020, AMD, Intel, Red Hat, and SUSE <a href="https://lists.llvm.org/pipermail/llvm-dev/2020-July/143289.html">collaborated</a> to define three x86-64 microarchitecture levels on top of the x86-64 baseline. The three microarchitectures group together CPU features roughly based on hardware release dates:</p>



<ul class="wp-block-list">
<li><strong>x86-64-v2</strong>&nbsp;brings support (among other things) for vector instructions up to Streaming SIMD Extensions 4.2 (SSE4.2)&nbsp; and Supplemental Streaming SIMD Extensions 3 (SSSE3), the POPCNT instruction (useful for data analysis and bit-fiddling in some data structures), and CMPXCHG16B (a two-word compare-and-swap instruction useful for concurrent algorithms).</li>



<li><strong>x86-64-v3</strong>&nbsp;adds vector instructions up to AVX2, MOVBE (for big-endian data access), and additional bit-manipulation instructions.</li>



<li><strong>x86-64-v4</strong>&nbsp;includes vector instructions from some of the AVX-512 variants.</li>
</ul>



<p>This is a great idea and goal except when you have perfectly good old hardware that, while end-of-life is still working and you find it doesn&#8217;t support the new compile target.</p>



<p>This nice little awk script from the fine folks over at <a href="https://unix.stackexchange.com/questions/631217/how-do-i-check-if-my-cpu-supports-x86-64-v2">stackexchange</a> will show you what microarchitecture your cpu supports by looking at the /proc/cpuinfo flags. I&#8217;ve included a local copy here and as you can see it&#8217;s pretty simple.</p>



<pre class="wp-block-code"><code>#!/usr/bin/awk -f

BEGIN {
    while (!/flags/) if (getline &lt; "/proc/cpuinfo" != 1) exit 1
    if (/lm/&amp;&amp;/cmov/&amp;&amp;/cx8/&amp;&amp;/fpu/&amp;&amp;/fxsr/&amp;&amp;/mmx/&amp;&amp;/syscall/&amp;&amp;/sse2/) level = 1
    if (level == 1 &amp;&amp; /cx16/&amp;&amp;/lahf/&amp;&amp;/popcnt/&amp;&amp;/sse4_1/&amp;&amp;/sse4_2/&amp;&amp;/ssse3/) level = 2
    if (level == 2 &amp;&amp; /avx/&amp;&amp;/avx2/&amp;&amp;/bmi1/&amp;&amp;/bmi2/&amp;&amp;/f16c/&amp;&amp;/fma/&amp;&amp;/abm/&amp;&amp;/movbe/&amp;&amp;/xsave/) level = 3
    if (level == 3 &amp;&amp; /avx512f/&amp;&amp;/avx512bw/&amp;&amp;/avx512cd/&amp;&amp;/avx512dq/&amp;&amp;/avx512vl/) level = 4
    if (level > 0) { print "CPU supports x86-64-v" level; exit level + 1 }
    exit 1
}</code></pre>



<p>Running the awk script on my test system reveals :</p>



<pre class="wp-block-code"><code>$ ./testarch.awk
CPU supports x86-64-v1</code></pre>



<p>The implications of this are annoying for me. I was trying to get <a href="https://github.com/ansible/awx">awx </a>to work on my little play system, but as the awx container is based on centos9 and compiled requiring at least x86-64-v2 then the awx container just wont start &#8211; yes I know there is more to awx than just this container, but it highlights the point nicely in the following command.</p>



<pre class="wp-block-code"><code>$ docker run --rm  ghcr.io/ansible/awx:latest
Fatal glibc error: CPU does not support x86-64-v2</code></pre>



<p>This seems to have started somewhere after <a href="https://github.com/ansible/awx/issues/11879">awx release 19.5.0</a> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://madeforcloud.com/2024/01/27/fatal-glibc-error-cpu-does-not-support-x86-64-v2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
