Re: [問題] MapleBBS install.sh問題

看板FreeBSD作者時間16年前 (2009/10/13 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
感謝gaod大神的解答m(_ _)m 解決了一個問題了QQ 可是還剩下兩個Error 我試著也把其他資料夾加上 fPIC...就變成下面這樣了... 可以順便問一下為什麼要加上 -fPIC嗎= =a? 感激不盡>///< ranlib libdao.a gcc -o bguard bguard.c -DBSD44 -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -s -L../lib -ldao -lcrypt gcc -o bhttpd bhttpd.c -DBSD44 -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -s -L../lib -ldao -lcrypt gcc -o bmtad bmtad.c -DBSD44 -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -s -L../lib -ldao -lcrypt gcc -o bnntpd bnntpd.c -DBSD44 -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -s -L../lib -ldao -lcrypt gcc -o bpop3d bpop3d.c -DBSD44 -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -s -L../lib -ldao -lcrypt gcc -o gemd gemd.c -DBSD44 -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -s -L../lib -ldao -lcrypt gcc -o xchatd xchatd.c -DBSD44 -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -s -L../lib -ldao -lcrypt gcc -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -c channel.c gcc -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -c bbslib.c gcc -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -c convcode.c gcc -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -c inntobbs.c gcc -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -c rec_article.c gcc -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -c nocem.c gcc -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -c history.c gcc -o innbbsd channel.o bbslib.o convcode.o inntobbs.o rec_article.o nocem.o history.o -s -L../lib -ldao gcc -O2 -pipe -I../include -fPIC -fomit-frame-pointer -Wunused -c bbslink.c gcc -o bbslink bbslink.o bbslib.o convcode.o inntobbs.o rec_article.o nocem.o history.o -s -L../lib -ldao make: cannot open PIC. *** Error code 2 Stop in /home/bbs/src/maple. *** Error code 1 Stop in /home/bbs/src. /home/bbs/bin/install.sh: bin/bbsd: not found /home/bbs/bin/install.sh: bin/camera: not found /home/bbs/bin/install.sh: bin/account: not found Trying 0.0.0.0... telnet: connect to address 0.0.0.0: Connection refused telnet: Unable to connect to remote host ※ 引述《gaod.bbs@bbs.hychen.org (My life is full of chia)》之銘言: > src/lib/Makefile: > src/so/Makefile: > src/game/Makefile > src/pip/Makefile > 這幾個檔案裡面,在 CFLAGS 參數處加上 -fPIC > 例如 > src/lib/Makefile: > CFLAGS = -O2 -s -pipe -fomit-frame-pointer -Wunused -I../include -fPIC > src/so/Makefile: > freebsd: > @$(MAKE) CC=gcc CFLAGS="-DBSD44 -O2 -pipe -fomit-frame-pointer \ > -Wunused -I../include -fPIC" $(SO) > 然後重跑一次 install.sh 應該就可以了:p > ※ 引述《tonytonyjan.bbs@bbs.cs.nctu.edu.tw (南洋大兜蟲)》之銘言: > > xover.c:846: warning: cast from pointer to integer of different size > > gcc -DBSD44 -O2 -pipe -fomit-frame-pointer -Wunused -I../include -c xpost.c > > gcc -o bbsd acct.o bbsd.o bmw.o board.o cache.o edit.o favor.o gem.o mail.o menu.o more.o pal.o post.o talk.o ulist.o user.o visio.o window.o xover.o xpost.o -s -L../lib -ldao -lcrypt -export-dynamic > > gcc -DBSD44 -O2 -pipe -fomit-frame-pointer -Wunused -I../include -c admutil.c > > ld -s -G admutil.o -o admutil.so -L../lib -ldao > > ld: admutil.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC > > admutil.o: could not read symbols: Bad value > > *** Error code 1 > > Stop in /home/bbs/src/so. > > *** Error code 1 > > Stop in /home/bbs/src/so. > > *** Error code 1 > > Stop in /home/bbs/src. > > /home/bbs/bin/install.sh: bin/bbsd: not found > > /home/bbs/bin/install.sh: bin/camera: not found > > /home/bbs/bin/install.sh: bin/account: not found > > Trying 0.0.0.0... > > telnet: connect to address 0.0.0.0: Connection refused > > telnet: Unable to connect to remote host > > 我在i386沒有這個問題 > > 而在另一台amd64的機器裝的時候出現以上的錯誤 > > 請問有什麼可以解決的辦法呢= =a > > 是不是要用特別的編譯方式? > > 我的版本: > > FreeBSD CSsula.dorm8.nctu.edu.tw 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Wed Oct 7 08:03:18 CST 2009 root@CSsula.dorm8.nctu.edu.tw:/usr/obj/usr/src/sys/SABSD amd64 SABSD -- ※ Origin: 交大次世代(bs2.to) ◆ From: bsd2.cs.nctu.edu.tw
文章代碼(AID): #1AqsxfJn (FreeBSD)
文章代碼(AID): #1AqsxfJn (FreeBSD)