忍者ブログ

なんだか

知らないほうが幸せかもしれない

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

cygwin64であやしげなncursesのdll版ができたような

ncuesesのconfigureのoptionはこれです。
--with-libtool --with-shared --with-normal --without-debug --disable-relink --disable-rpath --with-ticlib --without-termlib --enable-ext-mouse --enable-sp-funcs --enable-reentrant --with-abi-version=10 --with-wrap-prefix=ncwrap_ --enable-sigwinch --enable-colorfgbg --enable-tcap-names --disable-termcap --disable-mixed-case --enable-symlinks --with-pkg-config --enable-pc-files --with-manpage-format=normal --with-manpage-aliases --with-default-terminfo-dir=/usr/share/terminfo --enable-echo --mandir=/usr/share/man --includedir=/usr/include/ncurses --build=x86_64-pc-cygwin

今回は、VARIABLE macroではなく、function call type でやってみました。
(ncursesの人がグローバル変数アクセスを関数化しよう?としてたようですが)

よくテストされていないあやしげな差分cygwin64-ncurses-5.9.patch

できたdllは以下のようになってます。
./lib/.libs/cygformt-5.dll
./lib/.libs/cygmenut-5.dll
./lib/.libs/cygncurses++t-5.dll
./lib/.libs/cygncursest-5.dll
./lib/.libs/cygpanelt-5.dll

gdb-7.5.50.20130304.tar.bz2で出来たncursesのdllをリンクした結果、動くgdbが出来ました。

bash-4.2$ ./gdb
GNU gdb (GDB) 7.5.50.20130304

bash-4.2$ ldd gdb.exe
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
cygexpat-1.dll => /usr/bin/cygexpat-1.dll (0x5d5bf0000)
cygncursest-5.dll => /usr/bin/cygncursest-5.dll (0x482200000)
cygz.dll => /usr/bin/cygz.dll (0x597fd0000)
       
ちなみに、vim-7.3.tar.bz2はこうなりました。一応、起動しました。

bash-4.2$ ldd ./vim
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
cygintl-8.dll => /usr/bin/cygintl-8.dll (0x5ee2d0000)
cygncursest-5.dll => /usr/bin/cygncursest-5.dll (0x482200000)

windowsで2Gの壁を破るには、関数化するのが先々、トラブルの元にならないような感じがします。


ncursesとは関係ないけど、opensslのtestが途中で止まります。

test BN_sqr
print "test BN_sqr\n"
-86E3FFFFFF * -86E3FFFFFF - 47137B0FFEF238000001
2097474FFFFFF * 2097474FFFFFF - 4262B39343D74ED1716000001
-9F9F9FFFF000000 * -9F9F9FFFF000000 - 6387AC48100C0C0001000000000000
-3FFF00005D0000FFFF * -3FFF00005D0000FFFF - FFF80012E7F46801F4902B9FF46FFFE0001
FFFFFFFFFFFF4F4FFFFF * FFFFFFFFFFFF4F4FFFFF - FFFFFFFFFFFE9E9FFFFE000079F2790161600001
Square test failed!

拍手[0回]

PR

cygwin64なgdbが待てなかった

ncursesが難航しているので、gdbに逃避しました。

bash-4.2$ gdb progs/tic.exe
GNU gdb (GDB) 7.5.1

Reading symbols from /cygwin64-temp/ncurses/cygwin64/progs/tic.exe...done.
(gdb) r
Starting program: /cygwin64-temp/ncurses/cygwin64/progs/tic.exe
[New Thread 8008.0x14b0]
warning: the debug information found in "/usr/bin/cygwin1.dbg" does not match "/usr/bin/cygwin1.dll" (CRC mismatch).

[New Thread 8008.0x5c8]

Program received signal SIGSEGV, Segmentation fault.
0x0000000100406fa3 in __fu8__nc_disable_period ()
(gdb) bt
#0 0x0000000100406fa3 in __fu8__nc_disable_period ()
#1 0x0000000000000000 in ?? ()
(gdb) q
A debugging session is active.

Inferior 1 [process 8008] will be killed.

Quit anyway? (y or n) y

_nc_disable_periodという変数でコケてるのが、gdbのおかげでわかるようになりました。

危ないかもしれない差分gdb-7.5.1-cygwin64.patch
暫定版が出たようです。gdb-7.5.50.20130304-cvs-1.x86_64.tar.xz

拍手[0回]

cygwin64でncursesのdllを使うと動かなくらしい

ncurses-5.9-1.x86_64.tar.xz
のdllを使っているvimが動いてないようです。

グルーバル変数のexportとimportがうまく出来てないのが原因のようです。
ざっと見た感じ、perlの時みたいに、簡単に対策はできなさそうです。

グルーバル変数の扱いが鬼門なwindows

P.S.
base-cygwin-toolchain-install-first-20130228-2.x86_64.tar.xz
ldが最新?になって、エラー吐いてくれるようになってました。

拍手[0回]

cygwin64でなぜか動くdllなperlができた

Any additional cc flags?
[-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector]
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -g -DUSEIMPORTLIB

-DUSEIMPORTLIB
がポイントでした。
ちゃんとソースのヘッダーに仕掛けが用意してありました。流石、息の長い言語だけあります。

$ make PERL_ARCHIVE_AFTER=-lcrypt

これで、外部参照されている変数がないとlink時に怒られるので、globals.cにその変数を追加しました。
追加分export.perl.dll

$ make test

t/op/readline .................................................

だんまりになるので、t/op/readline.tを削除

cpan/Text-Tabs/t/wrap ......................................... ok
cpan/Tie-RefHash/t/rebless .................................... ok
cpan/Tie-RefHash/t/refhash .................................... ok
cpan/Tie-RefHash/t/storable ................................... ok
cpan/Tie-RefHash/t/threaded ................................... ok
cpan/Time-HiRes/t/alarm .......................................
cpan/Time-HiRes/t/ualarm ......................................

cpan/Time-HiRes/t/alarm,cpan/Time-HiRes/t/ualarmでだんまりになるので、テスト不成功になるように変更

で、

Failed 14 tests out of 2306, 99.39% okay.
u=10.12  s=7.97  cu=696.49  cs=487.23  scripts=2306  tests=605901

こういう診断が出ました。

upstreamのperlでやっているので、extensionsに
Encode Encode/Byte Encode/CN Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode
を追加しています。

cygwin64(cygwin1.dll)の完成度、高いですね。

拍手[0回]

cygwin64のstaticなperlがやっとできた

親切な人が作ってくれたstaticなperlがcygwin1.dllのverupで動かなくなったようなので
自分で再度、ビルドに挑戦してみました。

perl-5.16.2ではなく、upstream(5.17.10)のもので試しました。

$ ./Configure

What is the file extension used for shared libraries? [dll] none

Any additional cc flags?
[-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -fstack-protector]
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -g

Build a shared libperl.none (y/n) [y] n

What extensions do you wish to include? [Win32CORE] B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate Unicode/Normalize Win32 Win32API/File XS/APItest XS/Typemap arybase attributes mro re threads threads/shared Win32CORE

-fstack-protectorを指定すると動かないようです。

$ make PERL_ARCHIVE_AFTER=-lcrypt

グローバル変数の2Gの壁?でlinkが失敗するので、globals.cにexport.perlを追加しました。

libperl.aでextensionsがdllの場合、

Undefined subroutine &Digest::MD5::md5 called at Porting/pod_lib.pl line 100.


で止まります。

拍手[0回]

カレンダー

04 2024/05 06
S M T W T F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

フリーエリア

最新CM

最新記事

(07/27)
(03/27)
(03/26)
(03/23)
(03/22)
(03/19)
(03/18)
(03/18)
(03/15)
(03/14)
(03/13)
(03/12)
(03/11)
(03/11)
(03/08)
(03/08)
(03/06)
(03/05)
(03/02)
(03/01)
(02/28)
(02/27)
(02/24)
(02/23)
(02/22)

プロフィール

HN:
kenrou
性別:
非公開

バーコード

ブログ内検索

最古記事

(12/15)
(12/16)
(12/17)
(12/18)
(12/19)
(12/20)
(12/21)
(12/22)
(12/23)
(12/24)
(12/25)
(12/26)
(12/27)
(12/28)
(12/29)
(12/30)
(12/31)
(01/01)
(01/02)
(01/21)
(01/22)
(01/23)
(01/24)
(01/24)
(01/28)

P R

忍者アナライズ

コガネモチ

忍者カウンター

カレンダー

04 2024/05 06
S M T W T F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31