2013年4月15日月曜日

Insight 6.8-1 build problem on Cygwin. ビルドできない。

Insight debugger を Cygwin でビルドしてみました。

が、 そう簡単にはビルドが通りません。

Insight のサイトにある insight-6.8-1 や insight-6.7 、そして cvs (2013/04/14時点) のものでも、Cygwin ではビルドできません。
昔は Cygwin で Insight はビルドできましたが、 今は Cygwin のソースコードはメンテナンスされていないようです。


ソースコードの手直しをして、ビルド通すことができ、使えそうな感じなので、公開しておきます。

元となっているのは cvs (2013/04/14時点) のものに対して修正を加えました。
insight-6.8-1 は、古いし、あまりお勧めしません。


ダウンロード


このパッチは Cygwin でビルドするためのものです。
パッチをあて、他の環境 (Linux) ではビルドできなくなる かも しれません。(テストしていないです)

ビルド方法 (arm クロス開発用)


ビルド方法の例です。

$ cd /home/pkg/insight-cvs20130414
$ tar xvjf insight-cvs20130414-src.tar.bz2

$ patch -p1 -d src < insight-cvs20130414-cygwin.patch

$ mkdir /home/pkg/insight-cvs20130414/.BUILD
$ cd /home/pkg/insight-cvs20130414/.BUILD
$  ../src/configure                            \
        --target=arm-none-eabi                    \
        --prefix=/usr/local/arm-none-eabi            \
        --with-mpfr                        \
        --with-gmp                       
$ make
$ make install




パッチを適用していないと、

パッチを適用していないと、Cygwin でビルドの時に、こんなエラーがでてきます。

gcc -c -g -O2 -Wall -Wconversion   -I"../../../tcl/win/../generic" -I"../../../tcl/win" -mwin32  -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_NO_SEH=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1   -DBUILD_tcl ../../../tcl/win/../generic/tclAlloc.c -o tclAlloc.o
In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/winsock2.h:56:0,
                 from ../../../tcl/win/../generic/../win/tclWinPort.h:72,
                 from ../../../tcl/win/../generic/tclPort.h:22,
                 from ../../../tcl/win/../generic/tclAlloc.c:29:
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/psdk_inc/_fd_types.h:100:2: 警告: #warning "fd_set and associated macros have been defined in sys/types.      This can cause runtime problems with W32 sockets"
In file included from ../../../tcl/win/../generic/../win/tclWinPort.h:72:0,
                 from ../../../tcl/win/../generic/tclPort.h:22,
                 from ../../../tcl/win/../generic/tclAlloc.c:29:
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/winsock2.h:986:34: error: conflicting types for ‘select’
/usr/include/sys/select.h:31:5: note: previous declaration of ‘select’ was here
Makefile:423: recipe for target `tclAlloc.o' failed
make[3]: *** [tclAlloc.o] Error 1
make[3]: ディレクトリ `/home/pkg/insight-6.8-1/.BUILD/tcl/win' から出ます
Makefile:15: recipe for target `all' failed
make[2]: *** [all] Error 2
make[2]: ディレクトリ `/home/pkg/insight-6.8-1/.BUILD/tcl' から出ます
Makefile:6631: recipe for target `all-tcl' failed
make[1]: *** [all-tcl] Error 2
make[1]: ディレクトリ `/home/pkg/insight-6.8-1/.BUILD' から出ます
Makefile:705: recipe for target `all' failed
make: *** [all] Error 2



0 件のコメント:

コメントを投稿