mingw – cross compile x64 libavcodec on debian6

This is a guide of cross compile libavcodec into mingw32 bit to run on win64 system from linux debian6 64bit version:

  1. git clone the libavcodec: git clone git://git.libav.org/libav.git
  2. apt-get install gcc-mingw32
  3. ./configure –enable-cross-compile –enable-w32threads –cross-prefix=amd64-mingw32msvc- –arch=x86_32 –target-os=mingw32 –enable-memalign-hack –enable-shared

This is actually a mistake because I want to get x86 code, it turns out amd64-mingw32msvc on debian6 x64 is generate x64 code, it’s pretty confusing here. So keep it simple, if you want to have x86 bits, do this steps:

  1. install mingw32 on win32 OS
  2. git clone the latest libavcodec: git clone git://git.libav.org/libav.git
  3. go the source directory:
    ./configure --enable-w32threads --enable-memalign-hack --enable-shared
  4. make

 

 

Have fun.

 

Avoid boot stopper: give root password for maintenance

When messed around, you will get a message: give root password for maintenance, and require you to press ctrl+D to continue during linux boot, then freeze the boot process. Most likely, it is because it’s booting into the single user mode.

To have the linux boot without this blocking issue, open file: /boot/grub/menu.lst, and set the default option to the config with a quiet in it, the index is zero based, so in my case, here is my config file, I am setting it to take the config with this line:

kernel          /boot/vmlinuz-2.6.32-5-xen-amd64 root=/dev/xvda1 ro quiet

root@debian-linux:~# cat /boot/grub/menu.lst
default 0
timeout 5
title           Debian GNU/Linux, kernel 2.6.32-5-xen-amd64
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.32-5-xen-amd64 root=/dev/xvda1 ro quiet
initrd          /boot/initrd.img-2.6.32-5-xen-amd64

title           Debian GNU/Linux, kernel 2.6.32-5-xen-amd64 (single-user mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.32-5-xen-amd64 root=/dev/xvda1 ro single
initrd          /boot/initrd.img-2.6.32-5-xen-amd64

installed .net framework 3.5 doesn’t mean you have got .net framework 3.5 client profile

Something strange when you are deploy .net framework based apps, it just doesn’t follow the way you would expect it would be, for example, from my experience:

Installed .net framework 3.5 doesn’t mean you have got .net framework 3.5 client profile

You are still prompted error if you want to run apps target .net 3.5 client proflie while having only .net 3.5 installed. It’s just like the law of classical physics doesn’t have to happen at the universe level: nothing could be counted on.

So be careful and good luck.

minor cracks discovered on the wing rib of air bus a380

Minor cracks discovered on the wing rib of air bus a380. The news says it’s not a safety issue. Do you trust your instinct or their mouse? This may just be a psychological panic, since there is so many parts on the plane, so easy to get wrong. Why don’t they get it fixed right now? So many work involved, it’s beyond their control, at least very not economically. I think the plane is tested against the cruel mother nature everyday, if they already know the issue, should get it fixed.