'분류 전체보기'에 해당되는 글 8건

  1. Ubuntu 14.04 전용 EFL Build Script 1358
  2. [Error] /usr/bin/ld: skipping incompatible ...
  3. EFL and friends 1.11.0 beta 1
  4. "Bindings/python-efl" 빌드 이슈와 해결 방법
  5. -Wl,--no-as-needed 옵션
  6. Terminology 설정 초기화 방법과 재설치
  7. Ubuntu x86_64 에서 ia32-libs 설치
  8. GStreamer RTSP with RPi 9

Ubuntu 14.04 전용 EFL Build Script



우분투 14.04 에서 빠르고 편리하게 Enlightenment Core 를 빌드할 수 있는 스크립트이다.

git repository 를 통하여 clone 후 autotools 를 이용하여 빌드한다.

설치되는 Core 들은 다음과 같다.


· core/efl

· core/enlightenment 

· core/evas_generic_loaders 

· core/emotion_generic_players


다음은 선행으로 설치되어야 하는 필수 패키지들이다.


AERY@AFTERMATH.KR:~$ sudo apt-get install build-essential automake libtool ccache zlib1g-dev libfreetype6-dev libdbus-1-dev liblua5.1-0-dev g++ libxext-dev libxrender-dev libpng12-dev libxrandr-dev libfontconfig1-dev libxcb-shape0-dev libfribidi-dev libcurl4-openssl-dev libxcb-keysyms1-dev libjpeg-dev gettext autopoint libgif-dev libtiff5-dev libxp-dev libxtst-dev libgl1-mesa-dev libxinerama-dev libxdamage-dev libxcursor-dev libglib2.0-dev libxcomposite-dev libxss-dev libpulse-dev libsndfile-dev libudev-dev libblkid-dev libmount-dev libgstreamer1.0-dev check libgstreamer-plugins-base1.0-dev libbullet-dev libvlc-dev libluajit-5.1-dev git


필수 패키지 설치가 완료되었다면 아래 파일을 다운로드한다.


build.sh


chmod 로 권한을 준 후 실행한다.


AERY@AFTERMATH.KR:~$ chmod +x build.sh

AERY@AFTERMATH.KR:~$ ./build.sh


마지막으로 elementary_test 를 실행하여 아래와 같이 정상 동작하는지 최종 점검을 한다.




참고 사이트 : http://seoz.egloos.com/3936054


[Error] /usr/bin/ld: skipping incompatible ...


컴파일시 아래와 같은 오류가 발생하는 경우가 있다.


/usr/bin/ld: skipping incompatible (...) when searching for -l(...)

/usr/bin/ld: cannot find -(...)

collect2: ld returned 1 exit status


(...) 은 임의의 라이브러리 명이다.

해당 오류가 발생하는 원인은 크게 두가지가 있다.


첫번째로 해당 라이브러리가 존재하지 않거나 잘못된 위치를 참조하고 있을 수 있다.

-l 이 아니라 -L 인 경우를 포함해서 사소하고 다양한 이유로 ld 가 터지는 경우이다.

이 경우 locate 명령어 등을 통해 정확한 확인하고 없을 경우 설치한 후 다시 빌드한다.


두번째 경우는 조금 아차 싶은 문제이다.

Cross Compile 작업[각주:1] 시 해당 오류가 발생할 수 있다.

라이브러리 자체가 .so 또는 .o 같은 binary file 이기 때문에 ld 가 호환성 문제를 일으키는 것이다.

간단한 해결 방법은 gcc 실행시 -m32 옵션을 추가해주는 것이다. 

만약 Makefile 을 이용하고 있다면 CFLAGS[각주:2][각주:3](C++ 는 CXXFLAGS) 옵션에 -m32 를 추가하면 된다.

또는 ./configure CFLAGS="-m32" 등을 이용해서 Makefile 을 생성하면 될 것이다.


아키텍쳐 관련 옵션에 대해서는 최신 GCC 문서를 참고하는 것을 추천한다.

https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options





  1. 필자는 x86_64 환경에서 32bit 라이브러리를 참조할 때 해당 문제가 생겼다. [본문으로]
  2. 굳이 LDFLAGS 까지 사용할 필요는 없다. [본문으로]
  3. 예시: CFLAGS="-m32" [본문으로]

EFL and friends 1.11.0 beta 1

1.11.0 알파가 나온지 불과 3일만인 8월 4일 베타 버전이 공개되었다.

얼마 안가서 안정적인 정식 버전이 릴리즈될텐데 그 말은 곧 E19 정식 버전 릴리즈도 얼마 남지 않았다는 뜻이다.

E 유저로서 굉장히 반가운 소식이 아닐 수 없다. 아래는 공식 홈페이지에 올라온 글이다. 





A bunch of fresh new tarballs with our latest work waiting for your testing before we can go into the final stages of releases.


EFL, Elementary and friends 1.11 beta[각주:1] tarballs


Only a few days have pasted after alpha1 but we need to get back on track with our time schedule so here we have the beta1 tarballs. Updated changlogs below.


Download


Its getting a long post so the most important stuff upfront. Downloads. :-)


 LINK

 SHA256

 efl-1.11.0-beta1.tar.gz

 f6c33eebc55321cb4d4c7f80fc0b503c02e9c3e04190a037a9242fa809c0e735

 elementary-1.11.0-beta1.tar.gz

 200fc469f26740bfbed14431a91fbed9b97239a57c73a6a2aefa77fbc29ddebf

 emotion_generic_players-1.11.0-beta1.tar.gz

 5c1335bb047cdc597715b83fe6765febfb571fa4968d0e47909c32db75ee0380

 evas_generic_loaders-1.11.0-beta1.tar.gz

 e5e2d5fb044cd6b76ae2c2484f2ea4855f6a6fd392e7d12a62777b1b3273f9c0



What's New


EFL


Features:


Eolian: add support for typedefs.

Eolian/Generator: add support for implementation source file.

Eolian: add support of namespaces.

eina-tiler:add union, subtract, intersection, equal apis for tilers

Evas/Textblock: add support for ellipsis values

Eo: Add eo_finalize. A func that's called at the end of eo_add.

edje: Edje_Edit - add sounds list accessor.

edje: Edje_Edit - add edje_edit_part_copy function that copy parts within whole group.

edje: Edje_Edit - add edje_edit_part_pointer_mode functions.

evas: Evas_3D - Revision frustum culling.

edje: Edje_Edit - add edje_edit_part_precide_is_inside functions.

edje: Edje_Edit - add edje_edit_part_access functions.

edje: Edje_Edit - add edje_edit_group_orientation_set/_get.

edje: Edje_Edit - add edje_edit_part_multiline functions.

edje: Edje_Edit - add edje_edit_part_cursor_mode functions.

evas: Evas_3D - add .obj export/import.

evas: Evas_3D - add evas_box3_ray3_intersect and evas_box2_intersect_2d functions.

edje: Edje_Edit - add parameters to generate source code for part.

Evas ETC2: Add ETC2 encoder skeletton

Evas TGV: Add ETC2 support to the TGV saver

Evas ETC2: Implement T mode encoding

Evas ETC2: Implement H mode encoding

Evas ETC2: Implement Planar mode

Evas: Implement full ETC2 encoder

Ecore_Evas: add new API for unset the cursor from Ecore_Evas.

Elua: initial commit

Introducing Elua: an EFL-LuaJIT app runtime

edje: Edje_Edit - edje_edit_state_text_class_xet()

edje: Edje_Edit - edje_edit_state_text_text_source_xeg()

edje: Edje_Edit - add edje_edit_part_item_append functions.

edje: Edje_Edit - add edje_edit_state_minmul functions.

edje: Edje_Edit - edje_edit_state_text_repch_xet()

edje: Edje_Edit - edje_edit_state_text_size_range_min_max_xet()

Evas gl: Enable texture atlasses with ETC1/2

edje: Edje_Edit - add edje_edit_sound_sample_add() function that allows user to add new sound sample to collection

edje: Edje_Edit - edje_edit_sound_compression_rate_xet()

edje: Edje_Edit - add edje_edit_part_items_list_get.

Evas: Add encoding parameter to the savers

Eet: Add support for ETC2 encoding and decoding

Edje: Add support for ETC2 through LOSSY_ETC2 images

edje: Edje_Edit - add functions that allows user to set and get frequency value of tones in collection

edje: Edje_Edit - add edje_edit_part_item_source functions.

edje: Edje_Edit - add bunch of BOX and TABLE param get/set functions.

edje: Edje_Edit - edje_edit_part_select_mode_xet()

edje: Edje_Edit - edje_edit_sound_compression_type_xet()

edje: Edje_Edit - add edje_edit_state_map_light_xet()

edje: Edje_Edit - add edje_edit_part_item_align functions.

edje: Edje_Edit - add edje_edit_state_map_rotation_center_xet()

edje: Edje_Edit - add edje_edit_part_entry_mode_xet()

eolian: introducing a new lexer/parser

Introducing new lexer/parser for Eolian

edje: Edje_Edit - add API for missing map properties

edje: Edje_Edit - add edje_edit_part_item_del.

edje: Edje_Edit - add missed iterator and object deletion in _delete_play_actions() function

edje: Edje_Edit - add functions that provide the ability to set and get source for proxy parts state

edje: Edje_Edit - add edje_edit_sound_tone_add() function that allows user to add new tone to collection

eolian: introducing support for .eot files

eolian: new type API

Evas: Add DDS image file loader

Evas gl: Add support for S3TC textures (T5, T3, T1)

edje: Edje-Edit: edje_edit_state_map_perspective_xet()

edje_edit: Add edje_edit_part_item_aspect_mode functions.

edje_edit: Add edje_edit_state_map_point_color functions.

edje: Edje-Edit: edje_edit_state_map_on_xet()

evas: jpeg loader - support flip, transpose, transverse

edje: Edje_Edit - add edje_edit_part_item_weight functions.

edje: Edje_Edit - add edje_edit_part_item_spread functions.

eolian: new API for struct types

Evas TGV: Add support for ETC1+Alpha

Evas gl: Add support for ETC1+Alpha textures

Eet: Add support for ETC1+Alpha

new eina api/object - eina thread queues

ecore-drm: Add necessary headers for dbus and systemd-login

Merge branch 'devs/devilhorns/systemd'

edje embryo: Now supports get_anim_pos_map

efreet - add menu ref/unref calls and refcounting to try solve e issue

edje: Add dpi feature.

ecore animator - adjust ecore loop time when animtor ticks to be exact

add function to set ecore loop time


Fixes:


Eolian: fix generation when optimization is set.

recursively hide edje group objects on edje hide

Evas textblock: Fix wrong advance calculation when bidi is disabled.

Eo/evas events: Fix support of mixing legacy smart events and eo events.

evas loader - redo gif fix so it doesn't break everything

Evas: Remove invalid cast and fix warning/bug on windows

Win64: Fix a bunch of warnings

eina/file - revert 18be4c50d9990c82ed9ce4269b7820e61f772699

Eolian: Fix class look up.

Eolian: Fix bad behavior when the .eo is incorrect

evas: Examples - fix Evsa3D Eo classnames.

Evas textblock: Fix crash when cutting ligatures with formats. (T1308)

edje: Edje_Edit - fix edje_edit_part_source_set

Remove autogen.sh from the dist tarball.

eo: force zeroing memory on non Linux system.

edje: Edje_Edit - fix func edje_edit_state_text_source_set()

evas gl: distinguish between IMG and EXT MSAA extensions

evas/textblock: check item's type before returning result.

remove unnecessary second checks on validity

elua: Fix building of binary

eina-cxx: fix compilation error on clang in eina_thread.hh (T1328)

eina-cxx: fix compilation error on clang (T1328)

Evas textblock: Fix issue with edje fonts not being used. (T1331)

edje: Edje_Edit - some minor edits

configure: Add dl to edje libs

Evas/Textblock: Introduce PS deletion bug test and fix

edje: Edje_Edit - fix compiler warnings for edje_edit_part_item_source_get/set

ecore-evas-wayland: Remove useless variable.

ecore_win32: fix key events on Windows.

ecore: fix ecore main loop on Windows when number of objects is greater that MAXIMUM_WAIT_OBJECTS

eina: fix build on windows.

Documentation: adding missed documentation to edcref (map.color param)

evas/gl - fix to render grayscale with transparency format in gl backened.

ecore-evas: Fix cursor position getting reset to 0,0 when using ecore_evas_cursor_object_set

edje: textblock style loading changed

evas/gl: improve the rendering quality.

lz4: fix possible security issue.

jpeg loader: exif parsing bug fix

evas: fix jpeg loader rotation by metadata (exif)

lz4: fix shadow issue

configure.ac: Remove obsolete macros

evas - gl common - fix drop of image on cache hit in gl engine images

this fixes crazy french altgr setups that confuse binding masks (T1273)

edje_edit: adding @since 1.11

evas: gl_common fix make dist

ecore-drm: Shutdown ecore_event on udev error.

edje: Edje_Edit - fix Documentation generation error's and warning's

ethumb: fix setup related API problem

ethumb: support ETHUMB_THUMB_ORIENT_ORIGINAL without libexif

evas-engine-drm: Fix drm engine breakage from Frenchie

evas-engine-drm: Fix invalid variable check

ethumb: dbus reply message handling minor bug fix ("queue_remove" method call)

evas-engine-drm: Fix software_generic_update to use the correct size.

evas-engine-drm: Fix update of output buffer size

evas-engine-drm: Fix evas drm engine bufer depth

evas-engine-wayland-shm: Check for depth being INHERIT on reconfigure

edje: Edje_Edit - fix size memory calculating for realloc array of tweens.

ecore-evas: Fix missing drm engine in list

evil: fix mistaken check of returned value by mkdir.

eina: (Windows) fix creation of files with eina_file_open() in some cases

evas: mark the evas text object as dirty, when text style is changed.

ecore-drm: Fix trapping of SIGUSR1 for VT switching signals

Evas textblock: Fix memory leak

evas-wayland-shm: Free allocated rectangle after sending damages

ecore_evas_extn: do not double close fd in case of memory starvation. (CID1039885)

ecore_evas_extn: fix wrong plug image display after connect

ecore animator - this fixes suspended animators still waking up

ecore-evas - fix continual wakeups with unchanged canvases

ecore_x: don't go below 0. (T1467)

Evas textblock: Correct word start/end moving at new line or line begins with spaces


Elementary


Features:


elm_map: Add new elm_map_region_zoom_bring_in() API

Gengrid: Added horizontal item loop feature.

atspi: add AtspiText and AtspiEditableText interface support.

fileselector: Adding search entry for realtime filename search

panel: add scrollable feature

panel: add scrollable feature

gengrid: Added normal reorder type

toolbar: added selected and unselected smartcallbacks to toolbar.

elm win noblank property added - to disable screen blanking/saving


Fixes:


genlist: fixed wrong item focus set on item_focus_set API call.

scroller - emits the missed signals

elm win - if no ELM_DISPLAY is set, try more engines before giving up (T1294)

Remove autogen.sh from the dist tarball.

config: always create a themes directory for user.

po: Set all initial values for Language and Language-Team

win: fix borderless_set behavior

dnd: rotate dragwin if main window is rotated when draging

fix theme to not self-feed emit signals in a loop

fix check colorclasses for disabled text

elm object item: fix the comparison of eo class name in case of edje object.

fileselector: Make selected_set actually select the file

tooltip: corrected the typo in documentation of elm_object_tooltip_show

elm theme - fix wayland borders to be sized and colored correctly

transit - fix to adopt the tween_mode factor.

elementary: Don't segfault if we are not using an X11-compatible engine

list: call "selected" callback after set focus to the selected item

gengrid: corrected the reorder start and end evas smart callback call. Features:

elm_map: Add new elm_map_region_zoom_bring_in() API

Gengrid: Added horizontal item loop feature.

atspi: add AtspiText and AtspiEditableText interface support.

fileselector: Adding search entry for realtime filename search

panel: add scrollable feature

panel: add scrollable feature

gengrid: Added normal reorder type

toolbar: added selected and unselected smartcallbacks to toolbar.

elm win noblank property added - to disable screen blanking/saving


Fixes:


genlist: fixed wrong item focus set on item_focus_set API call.

scroller - emits the missed signals

elm win - if no ELM_DISPLAY is set, try more engines before giving up (T1294)

Remove autogen.sh from the dist tarball.

config: always create a themes directory for user.

po: Set all initial values for Language and Language-Team

win: fix borderless_set behavior

dnd: rotate dragwin if main window is rotated when draging

fix theme to not self-feed emit signals in a loop

fix check colorclasses for disabled text

elm object item: fix the comparison of eo class name in case of edje object.

fileselector: Make selected_set actually select the file

tooltip: corrected the typo in documentation of elm_object_tooltip_show

elm theme - fix wayland borders to be sized and colored correctly

transit - fix to adopt the tween_mode factor.

elementary: Don't segfault if we are not using an X11-compatible engine

list: call "selected" callback after set focus to the selected item

gengrid: corrected the reorder start and end evas smart callback call.

fix notification theme to not clip text

map: Add missing legacy API into legacy header

elc_naviframe: Fix warning caused by elm_obj_layout_signal_emit override function in naviframe

ctxpopup: fix arrow geometry set.

ctxpopup: Fix wrong popup size.

fix notification theme to not clip text

map: Add missing legacy API into legacy header

elc_naviframe: Fix warning caused by elm_obj_layout_signal_emit override function in naviframe

ctxpopup: fix arrow geometry set.

ctxpopup: Fix wrong popup size.


Evas Generic Loaders


Features:


Trying to port evas_generic_loaders to gstreamer1.0

Add in older gst 0.10 support in evas_generic_loaders


Fixes:


gst1 support fixed now to do argb properly

Remove autogen.sh from the dist tarball.

fix gst video loader in generic to have key actually work


Emotion Generic Players


No changes since version 1.10.0




  1. 원문에는 alpha 라고 적혀있어서 임의로 수정하였다. [본문으로]

"Bindings/python-efl" 빌드 이슈와 해결 방법


14년 7월 현재, python-efl을 Make 하면 다음과 같은 로그가 출력된다.


Checking for Eina: OK, found 1.10.99.26931>

Checking for Eo: OK, found 1.10.99.26931
Checking for Evas: OK, found 1.10.99.26931
Checking for Ecore: OK, found 1.10.99.26931
Checking for EcoreFile: OK, found 1.10.99.26931
Checking for EcoreInput: OK, found 1.10.99.26931
Checking for EcoreX: OK, found 1.10.99.26931
Checking for Ethumb: OK, found 1.10.99.26931
Checking for Ethumb_Client: OK, found 1.10.99.26931
Checking for Edje: OK, found 1.10.99.26931
Checking for Emotion: OK, found 1.10.99.26931
Checking for DBus: OK, found 1.2.0
Checking for Elementary: OK, found 1.10.99.10408
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/efl
copying efl/__init__.py -> build/lib.linux-x86_64-2.7/efl
creating build/lib.linux-x86_64-2.7/efl/utils
copying efl/utils/__init__.py -> build/lib.linux-x86_64-2.7/efl/utils
creating build/lib.linux-x86_64-2.7/efl/ecore
copying efl/ecore/__init__.py -> build/lib.linux-x86_64-2.7/efl/ecore
creating build/lib.linux-x86_64-2.7/efl/elementary
copying efl/elementary/__init__.py -> build/lib.linux-x86_64-2.7/efl/elementary
running build_ext
building 'eo' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/efl
creating build/temp.linux-x86_64-2.7/efl/eo
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DEFL_BETA_API_SUPPORT -Iinclude/ -I/usr/include/python2.7 -c efl/eo/efl.eo.c -o build/temp.linux-x86_64-2.7/efl/eo/efl.eo.o -I/usr/local/include/eo-1 -I/usr/local/include/eina-1/eina -I/usr/local/include/efl-1 -I/usr/local/include/eina-1
x86_64-linux-gnu-gcc: error: efl/eo/efl.eo.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 4


아래에서 4번째 줄을 보면 "efl.eo.c" 파일을 찾을 수 없다고 한다.

http://git.enlightenment.org/bindings/python/python-efl.git/tree/ 에 접속하면 Makefile 에 명시된 것과 달리 Git 저장소에는 여러 핵심 파일들이 누락되어 있는 상태다. 자세한 이유는 알 수 없지만 enlightenment 프로젝트의 Jenkins[각주:1]에 들어가보면 해당 파일들을 찾을 수 있다. 


python-efl의 최신 tarball 은 다음 주소에서 다운로드 받을 수 있다.

https://build.enlightenment.org/view/Base%20jobs/job/base_pyefl_build/lastSuccessfulBuild/artifact/dist/


해당 폴더를 python-efl 폴더에 그대로 덮어쓰면 정상적으로 빌드가 가능하다. 


  1. 형상관리툴, https://build.enlightenment.org/ [본문으로]

-Wl,--no-as-needed 옵션

ELF 파일 포맷에는 동적 라이브러리에 대한 의존성 태그가 포함되어 있으며, 다음과 같은 명령어들로 확인할 수 있다.


maeryo@aftermath.kr:~$ readelf -a "파일명" | grep NEED

maeryo@aftermath.kr:~$ ldd "파일명"


컴파일 시 -l 옵션을 이용하여 동적 라이브러리들을 링크할 때 실제로 참조하지 않는 라이브러리들은 ELF Dynamic Section에 기록되지 않는다.

최신 GCC 기준으로 기본값은 --as-needed 이며 실제 참조한 라이브러리만 기록하게 되는데, 경우에 따라서 반대의 경우가 필요한 상황이 있다.


다음은 간단한 예시이다.


/* test.c */

#include <stdio.h>

 int main() {

    printf("Hello World!\n");

    return 0;

 }


위와 같은 내용이 담긴 test.c 라는 소스 파일이 있다고 가정하겠다.


1. 일반


maeryo@aftermath.kr:~$ gcc -Wall test.c -o test

maeryo@aftermath.kr:~$ readelf -a test | grep NEED
  [ 8] .gnu.version_r VERNEED 0000000000400360 00000360 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000006ffffffe (VERNEED) 0x400360 0x000000006fffffff (VERNEEDNUM) 1
maeryo@aftermath.kr:~$ ldd test
linux-vdso.so.1 => (0x00007fff94520000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc7c2841000) /lib64/ld-linux-x86-64.so.2 (0x00007fc7c2c15000)


2. -lz 추가


maeryo@aftermath.kr:~$ gcc -Wall test.c -o test -lpthread -lz

maeryo@aftermath.kr:~$ readelf -a test | grep NEED
  [ 8] .gnu.version_r VERNEED 0000000000400360 00000360 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000006ffffffe (VERNEED) 0x400360 0x000000006fffffff (VERNEEDNUM) 1
maeryo@aftermath.kr:~$ ldd test
linux-vdso.so.1 => (0x00007fff94520000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc7c2841000) /lib64/ld-linux-x86-64.so.2 (0x00007fc7c2c15000)

3. -Wl,--no-as-needed 명령어와 -lz 사용시

maeryo@aftermath.kr:~$ gcc -Wall test.c -o test -Wl,--no-as-needed -lz

maeryo@aftermath.kr:~$ readelf -a test | grep NEED
  [ 8] .gnu.version_r VERNEED 0000000000400398 00000398 0x0000000000000001 (NEEDED) Shared library: [libz.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000006ffffffe (VERNEED) 0x400398 0x000000006fffffff (VERNEEDNUM) 1
maeryo@aftermath.kr:~$ ldd test
        linux-vdso.so.1 => (0x00007fffc703e000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb753bfc000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb75383c000) /lib64/ld-linux-x86-64.so.2 (0x00007fb753e27000)




Terminology 설정 초기화 방법과 재설치




칼슨 하이츨러가 개발한 Terminology 는 매우 화려하고 강력한 터미널 에뮬레이터이다. 

그러나 아직까지는 개발 초기라 여러 버그들이 존재한다. 

가령 video option 에서 투명을 선택하면 어플리케이션 자체가 먹통[각주:1]이 되어버린다. 

문제는 이 설정을 복구할 수 없어서 make uninstall 로 Terminology 자체를 제거하고 다시 

설치하여도 어딘가에 사용자 설정이 저장되어 있어서 고칠 방법이 없다는 것이다.




검색을 해보아도 보편화된 프로그램이 아니기에 마땅한 답변을 찾기가 어렵다.

그러나 해결 방법은 매우 간단하다. 

~/.config 폴더에 terminology 폴더를 제거하고 다시 설치하면 최초 설정으로 복구된다.


AERY@AFTERMATH.KR:~/terminology$ sudo make uninstall

AERY@AFTERMATH.KR:~/terminology$ rm -rf ~/.config/terminology

AERY@AFTERMATH.KR:~/terminology$ ./autogen.sh

AERY@AFTERMATH.KR:~/terminology$ make

AERY@AFTERMATH.KR:~/terminology$ sudo make install


  1. Terminology Ver 0.6.1 (Ubuntu 14.04 x86_64) [본문으로]

Ubuntu x86_64 에서 ia32-libs 설치



Ubuntu 13.10 Saucy Salamander 부터 Repository 에서 ia32-libs 가 사라져 패키지 설치가 까다로워졌다.

따라서 하위 버전의 Ubuntu Repository 를 추가하여야 정상적으로 설치가 가능하다.



* sudo 를 사용하지 않고 root 권한을 획득하여 입력하도록 한다.


AERY@AFTERMATH.KR:~$ sudo -i

AERY@AFTERMATH.KR:~$ cd /etc/apt/sources.list.d

AERY@AFTERMATH.KR:/etc/apt/sources.list.d$ echo "deb http://ftp.daum.net/ubuntu/ precise main restricted universe multiverse" >ia32-libs-precise.list

AERY@AFTERMATH.KR:/etc/apt/sources.list.d$ apt-get update; apt-get install ia32-libs


14년 1월 기준으로 13.04 Raring Ringtail 의 지원 기간이 끝남으로써 현재 사용 가능한 하위 버전은 

10.04 LTS(~ 15년 4월)와 12.04 LTS(~ 17년 4월) 이므로 Repository 추가시 버전의 코드명 입력에 주의하도록 한다.

GStreamer RTSP with RPi


0. 개요


 RTSP(real-time streaming protocol)란 실시간으로 음성이나 동화를 송수신하기 위한 통신

규약입니다. 오직 전송을 위한 프로토콜이므로 저장공간을 낭비하지 않으면서 고화질 영상을

빠르게 전송할 수 있는 장점이 있습니다. 단, 스트리밍을 지원하는 동영상 플레이어에서만 시

청이 가능하며, 스마트폰 어플 개발에서는 안드로이드가 기본적으로 RTSP를 지원합

니다. VLC를 통해서도 RTSP 스트리밍이 가능합니다만 지연 시간이 길다는 단점이 있습니다.

그러나 GStreamer를 이용하면 고해상도의 영상도 아주 빠른 속도로 스트리밍이 가능합니다.

본 강좌는 SSH에서의 명령어를 통한 방법입니다. 또한 USB 웹캠이 아닌 라즈베리파이

카메라 모듈을 기반으로 합니다.


1. GStreamer RTSP


앞서 GStreamer RTSP 서버 프로그램이 필요합니다. wget을 통해 압축파일을 저장하고 이를

풀어주도록 하겠습니다. 만약 링크로 받을 수 없다면 첨부파일을 통해 저장하신 후 ~/ 위치에 

저장해주십시오.



AERY@AFTERMATH.KR:~$ wget http://gstreamer.freedesktop.org/src/gst-rtsp/gst-rtsp-0.10.8.tar.bz2

--2013-08-17 19:15:29-- http://gstreamer.freedesktop.org/src/gst-rtsp/gst-rtsp-0.10.8.tar.bz2Resolving gstreamer.freedesktop.org (gstreamer.freedesktop.org)... 131.252.210.176Connecting to gstreamer.freedesktop.org (gstreamer.freedesktop.org)|131.252.210.176|:80... 

connected.HTTP request sent, awaiting response... 200 OKLength: 567670 (554K) [application/x-bzip2]Saving to: `gst-rtsp-0.10.8.tar.bz2'100%[================================>] 567,670 313K/s in 1.8s

2013-08-17 19:15:32 (313 KB/s) - `gst-rtsp-0.10.8.tar.bz2' saved [567670/567670]

AERY@AFTERMATH.KR:~$ bzip2 -d gst-rtsp-0.10.8.tar.bz2

AERY@AFTERMATH.KR:~$ tar xvf gst-rtsp-0.10.8.tar

AERY@AFTERMATH.KR:~$ cd gst-rtsp-0.10.8/

AERY@AFTERMATH.KR:~/gst-rtsp-0.10.8$


2. GStreamer-0.10 패키지 설치


서버 프로그램이 준비되었다면 라이브러리를 설치하도록 합니다. 명심하실 것은 본 서버는

GStreamer0.10 버전에서 작동합니다. GStreamer1.0 버전이 미리 설치되어있으시더라도 아래

명령어를 통하여 기본적인 필수 라이브러리를 설치합니다.



AERY@AFTERMATH.KR:~/gst-rtsp-0.10.8$ sudo apt-get install libglib2.0-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer-tools gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly


3. GStreamer RTSP 설치


패키지 설치가 끝나셨으면 본격적으로 컴파일을 시작합니다.


AERY@AFTERMATH.KR:~/gst-rtsp-0.10.8$ ./configure

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... no

checking for mawk... mawk

checking whether make sets $(MAKE)... yes

checking nano version... 0 (release)

checking whether to enable maintainer-specific portions of Makefiles... no

checking build system type... armv6l-unknown-linux-gnueabi

checking host system type... armv6l-unknown-linux-gnueabi

checking for style of include used by make... GNU

checking for gcc... gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables... 

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking dependency style of gcc... gcc3

checking for a sed that does not truncate output... /bin/sed

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for fgrep... /bin/grep -F

checking for ld used by gcc... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B

checking the name lister (/usr/bin/nm -B) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 1572864

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking for /usr/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... pass_all

checking for ar... ar

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm -B output from gcc object... ok

checking how to run the C preprocessor... gcc -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for dlfcn.h... yes

checking for objdir... .libs

checking if gcc supports -fno-rtti -fno-exceptions... no

checking for gcc option to produce PIC... -fPIC -DPIC

checking if gcc PIC flag -fPIC -DPIC works... yes

checking if gcc static flag -static works... yes

checking if gcc supports -c -o file.o... yeschecking if gcc supports -c -o file.o... (cached) yes

checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

checking whether NLS is requested... yes

checking for msgfmt... /usr/bin/msgfmt

checking for gmsgfmt... /usr/bin/msgfmt

checking for xgettext... /usr/bin/xgettext

checking for msgmerge... /usr/bin/msgmerge

checking for ld used by GCC... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for shared library run path origin... done

checking for CFPreferencesCopyAppValue... no

checking for CFLocaleCopyCurrent... no

checking for GNU gettext in libc... yes

checking whether to use NLS... yes

checking where the gettext function comes from... libc

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for VALGRIND... no

no

configure: Using Gst-RTSP source release as package name

configure: Using Unknown package origin as package origin

configure: Using GST_PKG_CONFIG_PATH = $(top_builddir)/pkgconfig

checking for gcc... (cached) gcc

checking whether we are using the GNU C compiler... (cached) yes

checking whether gcc accepts -g... (cached) yes

checking for gcc option to accept ISO C89... (cached) none needed

checking dependency style of gcc... (cached) gcc3

checking whether gcc and cc understand -c and -o together... yes

checking for valgrind... no

checking for gobject-introspection... no

checking whether to build gtk-doc documentation... no

checking for gtkdoc-check... no

checking for python... /usr/bin/python

checking for python version... 2.7

checking for python platform... linux2

checking for python script directory... ${prefix}/lib/python2.7/dist-packages

checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages

checking for python >= 2.3... okay

checking for headers required to compile python extensions... not found

checking for PYGOBJECT... no

checking for PYGST... no

checking for GLIB... yes

checking for GST... yes

configure: using GStreamer tools in /usr/bin

configure: using GStreamer plug-ins in /usr/lib/arm-linux-gnueabihf/gstreamer-0.10

configure: Using GStreamer Core Plugins in /usr/lib/arm-linux-gnueabihf/gstreamer-0.10

checking for GST_BASE... yes

checking for GST_PLUGINS_BASE... yes

configure: using GStreamer Base Plugins in /usr/lib/arm-linux-gnueabihf/gstreamer-0.10

configure: Using GStreamer Base Plugins in /usr/lib/arm-linux-gnueabihf/gstreamer-0.10

checking for GST_CHECK... yes

checking for check named check_pic - version >= 0.9.2... no

*** Could not run check test program, checking why...

*** The test program failed to compile or link. See the file config.log for

*** the exact error that occured.

checking for check named check - version >= 0.9.2... no

*** Could not run check test program, checking why...

*** The test program failed to compile or link. See the file config.log for

*** the exact error that occured.

configure: Using /usr/local/lib/gstreamer-0.10 as the plugin install location

checking to see if compiler understands -Wall... yes

checking to see if compiler understands -Wdeclaration-after-statement... yes

checking to see if compiler understands -Wvla... yes

checking to see if compiler understands -Wpointer-arith... yes

configure: set WARNING_CFLAGS to -Wall -Wdeclaration-after-statement -Wvla -Wpointer-arith

configure: set ERROR_CFLAGS to configure: Using autoaudiosink as default audio sink

configure: Using alsasrc as default audio source

configure: Using autovideosink as default video sink

configure: Using v4l2src as default video source

configure: Using goom as default visualizer

configure: creating ./config.status

config.status: creating Makefile

config.status: creating gst-rtsp.spec

config.status: creating common/Makefile

config.status: creating common/m4/Makefile

config.status: creating gst/Makefile

config.status: creating gst/rtsp-server/Makefile

config.status: creating examples/Makefile

config.status: creating tests/Makefile

config.status: creating bindings/Makefile

config.status: creating bindings/python/Makefile

config.status: creating bindings/python/codegen/Makefile

config.status: creating bindings/vala/Makefile

config.status: creating pkgconfig/Makefile

config.status: creating pkgconfig/gst-rtsp-server.pc

config.status: creating pkgconfig/gst-rtsp-server-uninstalled.pc

config.status: creating docs/Makefile

config.status: creating docs/version.entities

config.status: creating docs/libs/Makefile

config.status: creating config.h

config.status: config.h is unchanged

config.status: executing depfiles commands

config.status: executing libtool commands

config.status: executing po-directories commands


Configuration 

Version : 0.10.8 

Source code location : . 

Prefix : /usr/local 

Compiler : gcc 

Vala bindings : yes 

Python bindings: : no


Gst-rtsp-server configured. Type 'make' to build.


AERY@AFTERMATH.KR:~/gst-rtsp-0.10.8$

위와 같이 나왔다면 패키지 설치에 성공하신 겁니다. 마지막으로 make를 해줍니다.
(sudo make install은 하지 않습니다.)

AERY@AFTERMATH.KR:~/gst-rtsp-0.10.8$ make


4. 스트리밍


실행 순서는 다음과 같습니다. raspivid를 통해 카메라 모듈을 실행하고 gst-launch에서 인코

딩 및 영상 전송을 준비합니다. 여기까지는 GStreamer를 통해 영상을 스트리밍이 가능한 상태

입니다. 여기서 앞서 준비한 GStreamer RTSP를 이용합니다. 스트리밍에 사용할 실행 파일은

~/gst-rtsp-0.10.8/examples/test-launch 입니다.

단, gst-lauch 인자값에 포트 번호와 스트리밍의 포트는 별개입니다. 실제로 RTSP 규격은 554

번 또는 8554번 포트를 사용하며, 본 서버 프로그램은 8554번 포트를 사용합니다.



AERY@AFTERMATH.KR:~/gst-rtsp-0.10.8$ cd examples

AERY@AFTERMATH.KR:~/gst-rtsp-0.10.8/examples$ raspivid -t 0 -h 720 -w 1280 -fps 25 -b 2000000 -vf -hf -n -o - | gst-launch -v fdsrc ! h264parse ! gdppay ! tcpserversink host=127.0.0.1 port=5000 | ./test-launch "( tcpclientsrc host=127.0.0.1 port=5000 ! gdpdepay ! avdec_h264 ! rtph264pay name=pay0 pt=96 )"


별 다른 반응없이 카메라 모듈에 불이 들어왔다면 영상을 열어보도록 하겠습니다.
저는 다음팟플레이어를 사용하겠습니다.




Ctrl + U 를 눌러 '주소 열기'를 실행합니다.
주소형식은 RTSP://아이피:8554/test 입니다.




잠시동안의 로딩이 끝나고 영상이 스트리밍됩니다.




아두이노 듀에와 알피노가 보이네요. 
지연 시간은 약 0.4초 내외로 아주 빠릅니다.
스크린샷은 강좌를 위해 일부로 사이즈를 줄인 것이며, 실제로는 720p 입니다.

[테스트 영상]





다음은 스마트폰에서의 테스트입니다.
저는 널리 사용되는 MX 플레이어를 사용했습니다.

메뉴키를 눌러 '네트워크 스트림'을 열어 주소를 입력합니다.




스마트폰의 경우 PC와는 달리 로딩이 조금 더 지연될 수 있습니다.




5. Android Development Tools 에서의 RTSP


iOS의 경우에는 RTSP를 지원하지 않기 때문에 직접 라이브러리를 개발하셔야 사용이 가능합

니다. (RTSP를 지원하는 iOS 어플이 있긴 합니다. iOS는 HTTP 형식의 스트리밍을 지원합니다.)

그러나 안드로이드에서는 기본적으로 RTSP를 지원하므로 간편하게 개발이 가능합니다.

본 강좌는 라즈베리 파이 강좌이기 때문에 안드로이드 개발에 대한 내용은 생략하겠습니다.

(android.media.MediaPlayer 등에서 주소값을 rtsp:// 로 적으면 알아서 다해줍니다.)



[참고사이트]


o http://www.raspberrypi.org/phpBB3/viewtopic.php?f=43&t=49278