Re: 3.4.2 fails to compile on non-x86 architectures

Jean-Louis Martineau <[email protected]>
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
Jason,

An empty get_sse42 function (returning 0) should fix the issue.
Can you try it?

Jean-Louis

On 31/01/17 01:23 PM, Jason L Tibbitts III wrote:
> Just a note that 3.4.1 was OK, but 3.4.2 fails to build on all of
> Fedora's non x86 architectures: ppc64, ppc64le, aarch64 and armv7hl:
>
> https://koji.fedoraproject.org/koji/taskinfo?taskID=17528373
>
> A sample build log (from ppc64) is at
> https://kojipkgs.fedoraproject.org//work/tasks/8377/17528377/build.log
>
> The failure is down in the link phase, with multiple instances of:
>
> ./.libs/libamanda.so: undefined reference to `get_sse42'
>
> This commit appears to be the cuplrit:
>
> https://github.com/zmanda/amanda/commit/8e08855b9edb841ff30b5f7e137529cfc95899d3#diff-552be1e0690d6f1201be6fa10621fa77L2119
>
> A member of the Fedora alternative arch team offered to have a go; he
> suggested that providing an empty have_sse42() function on non-x86 would
> do the trick, and even though I rather suck at C I may have a try at
> fixing this if I can find a few minutes.
>
>   - J<
get_sse42.diff (text/x-patch, 330 B)
diff --git a/common-src/amutil.c b/common-src/amutil.c
index 864d78f..25d9fca 100644
--- a/common-src/amutil.c
+++ b/common-src/amutil.c
@@ -2096,6 +2096,11 @@ static int get_sse42(void)
 #endif
     return (ecx >> 20) & 1;
 }
+#else
+static int get_sse42(void)
+{
+    return 0;
+}
 #endif
 
 static uint32_t crc_table[16][256];
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.