build FLTK 1.1.7 with gcc 2.95.3 on Fedora7

1.configure,加上CFLAGS是避免gcc用到/usr/include
LDFLAGS="-Wl,-elf2flt=-s65535"\
CFLAGS="-I/sigma/armutils_2.8.0.2/toolchain/include"\
CXXFLAGS="-I/sigma/armutils_2.8.0.2/toolchain/include"\
./configure\
--host=arm-elf\
--prefix=/sigma/nano-x\
--with-x\
--disable-gl\
--disable-shared\
--disable-cygwin\
--x-includes=/usr/include\
--x-libraries=/sigma/nano-x/lib

2.make
CompilingFl_Help_View.cxx...
Fl_Help_View.cxx:In method `void Fl_Help_View::format()':
Fl_Help_View.cxx:1698:internal error--unrecognizable insn:
(insn7905 7902 7901 (set (reg:QI 14 lr)
(mem:QI(plus:SI (reg:SI 12 ip)
(const_int-2712 [0xfffff568])) 0)) -1 (nil)
(nil))
make[1]:*** [Fl_Help_View.o] Error 1

src/Fl_Help_View.cxx
把陣列改小即可,原來為1024
buf[512],// Text buffer
attr[512],// Attribute buffer
wattr[512],// Width attribute buffer
hattr[512],// Height attribute buffer
linkdest[512];// Link destination

3.make again
Fl_GIF_Image.cxx:In method `Fl_GIF_Image::Fl_GIF_Image(const char*)':
Fl_GIF_Image.cxx:379:internal error--unrecognizable insn:
(insn2921 2918 2917 (set (reg:QI 5 r5)
(mem:QI(plus:SI (reg:SI 2 r2)
(const_int-1916 [0xfffff884])) 0)) -1 (nil)
(nil))
make[1]:*** [Fl_GIF_Image.o] Error 1

src/Fl_GIF_Image.cxx
把下面的code移到函數外加上static
//tables used by LZW decompresser:
shortint Prefix[4096];
ucharSuffix[4096];

4.make again again
Linkingfluid...
/sigma/armutils_2.8.0.2/toolchain/arm-elf/bin/ld.real:cannot find -lXext
collect2:ld returned 1 exit status
make[1]:*** [fluid] Error 1
configure
link參數錯誤
LIBS="$LIBS-lXext -lX11 $X_EXTRA_LIBS"
==>
LIBS="$LIBS-lnx11 -lnano-X $X_EXTRA_LIBS"

5.make again again again
Generatingfast_slow.fl...
../fluid/fluid:../fluid/fluid: cannot execute binary file
make[1]:*** [fast_slow.cxx] Error 126
做出來的flarmcode 不能在x86執行是正常的.
test/Makefile相關的src拿掉不要即可.

6.make again agian agian agian
OK,success.

7.make install
===installing fluid ===
InstallingFLUID in /sigma/nano-x/bin...
arm-elf-strip:/sigma/nano-x/bin/fluid: File format not recognized
make[1]:*** [install] Error 1
strip
有問題,拿掉即可.
fluid/Makefile
$(STRIP)$(DESTDIR)$(bindir)/fluid$(EXEEXT)
==>
#$(STRIP) $(DESTDIR)$(bindir)/fluid$(EXEEXT)

8.make install again
OK,success.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值