Summary: | archivers/snappy 1.1.4 don't compile on i386, 1.1.3 compiled fine | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Vladimir Druzenko <vvd> | ||||||
Component: | Individual Port(s) | Assignee: | Vanilla I. Shu <vanilla> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Many People | CC: | vvd | ||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(vanilla) |
||||||
Version: | Latest | ||||||||
Hardware: | i386 | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Vladimir Druzenko
2017-01-28 18:32:04 UTC
11.0-RELEASE-p7 Created attachment 179380 [details]
archivers/snappy/files/patch-snappy.cc
I made a patch fixed this bug:
--- snappy.cc.orig 2017-01-27 08:12:04
+++ snappy.cc
@@ -30,7 +30,7 @@
#include "snappy-internal.h"
#include "snappy-sinksource.h"
-#if defined(__x86_64__) || defined(_M_X64)
+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__)
#include <emmintrin.h>
#endif
#include <stdio.h>
Created attachment 179416 [details]
Without any problem on my test env.
I could not reproduce this issue on my box,
Try to build on real i386 on real system - not in poudriere jail. Small test for your poudriere jail: #include <stdio.h> int main() { #ifdef __i386__ printf("__i386__\n"); #endif #if defined(__x86_64__) || defined(_M_X64) printf("__x86_64__\n"); #endif return 0; } On i386 it prints __i386__, on amd64 it prints __x86_64__, but not both on any platform. __m128i defined in emmintrin.h. I think the main reason should be "-march=prescott" it will enable SSE2 definition, but could not find m128i. everything work fine with your patch? Yes, it's -march=prescott turn on __SSE__/__SSE2__, same as pentium4, core2 and etc. And yes, everything work fine with my patch. This patch is better: --- snappy.cc.orig 2017-01-30 12:03:09 +++ snappy.cc @@ -30,7 +30,7 @@ #include "snappy-internal.h" #include "snappy-sinksource.h" -#if defined(__x86_64__) || defined(_M_X64) +#ifdef __SSE2__ #include <emmintrin.h> #endif #include <stdio.h> A commit references this bug: Author: vanilla Date: Mon Jan 30 12:49:22 UTC 2017 New revision: 432840 URL: https://svnweb.freebsd.org/changeset/ports/432840 Log: Fix building on i386 (with SSE2 enable) PR: 216553 Submitted by: vvd@unislabs.com Changes: head/archivers/snappy/files/ head/archivers/snappy/files/patch-snappy.cc Thanks. I want to report patch to upstream, but can't find any bug tracker for it at https://github.com/google/snappy In github, use "pull request" to report bug or patches to upstream. Do I need to make self fork for this? It's so stupid - make forks for 1 line patches. Ok, no bug tracker - no user patches. Yep, fork it and pull request with your patch. |