Open espenhgn opened 1 year ago
Hi again, just to add a bit more context. I'm trying to provide a cross-platform solution for PRSice2 etc. including M1 Macs via Docker (arm64-based architecture). I could get the compilation to work now on this rocker/r-ver:4.3.1
base image (based on Ubuntu 22.04 LTS) on a x86_64
host machine by removing #include <sys/sysctl.h>
and replacing #include <Eigen/Dense>
by #include <eigen3/Eigen/Dense>
across inc/*.h
files, but still encountered an issue that I couldn't resolve with the arm64
based platform in a Plink derived file:
77.35 [ 36%] Building CXX object src/CMakeFiles/plink.dir/plink_common.cpp.o
77.43 In file included from /tmp/PRSice-2.3.5/src/plink_common.cpp:18:
77.43 /tmp/PRSice-2.3.5/lib/plink_common.hpp:160:2: error: #error "64-bit builds currently require SSE2. Try producing a 32-bit build instead."
77.43 160 | #error \
77.43 | ^~~~~
77.43 /tmp/PRSice-2.3.5/lib/plink_common.hpp:163:10: fatal error: emmintrin.h: No such file or directory
77.43 163 | #include <emmintrin.h>
77.43 | ^~~~~~~~~~~~~
77.43 compilation terminated.
77.43 make[2]: *** [src/CMakeFiles/plink.dir/build.make:76: src/CMakeFiles/plink.dir/plink_common.cpp.o] Error 1
77.43 make[1]: *** [CMakeFiles/Makefile2:191: src/CMakeFiles/plink.dir/all] Error 2
77.43 make: *** [Makefile:91: all] Error 2
(similar to an older version of https://github.com/chrchang/plink-ng/blob/master/1.9/plink_common.h I presume)
Do you think it is feasible to provide better "official" support on M1/arm64-based architectures, as well as more recent OS such as Ubuntu 22.04 (LTS)?
fyi, recent plink 1.9 builds use the SIMDe library (https://github.com/simd-everywhere/simde ) to support ARM builds; see lines 190-195 of the current plink_common.h .
Describe the bug Dear @choishingwan. The deprecated
sys/sysctl.h
is used in a few places across the PRSice codes, preventing compilation of the project.Error Log Compilation error running
make
:To Reproduce
Try build the following
Dockerfile
(some work in progress virtual machine, based on Ubuntu jammy (22.04LTS):issuing:
docker build -t prsice2 -f Dockerfile .