
64ビットLINUX HPCクラスタにレガシーソフトウェア(32ビット)をインストールしようとしています。 2005年に登場したかなり古いソフトウェアです。
ソフトウェアは次の場所にあります。https://www.drive5.com/pals/
オペレーティングシステムの詳細は次のとおりです。PRETTY_NAME="Ubuntu 18.04.2 LTS"
だから与えられた:
g++ -c -O3 -march=pentiumpro -mcpu=pentiumpro -funroll-loops -Winline -DNDEBUG=1 aligntraps.cpp -o aligntraps.o
g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
cc1plus: error: CPU you selected does not support x86-64 instruction set
Makefile:22: recipe for target 'aligntraps.o' failed
make: *** [aligntraps.o] Error 1
私のソフトウェアのコンパイルmakeステップが正常に完了するようにMakefile(下の表示)を変更する方法を提案できる人はいますか?
CFLAGS = -O3 -march=pentiumpro -mcpu=pentiumpro -funroll-loops -Winline -DNDEBUG=1
LDLIBS = -lm -static
# LDLIBS = -lm
OBJ = .o
EXE =
RM = rm -f
CP = cp
GPP = g++
LD = $(GPP) $(CFLAGS)
CPP = $(GPP) -c $(CFLAGS)
CC = gcc -c $(CFLAGS)
all: pals
CPPSRC = $(sort $(wildcard *.cpp))
CPPOBJ = $(subst .cpp,.o,$(CPPSRC))
$(CPPOBJ): %.o: %.cpp
$(CPP) $< -o $@
pals: $(CPPOBJ)
$(LD) -o pals $(CPPOBJ) $(LDLIBS)
答え1
注 - 質問のタイトルは「以前の32ビットソフトウェアのインストール」ですが、プログラムをデフォルトの64ビットソフトウェアとしてビルドしない特別な理由はないようです。ただし、32ビット版をビルドする必要がある場合(ベンチマーク目的または以前に公開された結果を正確に再現するために)、次の手順に従ってください。
私のシステムが64ビットUbuntu 18.04とgcc / g ++ 7であるわけではありません。
$ uname -a
Linux t400s 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ g++ --version
g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
この特別な場合、ビルドしたいソフトウェアは他のライブラリを使用していないようですlibm.a
。g++-multilib
gcc-multilib
libc6-dev-x32
CFLAGS
-m32
だから
sudo apt install g++-multilib
それから
$ head -3 Makefile
CFLAGS = -m32 -O3 -march=pentiumpro -mcpu=pentiumpro -funroll-loops -Winline -DNDEBUG=1
LDLIBS = -lm -static
# LDLIBS = -lm
$ make
いくつかの警告が表示されます。
g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
ただし、pals
プログラムは以下を構築する必要があります。
$ file pals
pals: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=1b9e369acf2aa7c6448b4132a203b8dccde16a7d, not stripped
そして走る
$ ./pals
PALS v1.0
http://www.drive5.com/pals
Written by Bob Edgar and Gene Myers.
This software is donated to the public domain.
Please visit web site for requested citation.
Usage:
pals -target <fastafile> -query <fastafile>
pals -self <fastafile>
Options:
-out <outfile> (default standard output)
-fwdonly don't align reverse strand
-filterout <file> save filter hits to file
Alignment parameters can be specified in three ways:
(1) Defaults -length 400 -pctid 94
(2) Specify -length <minhitlength> -pctid <minhitid>
(3) Specify all filter and d.p. parameters:
-wordsize Filter word size
-seedlength Seed hit length
-seeddiffs Max #diffs in seed hit
-length Min length of final hit
-pctid Min %id of final hit
-tubeoffset (Optional)
For further information, please see the User Guide.
Must specify either -self or both -target and -query
答え2
Makefileから-march=pentiumpro -mcpu=pentiumproを削除してみましたか?
これをコンパイルし、ここにあるファイルと一緒に実行して変更します。
https://molb7621.github.io/workshop/Miscellaneous/data.html
./pals -self example.fa とインポート
0 secs 1 Mb ( 0%) Reading sequence
0 secs 12 Mb ( 1%) Reading sequence done (0s).
シーケンス長3092塩基(0Mb)、4個連続
...行がたくさんあります...
0 DPヒット、合計長0、実行時間0秒、最大メモリ使用量280M