写真集

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

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


Subsystem for UNIX-based Applications にて bash4.1.9 を make してみました

2011-01-26 16:44:57 | Interix6.1

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

  1. bash-4.1.tar.gz をダウンロードします。
  2. patchを当てます。
    patch -p0 < ../bash41-001
    patch -p0 < ../bash41-002
    patch -p0 < ../bash41-003
    patch -p0 < ../bash41-004
    patch -p0 < ../bash41-005
    patch -p0 < ../bash41-006
    patch -p0 < ../bash41-007
    patch -p0 < ../bash41-008
    patch -p0 < ../bash41-009
  3. $ ./configure
  4. $ make
    下記のエラーがでました。
    -----------------------------------------------------------
    making ./lib/intl/libintl.a in ./lib/intl
    gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\"  -DLIBDIR=\"/usr/local/libdata\" -DIN_LIBINTL  -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC  -Dset_relocation_prefix=libintl_set_relocation_prefix  -Drelocate=libintl_relocate  -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DSHELL -I. -I. -I/dev/fs/C/Users/username/unix/bash-4.1 -I../..  -g -O2  loadmsgcat.c
    loadmsgcat.c: In function `get_sysdep_segment_value':
    loadmsgcat.c:727: error: `uintmax_t' undeclared (first use in this function)
    loadmsgcat.c:727: error: (Each undeclared identifier is reported only once
    loadmsgcat.c:727: error: for each function it appears in.)
    *** Error code 1
    Stop in /dev/fs/C/Users/username/unix/bash-4.1/lib/intl.
    *** Error code 1
    Stop in /dev/fs/C/Users/username/unix/bash-4.1 (line 628 of makefile).
    -----------------------------------------------------------
    uintmax_t が未定義だと stdint.h は /usr/include に存在するのになぜ?
    loadmsgcat.c を stdint.h が include されるように変更します。ifをコメントアウトしました。
    ついでに inttypes.h も無条件でインクルードされるように変更します。
    -----------------------------------------------------------
    82 //#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
    83 # include
    84 //#endif
    85 //#if defined HAVE_INTTYPES_H || defined _LIBC
    86 # include
    87 //#endif
    -----------------------------------------------------------
    無事に make 終了しました。
    -----------------------------------------------------------
    ls -l bash
    -rwxr-xr-x  1 username None  2143063 Jan 26 14:07 bash
    size bash
       text    data     bss     dec     hex filename
     663819   19145   18308  701272   ab358 bash
    -----------------------------------------------------------
  5. $ make install
  6. 無事にインストールされたました。
    $ echo $BASH_VERSION
    4.1.9(1)-release
    $ bash
    bash-4.1$

$ uname -a
Interix pcname 6.1 10.0.7063.0 x86 Intel_x86_Family15_Model4_Stepping10

Microsoft Subsystem for UNIX-based Applications をインストールする方法
http://wikis.sun.com/pages/viewpage.action?pageId=102400231

Debian Interix Port
http://www.debian-interix.net/

参考
http://girlab2010.wordpress.com/category/interix/
http://air.s.kanazawa-u.ac.jp/~ohara/interix.html
http://www.hakusan.tsg.ne.jp/tjkawa/lib/index.jsp
http://d.hatena.ne.jp/piropirostar/


萌え時計♪をFedora14で動かしてみた

2011-01-18 21:28:25 | Fedora 14

http://moebuntu.web.fc2.com/moespecial.html#ins7
からダウンロードします。
Homeフォルダにmoeclockフォルダを作成して展開します。
moeclockフォルダにwallpapersフォルダを作成して適当に画像を入れてみた。
1分ごとまたは、時計の画面をクリックすると画像が切り替わります。
ちゃんと時報もなりますね。
ちなみに python が必要です。



wallpaperはこちらから
http://kaoru-linux.cocolog-nifty.com/blog/2010/05/post-c2ad.html

X forwarding で Windows7 にX転送表示してみました。


Android ビルド 不足ライブラリ

2011-01-15 21:06:42 | Android

Fedora14 x86_64 でビルドしたため x86 のライブラリをインストールしました。
クロスコンパイルですね。下記から検索します。
http://rpm.pbone.net/index.php3

  1. /usr/bin/ld: cannot find -lXi
    libXi
    ------------------------------------------------------
    $ make xconfig
    HOSTLD scripts/kconfig/qconf
    /usr/bin/ld: cannot find -lXi
    collect2: ld はステータス 1 で終了しました
    make[1]: *** [scripts/kconfig/qconf] エラー 1
    make: *** [xconfig] エラー 2
    -------------------------------------------------------
  2. /usr/bin/ld: cannot find -lz
    zlib-devel
  3. /usr/bin/ld: skipping incompatible /usr/lib64/libtinfo.so when searching for -ltinfo
    /usr/bin/ld: cannot find -ltinfo
    ncurses-devel
  4. libreadline.so
    readline-devel

Android ビルド終了

2011-01-15 14:14:17 | Android
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create? yes
Pass 4: Checking reference counts
Pass 5: Checking group summary information
system: ***** FILE SYSTEM WAS MODIFIED *****
system: 1096/1752 files (1.3% non-contiguous), 573769/592472 blocks
Install system fs image: out/target/product/eeepc/system.img
rm -rf out/target/product/eeepc/installer
out/host/linux-x86/bin/acp -pr bootable/newinstaller/initrd out/target/product/eeepc/installer
out/host/linux-x86/bin/acp -p device/asus/eeepc/eeepc_info out/target/product/eeepc/installer/scripts
ln -s /bin/ld-linux.so.2 out/target/product/eeepc/installer/lib
mkdir -p out/target/product/eeepc/installer/android out/target/product/eeepc/installer/mnt out/target/product/eeepc/installer/proc out/target/product/eeepc/installer/sys out/target/product/eeepc/installer/tmp out/target/product/eeepc/installer/sfs out/target/product/eeepc/installer/hd
echo "VER=2011-01-15" > out/target/product/eeepc/installer/scripts/00-ver
out/host/linux-x86/bin/mkbootfs out/target/product/eeepc/installer | gzip -9 > out/target/product/eeepc/initrd.img
out/host/linux-x86/bin/mkbootfs bootable/newinstaller/install/ | gzip -9 > out/target/product/eeepc/install.img
rm -rf out/target/product/eeepc/usb_boot
mkdir -p out/target/product/eeepc/usb_boot/android-system
touch out/target/product/eeepc/usb_boot/ramdisk
echo 1 > out/target/product/eeepc/usb_boot/cmdline
ln out/target/product/eeepc/ramdisk.img out/target/product/eeepc/initrd.img out/target/product/eeepc/install.img out/target/product/eeepc/system.img out/target/product/eeepc/kernel out/target/product/eeepc/usb_boot/android-system
out/host/linux-x86/bin/acp -fp bootable/newinstaller/usb/* bootable/newinstaller/usb/../install/grub/android-x86.xpm.gz out/target/product/eeepc/usb_boot
ln -s grub4dos out/target/product/eeepc/usb_boot/kernel
num_blocks=`du -sk out/target/product/eeepc/usb_boot | tail -n1 | awk '{print $1;}'`; \
num_inodes=`find out/target/product/eeepc/usb_boot | wc -l`; \
out/host/linux-x86/bin/genext2fs -d out/target/product/eeepc/usb_boot -b `expr $num_blocks + 20480` -N `expr $num_inodes + 15` -m 0 out/target/product/eeepc/usb_tmp.img
target Creating: out/target/product/eeepc/grub/grub_stage2
target Generating GRUB bin: out/target/product/eeepc/grub/grub.bin
----- Making usb image ------
I/diskconfig(10726): Requesting operation on a regular file, not block device.
I/config_mbr(10726): Configuring pentry. status=0x80 type=0x83 start_lba=2048 len_lba=1235920
I/config_mbr(10726): Configuring pentry. status=0x0 type=0x0 start_lba=0 len_lba=0
I/config_mbr(10726): Configuring pentry. status=0x0 type=0x0 start_lba=0 len_lba=0
I/config_mbr(10726): Configuring pentry. status=0x0 type=0x0 start_lba=0 len_lba=0
I/diskutils(10726): Writing RAW image 'out/target/product/eeepc/usb_tmp.img' to 'out/target/product/eeepc/eeepc_usb.img' (offset=1048576)
I/diskutils(10726): Wrote 632791040 bytes to out/target/product/eeepc/eeepc_usb.img @ 1048576
Updated usb_boot length to be 617960KB
Copying images to specified partition offsets
File edit complete. Wrote 1 images.

Android ビルド中にライブラリ不足の対応 メモ

2011-01-15 13:23:40 | Fedora 14

ビルド中に下記のようなエラーがでたら

Install: out/target/product/eeepc/system/xbin/timeinfo
host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
/usr/bin/ld: skipping incompatible /usr/lib64/libtinfo.so when searching for -ltinfo
/usr/bin/ld: cannot find -ltinfo
collect2: ld はステータス 1 で終了しました
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] エラー 1

http://rpm.pbone.net/index.php3
にて
libtinfo.so を検索(Search)します。

PLD  ftp.pld-linux.org/dists/2.0/updates/i586/ncurses-devel-5.7-8.i586.rpm

などと表示されるのでリストを検索します。
$ yum list ncurses-devel
ncurses-devel-x.x-x.ixxx

開発ライブラリをインストールします。
$ sudo yum install ncurses-devel-x.x-x.ixxx