meineko’s blog

元つくばの某独立行政法人勤務の植物屋です。最近は、ほぼ、突発天体の話題です。

geobary

ふと思い立って、Katさんの作られたJDからBJDにするgeobaryをUbuntuでcompileしようとしたら、エラーが出ます。

/DBVS2000_32$ gcc -m32 -o geobary geobary.c de405.c dbvs.a tree.a -lm
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(getalpr.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(getdltr.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(getobjps.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(getsbuf.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(opensdro.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(pr502000.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(d2.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(fgetsbuf.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(getdbval.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(getsysfn.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `dbvs.a(copysbuf.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(closedb.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(deleol.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(nextkey.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(opendbro.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(ptorec.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(savefcb.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(srcdown.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(cachflsh.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(chkfcb.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(cpykey.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(dbname.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(dsearch.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(getfcbro.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(getpage.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(gtcacmem.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(leastkey.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(listcach.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(loadpage.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(savepage.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(viewpage.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(wrtarray.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(allocach.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `tree.a(errexit.o)' is incompatible with i386 output
collect2: ld はステータス 1 で終了しました

どうも、linkしようとしているdbvs.aやtree.aが32bitなのを怒られているようです。
なので、-m32オプションをつけてコンパイルしようとしたのですが、32bitのライブラリーがデフォルトでは入っていないらしく、調べてもよく判らないのでお手上げでした。


(追記)
DE405自体は動いたので、DE405をRから呼んで計算する?