写真集

Camera:Panasonic LUMIX DMC-LX3
Vine Linux と Ubuntu の設定方法など

Interix 6.1 pkgsrc mysql-5.1.54 をビルドしてみました

2011-02-12 01:35:27 | Interix6.1

$ env MYSQL_SER=mysql MYSQL_GROUP=mysqlgrp bmake 2>&1 | tee mysql51.make.txt

bash もなぜかビルドされるのですが、configre のスクリプトが動いているうちに下記のソースを変更しました。
Subsystem for UNIX-based Applications にて bash4.1.9 を make してみました 
なにもしないとたぶん、エラーになりるのかな、と思ったのですが、
pkgsrcの場合は、予めgettextのライブラリ(gettext-lib-0.14.6 libintl)を入れて使用するのでエラーにならないのですね。

でも、パッチが当たってないので、バージョンが4.1.0のままですね。


mysql-5.1.54 server でエラーが出てしまいました。


gcc -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -I../sql  -Dunix -I/usr/pkg/include -I/usr/include  -D_ALL_SOURCE -O -DUSE_OLD_FUNCTIONS -I/usr/pkg/include -I/usr/include   -c comp_err.c
gmake[2]: *** No rule to make target `../mysys/libmysys.a', needed by `comp_err'.  Stop.
gmake[2]: Leaving directory `/usr/pkgsrc/databases/mysql51-client/work/mysql-5.1.54/extra'
gmake[1]: *** [../include/mysqld_error.h] Error 2
gmake[1]: Leaving directory `/usr/pkgsrc/databases/mysql51-client/work/mysql-5.1.54/extra'
gmake: *** [all-recursive] Error 1
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/databases/mysql51-client
*** Error code 1


Interix 6.1 pkgsrc makeに成功したパッケージリスト

2011-02-11 23:41:28 | Interix6.1
autoconf-2.68       Generates automatic source code configuration scripts
bash-4.1nb1         The GNU Bourne Again Shell
bison-2.4.3         GNU yacc(1) replacement
bmake-20100808      Portable (autoconf) version of NetBSD 'make' utility
bootstrap-mk-files-20090807nb2 *.mk files for the bootstrap bmake utility
bsdtar-2.8.4        Fast multi-format tape archiver
bzip2-1.0.6         Block-sorting file compressor
curl-7.21.3         Client that groks URLs
cvs-1.11.23         Concurrent Versions System
digest-20080510     Message digest wrapper utility
gettext-lib-0.14.6  Internationalized Message Handling Library (libintl)
gettext-tools-0.14.6nb1 Tools for providing messages in different languages
gmake-3.82nb1       GNU version of 'make' utility
gtar-base-1.25nb3   The GNU tape archiver with remote magnetic tape support
gtexinfo-4.13       GNU info documentation utilities
libiconv-1.13.1     Character set conversion library
libidn-1.19         Internationalized Domain Names command line tool
libtool-base-2.2.6bnb4 Generic shared library support script (the script itself)
m4-1.4.15           GNU version of UNIX m4 macro language processor
openssh-5.5.1       Open Source Secure shell client and server (remote login program)
openssl-0.9.8q      Secure Socket Layer and cryptographic library
osabi-Interix-6.1   Operating System version dummy-package
p5-Digest-1.16nb1   Perl5 base class for Digest:: modules
p5-Digest-SHA1-2.13nb1 Perl5 module for SHA1
p5-enum-1.016nb2    Enumerations for Perl
p5-Error-0.17016nb1 Perl extension module for try/throw/catch exception handling
p5-MIME-Base64-3.13 Perl5 module for Base64 and Quoted-Printable encodings
p5-pkgsrc-Dewey-1.1nb1 Perl module to compare pkgsrc Dewey numbers
pax-20080110        POSIX standard archiver with many extensions
perl-5.12.2nb1      Practical Extraction and Report Language
pkg-config-0.25nb1  System for managing library compile/link flags
pkglint-4.94        Verifier for NetBSD packages
pkg_install-20101212 Package management and administration tools for pkgsrc
readline-6.1        GNU library that can recall and edit previous input
tcp_wrappers-7.6.1nb4 Monitor and filter incoming requests for network services
tnftp-20070806      The enhanced FTP client in NetBSD
user-20040426       Limited NetBSD-compatible useradd/groupadd commands
x11-links-0.61      Shadow tree of links to native X11 headers and libraries
zlib-1.2.3          General purpose data compression library

Interix 6.1 pkgsrc scmcvs をビルドしてみました その2

2011-02-11 20:57:18 | Interix6.1

先に gtexinfo.4.13 (texinfo) をビルドします
下記の3つのファイルをダウンロードしてscmcvs (cvs-1.11.23)をビルドしました。


$ cd /usr/pkgsrc/devel/gtexinfo
$ bmake clean
$ bmake

gtexinfo.4.13 のビルドは成功しました。

$ cd /usr/pkgsrc/devel/scmcvs
$ bmake 2>&1 | tee cvs.make.txt

エラーが出てしまいました。
------------------------------------------------------------------------------
gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../diff    -I/usr/pkg/include  -D_ALL_SOURCE -O -I/usr/pkg/include -MT add.o -MD -MP -MF .deps/add.Tpo -c -o add.o add.c
In file included from cvs.h:49,
                 from add.c:33:
../lib/xsize.h: In function `xsum':
../lib/xsize.h:61: error: `SIZE_MAX' undeclared (first use in this function)
../lib/xsize.h:61: error: (Each undeclared identifier is reported only once
../lib/xsize.h:61: error: for each function it appears in.)
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/devel/scmcvs/work/cvs-1.11.23/src
*** Error code
------------------------------------------------------------------------------

lib/xsize.h ファイルをobache さんのコメント通りに修正しました。
------------------------------------------------------------------------------
#include <limits.h>
#if HAVE_INTTYPES_H
# include <inttypes.h>
-#elif HAVE_STDINT_H
+#endif
+#if HAVE_STDINT_H
# include <stdint.h>
#endif
------------------------------------------------------------------------------
$ bmake clean
$ bmake
$ bmake install
===========================================================================
$NetBSD: MESSAGE,v 1.1 2007/05/27 09:49:50 schmonz Exp $

Set up the master source repository.  See the "Setting up the repository"
section of cvs.info for details; the one-line summary is (if you are
putting the repository in /src/master):

 $ cvs -d /src/master init

Have all users of the CVS system set the CVSROOT environment
variable appropriately to reflect the placement of your source
repository.  If the above example is used, the following commands
can be placed in user's ~/.profile, ~/.bash_profile file; or in the
system-wide /etc/profile:

 CVSROOT=/src/master; export CVSROOT

for sh/bash/ksh users, or place the following commands in the user's
~/.login, or system-wide in the /etc/csh.login file:

 setenv CVSROOT /src/master

for csh/tcsh users.  If these environment variables are not already set
in your current shell, set them now (or source the login script you
just edited).

===========================================================================

=> Registering installation for cvs-1.11.23
cvs-1.11.23 requires installed package zlib-1.2.3

無事にインストールできました。


Interix 6.1 pkgsrc で openssh をビルドしてみました その2

2011-02-11 20:34:04 | Interix6.1

pkgsrc の openssh が修正されたとのことで下記の4つのファイルを置換して再度ビルドしました。

$ bmake clean
$ bmake

エラーでした。
---------------------------------------------------------------
gcc -D_ALL_SOURCE -O -I/usr/pkg/include -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -fno-builtin-memset -I. -I. -I/usr/pkg/include -I/usr/pkg/include -DIOV_MAX=16 -I/usr/local/bind/include -I/usr/pkg/include -DSSHDIR=\"/usr/pkg/etc/ssh\"  -D_PATH_SSH_PROGRAM=\"/usr/pkg/bin/ssh\"  -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/pkg/bin/ssh-askpass\"  -D_PATH_SFTP_SERVER=\"/usr/pkg/libexec/sftp-server\"  -D_PATH_SSH_KEY_SIGN=\"/usr/pkg/libexec/ssh-keysign\"  -D_PATH_SSH_PKCS11_HELPER=\"/usr/pkg/libexec/ssh-pkcs11-helper\"  -D_PATH_SSH_PIDDIR=\"/var/run\"  -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\"  -DSSH_RAND_HELPER=\"/usr/pkg/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c loginrec.c
loginrec.c: In function `lastlog_openseek':
loginrec.c:1497: error: invalid application of `sizeof' to an incomplete type
loginrec.c: In function `lastlog_write_entry':
loginrec.c:1526: error: storage size of `last' isn't known
loginrec.c:1526: warning: unused variable `last'
loginrec.c: In function `lastlog_get_entry':
loginrec.c:1579: error: storage size of `last' isn't known
loginrec.c:1579: warning: unused variable `last'
---------------------------------------------------------------

obacheさんからのコメントでMakefileを修正しました。
CONFIGURE_ARGS+= --disable-lastlog
---------------------------------------------------------------
PKG_SYSCONFSUBDIR= ssh

GNU_CONFIGURE=  yes
CONFIGURE_ARGS+= --with-mantype=man
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-pid-dir=${SSH_PID_DIR:Q}
CONFIGURE_ARGS+= --with-ssl-dir=${SSLBASE:Q}
CONFIGURE_ARGS+= --with-tcp-wrappers=${BUILDLINK_PREFIX.tcp_wrappers}
CONFIGURE_ARGS+= --disable-lastlog # 追加しました。

.if ${OPSYS} != "Interix"
CONFIGURE_ARGS+= --with-privsep-path=${OPENSSH_CHROOT:Q}
CONFIGURE_ARGS+= --with-privsep-user=${OPENSSH_USER:Q}
.endif
---------------------------------------------------------------

$ bmake clean
$ bmake
=> Creating /usr/pkgsrc/security/openssh/work/sshd
無事にビルドが成功しました。

$ bmake install
===========================================================================
The following directories are used by openssh-5.5.1 and
have the wrong ownership and/or permissions:

 /usr/pkg/etc/ssh (m=755, o=197609, g=131616)

===========================================================================
===========================================================================
The following files should be created for openssh-5.5.1:

 /etc/rc.d/sshd (m=0755)
     [/usr/pkg/share/examples/rc.d/sshd]

===========================================================================
=> Please note the following:

===========================================================================
$NetBSD: MESSAGE.Interix,v 1.1 2005/03/07 23:29:49 tv Exp $

OpenSSH on Interix has some important caveats:

* Hostname resolution uses the BIND resolver library rather than Windows
  native lookup services.  This requires that /etc/resolv.conf be set up
  properly with a "nameserver" line; see resolv.conf(5).  In most
  installations, this was generated automatically when Services for UNIX
  was installed (based on the name server in use at that time).

* Currently, UsePrivilegeSeparation does not work properly, so it defaults
  to "no" on Interix.

* Network drives and encrypted local files may not be accessible after
  logging in through sshd thanks to the way the Windows security API works.
  A workaround is to "exec su USERNAME" after logging in, which will use
  the password to create a proper Windows access credential key.

===========================================================================

=> Registering installation for openssh-5.5.1
openssh-5.5.1 requires installed package openssl-0.9.8q
openssh-5.5.1 requires installed package tcp_wrappers-7.6.1nb4
openssh-5.5.1 requires installed package zlib-1.2.3

無事にインストール終了しました。


Interix 6.1 で pkgsrc を試す texinfo-4.13

2011-02-09 13:11:20 | Interix6.1

Interix 6.1 (SUA Windows7) で texinfo のビルドがうまくいかない原因を調査しました。

下記の2つの関数が見つからないためです。
mbsinit
mbrtowc

m4-1.4.15 でも上記の関数が使用さてれいますがビルドが成功します。

  • Fedora 14 (Linux)の場合

    configure の結果
    checking for mbsinit... yes
    checking for mbrtowc... yes

    make の結果
    rm -f libm4.a
    ar cru libm4.a gl_avltree_oset.o c-ctype.o c-stack.o clean-temp.o execute.o exitfail.o fatal-signal.o fd-safer-flag.o dup-safer-flag.o freadahead.o freading.o gl_linkedhash_list.o gl_list.o localcharset.o lock.o malloca.o memchr2.o gl_oset.o pipe.o pipe2.o pipe2-safer.o printf-frexp.o printf-frexpl.o progname.o threadlib.o tls.o tmpdir.o verror.o version-etc.o version-etc-fsf.o wait-process.o xalloc-die.o gl_xlist.o xmalloca.o gl_xoset.o xprintf.o xstrndup.o xvasprintf.o xasprintf.o asnprintf.o asprintf.o basename.o basename-lgpl.o cloexec.o close-stream.o closein.o closeout.o dirname.o dirname-lgpl.o dup-safer.o fcntl.o fd-safer.o fflush.o filenamecat.o filenamecat-lgpl.o fopen-safer.o fpurge.o fseeko.o isnanl.o mkstemp-safer.o pipe-safer.o printf-args.o printf-parse.o quotearg.o regex.o stripslash.o strstr.o tempname.o vasnprintf.o vasprintf.o xmalloc.o
    ranlib libm4.a
    ..........
    gcc -std=gnu99   -g -O2   -o m4 m4.o builtin.o debug.o eval.o format.o freeze.o input.o macro.o output.o path.o symtab.o ../lib/libm4.a

  • Interix 6.1 の結果

    configure の結果
    checking for mbsinit... no
    checking for mbrtowc... no

    make の結果
    gcc -std=gnu99  -I.      -D_ALL_SOURCE -O -MT mbrtowc.o -MD -MP -MF .deps/mbrtowc.Tpo -c -o mbrtowc.o mbrtowc.c
    mv -f .deps/mbrtowc.Tpo .deps/mbrtowc.Po
    gcc -std=gnu99  -I.      -D_ALL_SOURCE -O -MT mbsinit.o -MD -MP -MF .deps/mbsinit.Tpo -c -o mbsinit.o mbsinit.c
    mv -f .deps/mbsinit.Tpo .deps/mbsinit.Po
    .....
    rm -f libm4.a
    ar cru libm4.a gl_avltree_oset.o c-ctype.o  c-stack.o clean-temp.o execute.o  exitfail.o fatal-signal.o  fd-safer-flag.o dup-safer-flag.o  freadahead.o freading.o  gl_linkedhash_list.o gl_list.o  localcharset.o lock.o malloca.o  memchr2.o gl_oset.o pipe.o  pipe2.o pipe2-safer.o printf-frexp.o  printf-frexpl.o progname.o threadlib.o  tls.o tmpdir.o verror.o  version-etc.o version-etc-fsf.o  wait-process.o xalloc-die.o gl_xlist.o  xmalloca.o gl_xoset.o xprintf.o  xstrndup.o xvasprintf.o xasprintf.o asnprintf.o asprintf.o basename.o basename-lgpl.o btowc.o cloexec.o close-stream.o closein.o closeout.o dirname.o dirname-lgpl.o dup-safer.o error.o fcntl.o fd-safer.o fflush.o filenamecat.o filenamecat-lgpl.o fopen-safer.o fpending.o fpurge.o frexp.o frexpl.o fseeko.o getopt.o getopt1.o isnanf.o isnanl.o mbrtowc.o mbsinit.o mkdtemp.o mkstemp-safer.o obstack.o pipe-safer.o printf-args.o printf-parse.o quotearg.o rawmemchr.o regex.o rmdir.o signbitd.o signbitf.o signbitl.o spawn_faction_addclose.o spawn_faction_adddup2.o spawn_faction_addopen.o spawn_faction_destroy.o spawn_faction_init.o spawnattr_destroy.o spawnattr_init.o spawnattr_setflags.o spawnattr_setsigmask.o spawni.o spawnp.o strchrnul.o strerror.o stripslash.o strndup.o strnlen.o strstr.o strtod.o tempname.o vasnprintf.o vasprintf.o wcrtomb.o xmalloc.o
    ranlib libm4.a
    .....
    gcc -std=gnu99   -D_ALL_SOURCE -O  -Wl,-R/usr/pkg/lib -o m4 m4.o builtin.o debug.o  eval.o format.o freeze.o  input.o macro.o output.o  path.o symtab.o ../lib/libm4.a   

関数が存在しないときはソースからライブラリ(libm4.a)を作成して組み込んでいるようです。
別の場所でmakeファイル等を直して、無いときはソースから作成するように変更してみました。
ソースはm4と同じものを使用しました。
------------------------------------------
gcc  -g -O2   -o ginfo dir.o display.o dribble.o echo-area.o filesys.o footnotes.o gc.o indices.o info-utils.o info.o infodoc.o infomap.o m-x.o man.o nodemenu.o nodes.o search.o session.o signals.o terminal.o tilde.o variables.o window.o doc.o ../lib/libtxi.a ../gnulib/lib/libgnu.a -lncurses 
display.o(.text+0xa1f): In function `mbiter_multi_next':
unix/src/gnu/texinfo-4.13/info/../gnulib/lib/mbiter.h:137: undefined reference to `_mbrtowc'
session.o(.text+0x6f0f): In function `mbiter_multi_next':
unix/src/gnu/texinfo-4.13/info/../gnulib/lib/mbiter.h:137: undefined reference to `_mbrtowc'
window.o(.text+0x26ff): In function `mbiter_multi_next':
unix/src/gnu/texinfo-4.13/info/../gnulib/lib/mbiter.h:137: undefined reference to `_mbrtowc'
collect2: ld returned 1 exit status
gmake[3]: *** [ginfo] Error 1
------------------------------------------
ビルドに失敗しました。mbsinitは消えましたがmbrtowcが残っています。
glibc-2.12.2のソースを見ると最後にエイリアスが仕込まれていますね。

libc_hidden_def (__mbrtowc)
weak_alias (__mbrtowc, mbrtowc)
libc_hidden_weak (mbrtowc)

ソースをglibc-2.12.2のに代えてビルドしてみます。

Interix は BSD と System V からの移行に対応で Linux にするよりいいですよってことみみたいですね。
GNU C Library (glibc) とBSD C Library は対応しています。
Interix の C Library は、System V よりなのかな。
----------------------------------------------------------

Gnulib module: mbsinit

Portability problems fixed by Gnulib:

  • This function is missing on some platforms: HP-UX 11.00, IRIX 6.5, Solaris 2.6, Interix 3.5.

----------------------------------------------------------


関数の詳細
http://www.gnu.org/software/hello/manual/gnulib/mbsinit.html
http://www.gnu.org/software/hello/manual/gnulib/mbrtowc.html

Interix についての参考
http://technet.microsoft.com/ja-jp/library/bb463202.aspx
http://technet.microsoft.com/ja-jp/interopmigration/bb380242.aspx
http://msdn.microsoft.com/ja-jp/library/bb463206.aspx


Interix 6.1 pkgsrc パッケージをインストールします

2011-02-05 20:01:13 | Interix6.1

Interix 6.1 pkgsrc でパッケージをインストールしてみました。

  1. openssh-5.5p1
    Interix 6.1 (/usr/include) には下記のヘッダファイルが存在せず。(Fedora 14 にはありました)
     標準 C ライブラリ (libc, -lc) なのだが別途インストールしていいものなのか調査中です。
    OSとの基本的な機能を提供するライブラリなので使用できないような。テストもしなくてはいけないしね。
    1. arpa/nameser.h
    2. resolv.h
    ------------------------------------------------------------------------------------------
    In file included from ../openbsd-compat/openbsd-compat.h:45,
                     from ../includes.h:174,
                     from bsd-arc4random.c:17:
    ../openbsd-compat/getrrsetbyname.h:57:26: arpa/nameser.h: No such file or directory
    ../openbsd-compat/getrrsetbyname.h:59:20: resolv.h: No such file or directory
    ------------------------------------------------------------------------------------------

    ヘッダファイルは他のところにあるのね。シンボリックリンクを貼ります。
    同名のファイルはエラーで処理されないので気にしないで実行します。
    $ ln -s /usr/local/bind/include/*.h /usr/include/
    $ ln -s /usr/local/bind/include/arpa/*.h /usr/include/arpa/
    $ ln -s /usr/local/bind/include/isc/*.h /usr/include/isc/
    $ ln -s /usr/local/bind/include/sys/*.h /usr/include/sys/

    コンパイルエラーです。調査中
    ------------------------------------------------------------------------------------------
    bsd-openpty.c: In function `openpty':
    bsd-openpty.c:129: error: `I_PUSH' undeclared (first use in this function)
    bsd-openpty.c:129: error: (Each undeclared identifier is reported only once
    bsd-openpty.c:129: error: for each function it appears in.)
    ------------------------------------------------------------------------------------------

  2. scmcvs (cvs-1.11.23.tar.bz2) ソースバージョン管理システム
    cvsのフォルダたくさんあるので見つけにくい
    途中の gtexinfo-4.13 でビルドが失敗する。
    http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=42925

  3. scmgit (git-1.7.3.4.tar.bz2)
    途中の osabi で止まってしまう。
    The Operating System version (3.5) does not match 6.1
    とバージョンが合わないとでます。
    ------------------------------------------------------------------------------------------
    ===> Installing dependencies for osabi-Interix-6.1
    ===> Overriding tools for osabi-Interix-6.1
    ===> Extracting for osabi-Interix-6.1
    ===> Patching for osabi-Interix-6.1
    ===> Creating toolchain wrappers for osabi-Interix-6.1
    ===> Installing for osabi-Interix-6.1
    WARNING: Your umask is ``0022''.
    WARNING: If this is not desired, set it to an appropriate value (002) and install
    WARNING: this package again by ``/usr/pkg/bin/bmake deinstall reinstall''.
    => Running PRE-INSTALL script actions
    The Operating System version (3.5) does not match 6.1
    ------------------------------------------------------------------------------------------

    obacheさんがソースを修正して下さいました。ありがとうございます。
    http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/pkgtools/osabi/INSTALL.diff?r1=1.1&r2=1.2&f=h

    一旦パッケージを初期化します。
    $ cd /usr/pkgsrc/pkgtools/osabi
    $ bmake clean

    INSTALL ファイルをバックアップして Interixのケース文の分岐を削除します。
    (パッチを当てるのが面倒だったのでこの方法をとりました)

    ではもう一度ビルドします。
    $ cd ../../devel/scmgit
    $ bmake 2>&1 | tee scmgit.make.05.txt
    エラーが出ていまいました。
    ------------------------------------------------------------------------------------------
    libtool: link: gcc -O -D_ALL_SOURCE -O -pipe -DTCL_DBGX= -Wl,-R/usr/pkg/lib tclAppInit.o -o tclsh  -L/usr/pkgsrc/lang/tcl/work/tcl8.4.18/unix -ltcl84 -lm -L/usr/pkgsrc/lang/tcl/work/.buildlink/lib
    /opt/gcc.3.3/lib/gcc-lib/i586-pc-interix3/3.3/../../../../i586-pc-interix3/bin/ld: cannot find -ltcl84
    collect2: ld returned 1 exit status
    *** Error code 1
    Stop.
    bmake: stopped in /usr/pkgsrc/lang/tcl/work/tcl8.4.18/unix
    ------------------------------------------------------------------------------------------

    パッケージの依存関係を調べました。
    [scmgit]$ bmake show-depends
    scmgit-base>=1.7.3.4:../../devel/scmgit-base
    scmgit-docs>=1.7.3.4:../../devel/scmgit-docs

    [scmgit-base]$ bmake show-depends
    p5-Error>=0.17015:../../devel/p5-Error
    perl<5.14.0:../../lang/perl5
    perl>=5.12.0:../../lang/perl5
    tk>=8.4:../../x11/tk
    python26>=2.6:../../lang/python26
    libiconv>=1.9.1nb4:../../converters/libiconv
    zlib>=1.2.3:../../devel/zlib
    openssl>=0.9.8knb1:../../security/openssl
    expat>=2.0.0nb1:../../textproc/expat
    curl>=7.19.7nb1:../../www/curl

    GUI 使用しないのでtk入れなくてもいいのになあ。
    curl もビルドできないしね、困ったものです。

  4. curl-7.21.3
    途中の texinfo-4.13 でビルドが失敗してしまいます。
    ------------------------------------------------------------------------------------------
    display.o(.text+0x923):display.c: undefined reference to `_mbsinit'
    display.o(.text+0x95e):display.c: undefined reference to `_mbrtowc'
    display.o(.text+0x9e6):display.c: undefined reference to `_mbsinit'
    session.o(.text+0x6a23):session.c: undefined reference to `_mbsinit'
    session.o(.text+0x6a5e):session.c: undefined reference to `_mbrtowc'
    session.o(.text+0x6ae6):session.c: undefined reference to `_mbsinit'
    window.o(.text+0x23e6):window.c: undefined reference to `_mbsinit'
    window.o(.text+0x2421):window.c: undefined reference to `_mbrtowc'
    window.o(.text+0x24a9):window.c: undefined reference to `_mbsinit'
    ------------------------------------------------------------------------------------------
    gtexinfo (texinfo)のビルドが成功したら、うまくビルドできました。

  5. インストールが成功したパッケージ
    bmake-20100808
    bootstrap-mk-files-20090807nb2
    bzip2-1.0.6
    digest-20080510
    gettext-lib-0.14.6
    gettext-tools-0.14.6nb1
    gtar-base-1.25nb3
    libiconv-1.13.1
    libtool-base-2.2.6bnb4
    openssl-0.9.8q
    p5-Digest-1.16nb1
    p5-Digest-SHA1-2.13nb1
    p5-Error-0.17016nb1
    p5-MIME-Base64-3.13
    p5-enum-1.016nb2
    p5-pkgsrc-Dewey-1.1nb1
    pax-20080110
    perl-5.12.2nb1
    pkg_install-20101212
    pkglint-4.94
    tcp_wrappers-7.6.1nb4
    tnftp-20070806
    zlib-1.2.3

  6. ソースコード修正でインストール可能です。
    gmake-3.82nb1

Interix 6.1 で NetBSD pkgsrc を試す その2

2011-02-04 18:21:53 | Interix6.1

NetBSD pkgsrc をインストールを再度しました。

環境変数の多さが、悪さをするということなので下記のスクリプトを作成しました。
$ env > env.txt
unsetenv スクリプト
---------------------------------------------------------
#! /bin/bash
# File name unsetenv

while read enva; do
   echo 'unset'\
        ${enva%%=*}
done
---------------------------------------------------------

$ unsetenv < env.txt >unsetenvlist.txt
でざっくり、リストをさくした後に pkginit スクリプトを作成しました。

---------------------------------------------------------
#! /bin/sh
# File Name pkginit
# pkgsrcを使用するために環境変数初期化処理をします。

# ./bootstrap が終わったら下記2行のコメントアウトを外します
#export PATH=$PATH:/usr/pkg/bin:/usr/pkg/sbin
#cd /usr/pkgsrc

unset XCMSDB
unset TMP
unset LOGONSERVER
# PATH
unset OPENNT_ROOT
unset SYSTEMROOT
unset EDITOR
unset TMPDIR
unset SFUDIR
unset VISUAL
unset ALLUSERSPROFILE
unset CLASSPATH
unset USERPROFILE
unset PATHEXT
unset PROCESSOR_REVISION
unset UIDPATH
unset INTERIX_ROOT_WIN
unset SUA_ROOT_WIN
unset TERM
unset VS100COMNTOOLS
unset SESSIONNAME
# USERNAME
# LANG
unset VBOX_INSTALL_PATH
unset TEMP
unset EMC_AUTOPLAY
unset TERMCAP
unset LOGNAME
unset PROCESSOR_IDENTIFIER
unset MANPATH
unset _PSXLIBPATH
unset INTERIX_ROOT
unset HOMEDRIVE
unset SYSTEMDRIVE
unset XAPPLRESDIR
unset XKEYSYMDB
# HOME
unset PROCESSOR_ARCHITECTURE
unset COMMONPROGRAMFILES
unset LD_LIBRARY_PATH
unset PSMODULEPATH
unset QTJAVA
unset NUMBER_OF_PROCESSORS
# DISPLAY
unset COMSPEC
unset PROGRAMFILES
unset PATH_ORIG
unset FCEDIT
unset PROGRAMDATA
unset SFUDIR_INTERIX
unset XFILESEARCHPATH
unset WINDIR
unset OS
unset SUA_ROOT
unset PUBLIC
unset USERDOMAIN
unset PROCESSOR_LEVEL
unset ROXIOCENTRAL
unset COMPUTERNAME
unset LOCALAPPDATA
unset APPDATA
unset XNLSPATH
unset HOMEPATH
unset FP_NO_HOST_CHECK
unset PATH_WINDOWS
bash
---------------------------------------------------------

真っさらにします。
$ rm -rf /var/db/pkg
$ rm -rf /usr/pkg
$ rm -rf /usr/pkgsrc

ブランチ 2010Q4 を展開します。
$ tar -xzf pkgsrc-2010Q4.tar.gz -C /usr

一度Windows 7を再起動します。

pkgsrc をインストールします。
$ ./pkginit

環境変数の確認をしてみます。
$ env
USERNAME=username
PATH=/bin:/opt/gcc.3.3/bin:/usr/contrib/bin:/usr/X11R6/bin:/usr/local/bin:/usr/contrib/win32/bin:/dev/fs/C/Windows/System32:/dev/fs/C/Windows/SUA/common
PWD=/usr/pkgsrc/bootstrap
LANG=win-ja_JP.windows-932
HOME=/dev/fs/C/Users/username
SHLVL=2
DISPLAY=localhost:0.0
OLDPWD=/dev/fs/C/Users/username
_=/bin/env

bootstrap スクリプトを起動します。
$ cd /usr/pkgsrc/bootstrap
$ ./bootstrap 2>&1 | tee install.txt

無事にインストールできました。
You can find extensive documentation of the NetBSD P
in /usr/pkgsrc/doc/pkgsrc.txt.

Hopefully everything is now complete.
Thank you

====================================================

===> bootstrap started: 金  2月  4 17:23:56 JST 2011
===> bootstrap ended:   金  2月  4 17:53:04 JST 2011


Interix 6.1 で NetBSD pkgsrc を試す

2011-02-01 21:05:10 | Interix6.1

Interix 6.1 で NetBSD の pkgsrc を 試してみました。
http://www.netbsd.org/docs/pkgsrc/platforms.html

./bootstrap スクリプトのエラーがでるたびに、下記のコマンドをGNUに変更しましたが動きませんでした。
GNU awk (gawk)
gawk-3.1.8.tar.gz

GNU diff
diffutils-3.0.tar.gz


obacheさんコメントありがとうございます。

たしかに bootstrap のスクリプトが env のところでkshだとMemory faultが出て、bashだと、Segmentation faultやenvがタスクマネージャーでCPU100%になったりするのです。

http://www.netbsd.org/docs/pkgsrc/platforms.html
As of this writing, the SUA's Interix 6.0 (32bit) and 6.1 (64bit) subsystems have been tested. Other versions may work as well. The Interix 5.x subsystem has not yet been tested with pkgsrc.
と書いてあったのでまだなのかなと思いまして。
あと、 http://wikki.sakura.ne.jp/gir-lab/?pmgr の開発動機の3番目に
-------------------------------------------------------------------
3.NetBSDのpkgsrcがWindows VistaのSUAではうまく動かなかったため。
◦ビルド中にkshでMemory faultが発生して止まってしまいます。core.dmpがgdbでは分析できなかったことと、タイミングによって挙動が異なるため、原因は突き止められませんでした。kshが多重に呼び出された際の処理に問題があるように見受けられます。XPのSFUでは便利に使っていたため残念です。
-------------------------------------------------------------------
とあったので諦めてしまいました。

pkgsrc関係のコマンドやpkgsrc-installが依存するライブラリを個別にいれようかと思いましたが、bmakeの仕組みを調査しなくては動かないくて面倒になってきました。

ここのと同じ問題です。
http://gnats.netbsd.org/37349


Debian Interix Port を導入する

2011-01-31 15:46:14 | Interix6.1

Subsystem for UNIX-based Applications (SUA Windows7)
Interix 6.1 にDebian Interix Port を導入しました。
http://debian-interix.net/

下記の手順を参照しました。
http://www.debian-interix.net/debian-interix/INSTALL

  1. インストールラーをダウンロードします。
    http://debian-interix.net/debian-interix/install.zip
  2. 下記のディレクトリが存在しないことを確認します。
      - /debootstrap/debootstrap.log
      - /usr/local/man/man
      - /var/cache/apt/
      - /var/lib/apt/
      - /var/lib/dpkg/
  3. Administrator ユーザを使用できるようにします。
    コントロール パネル -> システムとセキュリティ -> 管理ツール
    ローカルセキュリティポリシーを開きます。
    ローカルポリシー -> セキュリティオプションを開きます。
    「アカウント:Administrator アカウントの状態」を右クリックして有効にします。
  4. Administrator ユーザにパスワードを設定します。
  5. $ su administrator
    $ id -u
      197108
    197108と表示されることを確認します。
  6. パスを追加設定します。
    export PATH=/usr/sbin:/sbin:$PATH
  7. install.zipを展開したディレクトリへ移動します。
    $ cd 展開したディレクトリへ
    $ ./setup
    "Base system installed successfully."
    と表示されることを確認します。
  8. /etc/apt/ に preferences ファイルを作成します。
    内容は下記の通り
        Package: *
        Pin: release a=unreleased35
        Pin-Priority: 800
  9. 下記のコマンドを実行してインストール終了です。
    $ apt-get update
    $ apt-get upgrade -f -V

Interix 6.1 で GNU make 3.82をmakeしてみた

2011-01-31 11:13:06 | Interix6.1

Windows 7 の サブシステム UNIX ベース アプリケーション用サブシステム (SUA) に GNU make 3.82 をインストールします。

GNU make を gmake に変更してインストールします。
$ ./configure --program-prefix=g CC=/opt/gcc.4.2/bin/gcc
$ make
下記のエラーがでました。
--------------------------------------------------------------------------------------------------
In file included from ar.c:20:
make.h:436: error: expected declaration specifiers or '...' before 'uintmax_t'
In file included from ar.c:24:
filedef.h:37: error: expected specifier-qualifier-list before 'uintmax_t'
filedef.h:113: warning: 'enum cmd_state' declared inside parameter list
filedef.h:113: warning: its scope is only this definition or declaration, which is probably not what you want
filedef.h:159: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'file_timestamp_cons'
filedef.h:160: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'file_timestamp_now'
filedef.h:161: error: expected declaration specifiers or '...' before 'uintmax_t'
filedef.h:171: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'f_mtime'
--------------------------------------------------------------------------------------------------

make.h:436: error: expected declaration specifiers or '...' before 'uintmax_t'
make.h ファイルの436行目を見とFILE_TIMESTAMP の定義が怪しい。
436 const char *vpath_search (const char *file, FILE_TIMESTAMP *mtime_ptr,
                          unsigned int* vpath_index, unsigned int* path_index);

FILE_TIMESTAMP を検索します。
-----------------------------------------
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#define FILE_TIMESTAMP uintmax_t
-----------------------------------------
inttypes.h には uintmax_t 定義されていない。
定義されているのは stdint.h なので追加しました。
-----------------------------------------
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#include <stdint.h>
#define FILE_TIMESTAMP uintmax_t
-----------------------------------------
無事にmakeが終了。

$ make install