RWilton / Arioc

Arioc: GPU-accelerated DNA short-read alignment
BSD 3-Clause "New" or "Revised" License
59 stars 8 forks source link

Makefile in linux source for powerpc machine could not work correctly #6

Closed songdongmei closed 5 years ago

songdongmei commented 5 years ago

In the makefile in Linux source, there is a condition sentence to see whether it work on X86 or PowerPC architecture.

TARGET_ARCH := $(shell $(GPP) -dumpmachine)
# ppc64
ifneq (,$(findstring ppc64,$(TARGET_ARCH)))
......

I met some trouble when I run "make", so I looked the makefile and found above sentence. I checked this by running "g++ -dumpmachine" in os shell, output was like this:

root@ubuntu:/home/songdm/Arioc/src# g++ -dumpmachine
powerpc64le-linux-gnu
root@ubuntu:/home/songdm/Arioc/src#

I noticed it returned "powerpc64...." instead of "ppc64". I changed ppc64 to powerpc64 in makefile and re-make, then it worked correctly. My os is Ubuntu 16.4. I also tested this command in Redhat 7.5, it returned "ppc64le-linux-gnu". So I think the condition sentence should include the both two conditions. Or use "uname -m" command to get machine type, it always return "ppc64" or "ppc64le" for PowerPC machine, regardless any os distro.

RWilton commented 5 years ago

Thanks for the information about how g++ -dumpmachine works under Ubuntu. Your suggestion to use uname -m rather than g++ -dumpmachine will probably do no harm, and if it returns the same results with a wider choice of Linuxen, so much the better.

Unfortunately, there's no standardization for the output of these commands. In addition, folks can (and do) install executables and include files in directories other than the "usual" ones. So a bit of makefile editing is probably unavoidable.

Thank you again for your suggestion and for your interest in the Arioc software.