Skip to content

Commit

Permalink
Fix octopus binary "invalid instruction" (-march too new) (#11822)
Browse files Browse the repository at this point in the history
* This attempts to make the binary more portable by only requiring Sandybridge.

* Fix march set to native
  • Loading branch information
holtgrewe authored and epruesse committed Nov 17, 2018
1 parent 5ed598b commit 4d91d8d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions recipes/octopus/fix_march_set_to_native.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -rNu octopus-0.5.2-beta.orig/src/CMakeLists.txt octopus-0.5.2-beta/src/CMakeLists.txt
--- octopus-0.5.2-beta.orig/src/CMakeLists.txt 2018-10-29 08:36:32.000000000 -0600
+++ octopus-0.5.2-beta/src/CMakeLists.txt 2018-11-13 15:54:06.000000000 -0700
@@ -639,7 +639,7 @@
else()
add_executable(octopus main.cpp ${OCTOPUS_SOURCES} ${INCLUDE_SOURCES})
target_compile_features(octopus PRIVATE cxx_thread_local)
- target_compile_options(octopus PRIVATE -ffast-math -funroll-loops -march=native)
+ target_compile_options(octopus PRIVATE -ffast-math -funroll-loops)
target_include_directories(octopus PUBLIC ${octopus_SOURCE_DIR}/lib ${octopus_SOURCE_DIR}/src)
target_link_libraries(octopus tandem ranger)
if (NOT BUILD_SHARED_LIBS)
4 changes: 3 additions & 1 deletion recipes/octopus/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ package:
version: {{ version }}

build:
number: 0
number: 1
# Not building on osx CircleCI and unsure how to fix; does not pick
# up 7.2 compilers
skip: true # [osx]

source:
url: https://github.com/luntergroup/{{ name }}/archive/v0.5.2-beta.tar.gz
sha256: {{ sha256 }}
patches:
- fix_march_set_to_native.patch

requirements:
build:
Expand Down

0 comments on commit 4d91d8d

Please sign in to comment.