토요일 6월 06, 2009

우리회사 ^^ Sun Microsystems 은 Ian Murdok을 리더로 스카웃하여 OpenSolaris 개발을 진행해 2008.05 Release 를 시작하여, 최근 2009.06 Release 까지 계속해서 새로운 모습과 기능으로 Open Source Solaris를 배포하고 있다. 물론 Free이다.(Enterprise 고객을 위해서는 공식적인 Sun Support Plan은 유료로 지원하고 있다.)

여전히 CDE를 선호하는 분들이 계시지만, 이제는 GNOME, Solaris에서는 JDS(Java Desktop System)라는 이름으로 OS GUI Desktop 환경이 기본 환경이며, Solaris는 앞으로 더이상 CDE를 공식적으로 지원하지 않는다. Solaris에 포팅된 GNOME이라 생각하면 쉽다. GNOME에서 사용하던 테마 등 모두 적용 가능한건 당연지사! 나 역시 gnome-look.org에서 theme를 다운 받아 적용해서 사용중이다.

Solaris가 Linux를 따라한다? 맞는 말이다. 하지만, 한 가지 중요한 점이 있다. OS, 운영체제의 근간 그 Core가 되는 Kernel 은 20년이 넘게 그 성능과 안정성을 인정받아온 UNIX Solaris의 Kernel 이라는 점이다. CPU 16개 정도 이상이 되면, Linux 커널은 그 힘을 발휘할 수 없다. Solaris는 16개의 시스템은 우스울 뿐, 그 정도의 하드웨어 자원은 아주 자연스럽게 scheduling 하여 performance 를 유지해 준다. UNIX의 그 커널임을 잊지 말자!


OpenSolaris는 불편했던 Package 관리 시스템을 IPS(Image Packaging System)란 이름으로 새롭게 OpenSolaris에 탑재하였다. 물론 이 부분의 Linux의 패키지관리 시스템과 동일한 시스템으로 보아도 무방하다. 지금은 왠만한 지원 툴이나 라이브러리는 모두 IPS로 지원하고 있어, 필요하면 그냥 관리 툴에서 설택하여 설치 할 수 있다. dependency check? 물론 지원하고 있다.

마지막으로 ZFS란 파일 시스템은 Linux가 따라올 수 없는 새로운 개념의 File System이다. 안정성, 간편한 확장 능력, RAID 지원, Sanpshot, clone, compression, backup 등 File System자체가 모든 기능을 지원함으로써 전혀 새로운 편리성을 가져온다.

Try it~! :)



목요일 6월 04, 2009

Summary in English: When you want XChat to chat in IRC server which is running your own language(Korean, Japanese..Asian 2-byte language), You need to "iconv" stuff to change your character set to be right seen.

iconv 는 UTF-8이 표준으로 자리를 잡아가면서 가장 중요한 유틸이고, 라이브러리가 되었다. 언어 코드별 변환을 가능하게 해주는 유틸이기 때문이다. 기존의 Linux나 Solaris는 UTF가 아닌, euc-kr, cp949의 Character set을 사용했지만, 요즘은 다 UTF-8로 바뀌었다. 기존의 euc-kr로 작성된  text를 UTF에서 보게된다면, 모두 깨진 문자로 나오게 된다.

오래전에 게임을 즐기면서 IRC를 사용했었다. OpenSolaris에는 유명한 IRC Client인 XChat이 올라가 있지만, 한글 서버에서는 문자가 모두 깨져서 나온다. 서버 옵션에서 Character set을 변경할 수 있으나, 변경해도 iconv가 없이는 error를 만나게 된다.

다시 말해 Opensolaris에서 Character set문제를 만나면, 또한 훌륭하게도 해당 Application이 iconv를 지원하게끔 되어 있다면, iconv설치로 간단히 한글을 사용할 수 있다.

OpenSolaris의 패키지 관리자에서 iconv로 검색해서 모두 install을 해주고, XChat을 실행하면 문제는 해결된다.

아래 스크린샷은 OpenSolaris 에서 한글을 지원하는 XChat 화면이다. 서버는 7kr.hanirc.org :)

목요일 8월 02, 2007

Firefox 2 http://releases.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.6/contrib/

for someone who is missing the newest fox~ :) 

1. Intro

Compiling Xine-lib on Opensolaris is my assignment for getting closer to Solaris.

Library source version is 1.1.7(the latest). but It has some problems.

Let's address them with me. I'd like to welcome any comments and advices at any moment. :)

2. Compile Environment

This is my compile environment for compiling Xine-lib.

We should? use gnu-cc,gnu-as but solaris ld.

You can try sun cc if you want, but I don't think that could work.

bash-3.00# pwd
/var/tmp/xine-lib-1.1.7
bash-3.00# which gcc
/usr/sfw/bin/gcc
bash-3.00# which ld
/usr/ccs/bin/ld
bash-3.00# which as
/usr/ccs/bin/as
bash-3.00# ls -l /usr/ccs/bin/as
lrwxrwxrwx 1 root root 16 7월 24일 13:48 /usr/ccs/bin/as -> /usr/sfw/bin/gas
bash-3.00#

3. Start go to xine-lib-1.1.7 folder ans run configure, gmake

bash-3.00# configure
bash-3.00# gmake

(1). XINE_FORMAT_PRINTF error

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../include -I../include -I../src -I../src/xine-engine -I../src/xine-engine -I../src/xine-utils -I../src/input -I../src/input -I../lib -I../lib -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -mtune=i386 -O3 -pipe -fomit-frame-pointer -falign-functions=4 -falign-loops=4 -falign-jumps=4 -fexpensive-optimizations -fschedule-insns2 -ffast-math -finline-functions -Wall -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -g -O2 -DNDEBUG -MT asprintf.lo -MD -MP -MF .deps/asprintf.Tpo -c asprintf.c  -fPIC -DPIC -o .libs/asprintf.o
In file included from ../config.h:720,
from asprintf.c:22:
./os_internal.h:123: error: syntax error before "XINE_FORMAT_PRINTF"
./os_internal.h:123: warning: type defaults to `int' in declaration of `XINE_FORMAT_PRINTF'
./os_internal.h:123: warning: data definition has no type or storage class
./os_internal.h:124: error: syntax error before "XINE_FORMAT_PRINTF"
./os_internal.h:124: warning: type defaults to `int' in declaration of `XINE_FORMAT_PRINTF'
./os_internal.h:124: warning: data definition has no type or storage class
asprintf.c:29: warning: no previous prototype for 'xine_private_vasprintf'
asprintf.c: In function `xine_private_vasprintf':
asprintf.c:46: warning: function might be possible candidate for `printf' format attribute
asprintf.c: At top level:
asprintf.c:58: warning: no previous prototype for 'xine_private_asprintf'

As you know Solaris doesn't support vasprintf, asprintf due to security, so xine-lib developer took __attribute__ and then define XINE_FORMAT_PRINTF that. but this makes an compile error on solaris system.

I checked old version source code. they haven't used XINE_FORMAT_PRINTF macro until 1.1.4 version. but why they changed that??? anyway, I changed back XINE_FORMAT_PRINTF to old style using __attribute__. find this file ./lib/os_internal.h

    122 #define vasprintf(STRINGPP, FORMAT, VA_ARG) xine_private_vasprintf((STRINGPP), (FORMAT), (VA_ARG))
123 int xine_private_asprintf(char **string, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
124 int xine_private_vasprintf(char **string, const char *format, va_list ap) __attribute__ ((format (printf, 2, 0)));
125 #if 0
126 int xine_private_asprintf(char **string, const char *format, ...) XINE_FORMAT_PRINTF(2, 3);
127 int xine_private_vasprintf(char **string, const char *format, va_list ap) XINE_FORMAT_PRINTF(2, 0);
128 #endif
129 #endif

(2). missing header file alloca.h

There are two files that are missing header file.
 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I../../include -I../../src -I../../src/xine-engine -I../../src/xine-engine -I../../src/xine-utils -I../../src/input -I../../src/input -I../../lib -I../../lib -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -mtune=i386 -O3 -pipe -fomit-frame-pointer -falign-functions=4 -falign-loops=4 -falign-jumps=4 -fexpensive-optimizations -fschedule-insns2 -ffast-math -finline-functions -Wall -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -g -O2 -DNDEBUG -MT xineplug_dmx_audio_la-demux_ac3.lo -MD -MP -MF .deps/xineplug_dmx_audio_la-demux_ac3.Tpo -c demux_ac3.c  -fPIC -DPIC -o .libs/xineplug_dmx_audio_la-demux_ac3.o
demux_ac3.c: In function `open_ac3_file':
demux_ac3.c:148: error: implicit declaration of function `alloca'
demux_ac3.c:148: warning: nested extern declaration of `alloca'
demux_ac3.c:153: warning: nested extern declaration of `alloca'
just include alloca.h :)
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I../../include -I../../src -I../../src/xine-engine -I../../src/xine-engine -I../../src/xine-utils -I../../src/input -I../../src/input -I../../lib -I../../lib -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -mtune=i386 -O3 -pipe -fomit-frame-pointer -falign-functions=4 -falign-loops=4 -falign-jumps=4 -fexpensive-optimizations -fschedule-insns2 -ffast-math -finline-functions -Wall -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -g -O2 -DNDEBUG -MT xineplug_dmx_audio_la-demux_dts.lo -MD -MP -MF .deps/xineplug_dmx_audio_la-demux_dts.Tpo -c demux_dts.c  -fPIC -DPIC -o .libs/xineplug_dmx_audio_la-demux_dts.o
demux_dts.c: In function `open_dts_file':
demux_dts.c:98: error: implicit declaration of function `alloca'
demux_dts.c:98: warning: nested extern declaration of `alloca'
demux_dts.c:103: warning: nested extern declaration of `alloca'
one more time, please.

(3). wrong path headerfile ffmpeg_config.h

gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../.. -I../../../../include -I../../../../include -I../../../../src -I../../../../src/xine-engine -I../../../../src/xine-engine -I../../../../src/xine-utils -I../../../../src/input -I../../../../src/input -I../../../../lib -I../../../../lib -DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DXINE_MPEG_ENCODER -D_ISOC9X_SOURCE -DCONFIG_DECODERS -I../../../../src/libffmpeg/libavutil -fno-strict-aliasing -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -mtune=i386 -O3 -pipe -fomit-frame-pointer -falign-functions=4 -falign-loops=4 -falign-jumps=4 -fexpensive-optimizations -fschedule-insns2 -ffast-math -finline-functions -Wall -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -g -O2 -DNDEBUG -MT dsputil_mlib.lo -MD -MP -MF .deps/dsputil_mlib.Tpo -c dsputil_mlib.c  -fPIC -DPIC -o .libs/dsputil_mlib.o
In file included from ../dsputil.h:33,
from dsputil_mlib.c:22:
../../../../src/libffmpeg/libavutil/common.h:361:27: ffmpeg_config.h: 해당 파일이나 디렉토리가 없음
In file included from ../../../../src/xine-engine/configfile.h:36,
from ../../../xine-utils/xineutils.h:45,
from dsputil_mlib.c:25:

open the file "./src/libffmpeg/libavutil/common.h" and edit include path

/* xine: another config.h with codecs to use */
#include "./src/libffmpeg/ffmpeg_config.h"

(4). dsputil_init_mlib

 gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../.. -I../../../include -I../../../include -I../../../src -I../../../src/xine-engine -I../../../src/xine-engine -I../../../src/xine-utils -I../../../src/input -I../../../src/input -I../../../lib -I../../../lib -DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DXINE_MPEG_ENCODER -D_ISOC9X_SOURCE -DCONFIG_DECODERS -I../../../src/libffmpeg/libavutil -I../../../src/libffmpeg -I../../../src/libffmpeg -fno-strict-aliasing -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -mtune=i386 -O3 -pipe -fomit-frame-pointer -falign-functions=4 -falign-loops=4 -falign-jumps=4 -fexpensive-optimizations -fschedule-insns2 -ffast-math -finline-functions -Wall -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -g -O2 -DNDEBUG -MT dsputil.lo -MD -MP -MF .deps/dsputil.Tpo -c dsputil.c  -fPIC -DPIC -o .libs/dsputil.o
In file included from dsputil.c:35:
snow.h: In function `w53_32_c':
snow.h:134: warning: no return statement in function returning non-void
snow.h: In function `w97_32_c':
snow.h:135: warning: no return statement in function returning non-void
dsputil.c: At top level:
dsputil.c:2547: warning: no previous prototype for 'ff_put_vc1_mspel_mc00_c'
dsputil.c: In function `dsputil_init':
dsputil.c:4131: error: implicit declaration of function `dsputil_init_mlib'
dsputil.c:4131: warning: nested extern declaration of `dsputil_init_mlib'

no declaration the function of dsputil_init_mlib find that function declaration and move to compilable define section :(

edit this file "./src/libffmpeg/libavcodec/dsputil.h"

(5). gcc: unrecognized option `-pthread'

-lpthread is right for Solaris :). just edit Makefile or configure file.

ok done :)

finally just gmake install and export LD_LIBRARY_PATH=/usr/local/lib for xine-ui~

Thank you very much :)

This blog copyright 2009 by Ilho Kim