Opened 5 years ago
Closed 19 months ago
#59040 closed defect (fixed)
hyperscan: don't build with -march=native by default
Reported by: | hbsimon (Horst Simon) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | phifogg (Daniel Dräs) | |
Port: | hyperscan |
Description
I have rspamd failing with illegal instruction 4 and the failure was tracked to hyperscan by rspamd support. ticket https://github.com/rspamd/rspamd/issues/3035. Reply from this ticket: I believe this should be addressed to the maintainer of Hyperscan port. Your machine has SSSE3 instructions that are necessary for Hyperscan (according to http://intel.github.io/hyperscan/dev-reference/getting_started.html#requirements), however it seems that your hyperscan wants more, probably compiled by default with -march=native and without FAT_RUNTIME option. Nonetheless, it is not an Rspamd issue. Ah, and FAT_RUNTIME is Linux only option, heh. It seems you need to recompile hyperscan for your -march=core2 case.
Can hyperscan be build with this option in macports.
Change History (6)
comment:1 Changed 5 years ago by jmroot (Joshua Root)
Port: | hyperscan added |
---|---|
Summary: | hyperscan issue with rspamd → hyperscan: don't build with -march=native by default |
comment:2 Changed 5 years ago by phifogg (Daniel Dräs)
+1 - I got the same issue on a Mid2010 Mac Mini on High Sierra. Would love to see an update here.
comment:3 Changed 5 years ago by kencu (Ken)
Complicated CMakeLists.txt.
I don't see a simple configure flag to do force a given processor so far.
Might have to just disable downloading prebuild binaries for this port for now (which would be better than downloading broken binaries).
Unless someone wants to dig in for the afternoon on another one of these complex architecture-optimizing ports and figure out how to force a processor...
comment:4 Changed 4 years ago by phifogg (Daniel Dräs)
I am actually not sure if this is a hyperscan issue, I have manually rebuilt the hyperscan binary and they seem to work fine. At least I do not get any errors starting them. Rspamd however still failes.
Using lldb I can see this error message when starting rspamd:
Process 14624 launched: '/opt/local/bin/rspamd' (x86_64) Process 14624 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x000000000024a0c9 librspamd-server.dylib`checkMode(unsigned int, hs_compile_error**) + 105 librspamd-server.dylib`checkMode: -> 0x24a0c9 <+105>: popcntl %eax, %eax 0x24a0cd <+109>: cmpl $0x1, %eax 0x24a0d0 <+112>: jne 0x24a15e ; <+254> 0x24a0d6 <+118>: movl %edi, %ecx Target 0: (rspamd) stopped.
comment:5 Changed 4 years ago by phifogg (Daniel Dräs)
Cc: | phifogg added |
---|
comment:6 Changed 19 months ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to ryandesign |
---|---|
Resolution: | → fixed |
Status: | new → closed |
The usual approach is to build for a minimum spec CPU with no variants, and have a variant called
native
that targets the build machine's CPU features.