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

  1. 2015.02.08 to be with you - Mr.big
  2. 2014.12.30 커피소년 - 장가갈 수 있을까
  3. 2014.01.23 dbus - 2
  4. 2014.01.15 dbus - 1
  5. 2014.01.06 Maroon5 - Sunday Morning
  6. 2014.01.04 김광석 - 먼지가 되어
  7. 2014.01.03 Homebrew 설치기 - 2
  8. 2014.01.02 Homebrew 설치기 - 1
  9. 2014.01.02 Build and using glib in Mac os - failed!
  10. 2013.12.29 김광석 - 서른즈음에

to be with you - Mr.big

2015. 2. 8. 23:00 from Music




Hold on little girl
Show me what he's done to you
Stand up little girl
A broken heart can't be that bad


When it's through, it's through
Fate will twist the both of you
So come on baby, come on over
Let me be the one to show you


I'm the one who wants to be with you
Deep inside I hope you feel it too
Waited on a line of greens and blues
Just to be the next to be with you


Build up your confidence
So you can be on top for once
Wake up, who cares about
Little boys that talk too much


I've seen it all go down
Your game of love was all rained out
So come on baby, come on over
Let me be the one to hold you


I'm the one who wants to be with you
Deep inside I hope you feel it too
Waited on a line of greens and blues
Just to be the next to be with you


Why be alone when we can be together baby?
You can make my life worthwhile
I can make you start to smile

When it's through, it's through


Fate will twist the both of you
Come on baby, come on over
Let me be the one to show you

I'm the one who wants to be with you


Deep inside I hope you feel it too
Waited on a line of greens and blues
Just to be the next to be with you

I'm the one who wants to be with you


Deep inside I hope you feel it too
Waited on a line of greens and blues
Just to be the next to be with you

Just to be the next to be with you

 


'Music' 카테고리의 다른 글

커피소년 - 장가갈 수 있을까  (0) 2014.12.30
Maroon5 - Sunday Morning  (0) 2014.01.06
김광석 - 먼지가 되어  (0) 2014.01.04
김광석 - 서른즈음에  (0) 2013.12.29
Bruno Mars - Just The Way You Are  (0) 2013.12.26
Posted by 스파게티코더 :




장가갈 수 있을까 장가갈 수 있을까
올해도 가는데 장가갈 수 있을까
누굴 만난다는 건 어려운 일이야
남들처럼 그렇게 장가 갈 수 있을까

내 친구들 하나 둘 씩 떠나가고
설마했던 그 친구마저 떠난다
운명적인 사랑도 잘 모르겠고
여자 맘은 진짜 진짜 모르겠다

장가갈 수 있을까 장가갈 수 있을까
통장 잔고 없는데 장가갈 수 있을까
누굴 만난다는 건 어려운 일이야
남들처럼 그렇게 장가갈 수 있을까


시집갈 수 있을까 시집갈 수 있을까
올해도 가는데 시집갈 수 있을까
누굴 만난다는 건 어려운 일이야
남들처럼 그렇게 시집갈 수 있을까

이러다 평생 혼자 사는 거 아냐
다시 사랑이란걸 할 수 있을까
소녀 같던 내 순수함 어디갔나
여자 맘은 나도 내가 모르겠다

장가갈 수 있을까 (시집갈 수 있을까) 
장가갈 수 있을까 (시집갈 수 있을까) 
올해도 가는데 (올해도 가는데)
장가갈 수 있을까 (시집갈 수 있을까) 
누굴 만난다는 건 (누굴 만난다는 건)
어려운 일이야 (어려운 일이야)
남들처럼 그렇게 (남들처럼 그렇게)
장가갈 수 있을까 (시집갈 수 있을까)

언젠간 우리도 장가갈거야 시집갈거야

우린 꼭 갈거야

'Music' 카테고리의 다른 글

to be with you - Mr.big  (0) 2015.02.08
Maroon5 - Sunday Morning  (0) 2014.01.06
김광석 - 먼지가 되어  (0) 2014.01.04
김광석 - 서른즈음에  (0) 2013.12.29
Bruno Mars - Just The Way You Are  (0) 2013.12.26
Posted by 스파게티코더 :

dbus - 2

2014. 1. 23. 23:32 from Code

http://spaghetticoder.tistory.com/entry/dbus-1


glib 에 포함되어 있는 gio 라이브러리 중에 gdbus를 이용하여

server 예제 소스를 간단히 작성한 후에 돌려보는데..


자꾸 on_name_lost callback 이 호출되며 정상적인 초기화가 이루어지지 않았다.

소스가 잘못되었나.. 한참을 보다가.. dbus daemon이 안떠있다는 사실을 알았다..


번뜩 생각난 사실! homebrew 로 dbus 설치할때 나타난 메시지가 뭐였더라..


If this is your first install, automatically load on login with:

    mkdir -p ~/Library/LaunchAgents

    cp /usr/local/Cellar/d-bus/1.6.18/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/

    launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist


If this is an upgrade and you already have the org.freedesktop.dbus-session.plist loaded:

    launchctl unload -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist

    cp /usr/local/Cellar/d-bus/1.6.18/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/

    launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist


To have launchd start d-bus at login:

    ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents

Then to load d-bus now:

    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.d-bus.plist


그렇다. 저 짓거리를 해줘야 되나보다.

나는 맥북에 처음 설치해줬으니까.. 맨 위에 4줄가량의 가이드를 따라해줘 보았다.


따라 했는데 안되잖아.. 재부팅해서 데몬 떴나 보아도 안떴잖아.. 우린 안될꺼야 아마 ㅠㅠ

우선 macosx 에서 dbus-daemon 을 어떻게 띄우는지 부터 살펴보아야 겠다.


오늘은 일단 포기. 졸립다. 자야겠다.

'Code' 카테고리의 다른 글

dbus - 1  (0) 2014.01.15
Homebrew 설치기 - 2  (0) 2014.01.03
Homebrew 설치기 - 1  (0) 2014.01.02
Build and using glib in Mac os - failed!  (0) 2014.01.02
bash shell script #1  (0) 2013.12.01
Posted by 스파게티코더 :

dbus - 1

2014. 1. 15. 23:38 from Code

시간이 나는 대로 IPC 에 관하여 정리하고자 한다.


IPC는 Inter Process Communication 의 약자로써 어쩌구 저쩌구..

자세한 설명은 생략하고 아래 링크로 대체한다.

http://ko.wikipedia.org/wiki/프로세스_간_통신


IPC 도구의 종류로는 대표적으로

1. File

2. Pipe

3. Socket

4. Semaphore

5. Shared memory


등등이 존재한다. 

위에 언급되어 있는 놈들은 Primitive 한 녀석들로, kernel 에서 대부분 제공해준다.

저런 애들은 학교에서 거의 배운 것들이고, 제대로 멋지게 사용하려면 심히 귀찮고 어려우니깐..

저것들을 이용해서 만들어 놓은 IPC 고급 구현들의 사용방법을 살펴보고자 한다.


http://techbase.kde.org/index.php?title=Development/Tutorials_(ko)#D-Bus

http://www.freedesktop.org/wiki/Software/dbus/

http://blog.naver.com/PostView.nhn?blogId=lovinghc&logNo=30028862971


위 링크들은 대표적인 고급 구현인 dbus 관련 문서들이다.

dbus 에 대해서 살펴볼 것이다.


우선 나의 맥북에서 dbus를 이용할 수 있는 환경을 만들 수 있는지.. 보자.


sanchoui-MacBook-Air:~ sancho$ brew search dbus

dbus-glib libdbusmenu-qt libmodbus dbus


있다. 과연 설치한 보람이 있는 homebrew 성님...

원조 dbus 와 그것의 glib wrapper 인 dbus-glib 이 존재한다. 두 개 모두 설치 고고씽.


sanchoui-MacBook-Air:~ sancho$ brew install dbus dbus-glib

==> Downloading http://dbus.freedesktop.org/releases/dbus/dbus-1.6.18.tar.gz

######################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/d-bus/1.6.18 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc --disable-xml-docs --disable-doxygen-docs --enable-launchd --with-launchd-agent-dir=/usr/

==> make

==> make install

==> Caveats

If this is your first install, automatically load on login with:

    mkdir -p ~/Library/LaunchAgents

    cp /usr/local/Cellar/d-bus/1.6.18/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/

    launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist


If this is an upgrade and you already have the org.freedesktop.dbus-session.plist loaded:

    launchctl unload -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist

    cp /usr/local/Cellar/d-bus/1.6.18/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/

    launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist


To have launchd start d-bus at login:

    ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents

Then to load d-bus now:

    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.d-bus.plist

==> /usr/local/Cellar/d-bus/1.6.18/bin/dbus-uuidgen --ensure=/usr/local/var/lib/dbus/machine-id

==> Summary

   /usr/local/Cellar/d-bus/1.6.18: 48 files, 2.3M, built in 62 seconds

==> Installing dbus-glib dependency: gettext

==> Downloading http://ftpmirror.gnu.org/gettext/gettext-0.18.3.2.tar.gz

######################################################################## 100.0%

==> Downloading patches

######################################################################## 100.0%

==> Patching

patching file gettext-tools/Makefile.in

Hunk #1 succeeded at 1551 (offset 51 lines).

==> ./configure --prefix=/usr/local/Cellar/gettext/0.18.3.2 --with-included-gettext --with-included-glib --with-included-libcroco --with-included-libunistring --with-emacs --disable-java --disable-csharp 

==> make

==> make install

==> Caveats

This formula is keg-only, so it was not symlinked into /usr/local.


OS X provides the BSD gettext library and some software gets confused if both are in the library path.


Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:


    LDFLAGS:  -L/usr/local/opt/gettext/lib

    CPPFLAGS: -I/usr/local/opt/gettext/include


==> Summary

   /usr/local/Cellar/gettext/0.18.3.2: 375 files, 12M, built in 3.5 minutes

==> Installing dbus-glib

==> Downloading http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.100.2.tar.gz

######################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/dbus-glib/0.100.2

==> make install

==> Caveats

Bash completion has been installed to:

  /usr/local/etc/bash_completion.d

==> Summary

   /usr/local/Cellar/dbus-glib/0.100.2: 38 files, 1.5M, built in 29 seconds


설치 메시지 중에 이상한 함정이 보이는 것 같다.

dbus 처음 설치하는 놈은 이러저러 해줘야 하고 login 시에 되게 하려면 어쩌구 저쩌구..

모르겠다. 졸립다. 다음 포스팅에~~



'Code' 카테고리의 다른 글

dbus - 2  (0) 2014.01.23
Homebrew 설치기 - 2  (0) 2014.01.03
Homebrew 설치기 - 1  (0) 2014.01.02
Build and using glib in Mac os - failed!  (0) 2014.01.02
bash shell script #1  (0) 2013.12.01
Posted by 스파게티코더 :

Maroon5 - Sunday Morning

2014. 1. 6. 22:13 from Music



Sunday morning rain is falling
Steal some covers share some skin
Clouds are shrouding us in moments unforgettable
You twist to fit the mold that I am in
But things just get so crazy living life gets hard to do
And I would gladly hit the road get up and go if I knew
That someday it would lead me back to you
That someday it would lead me back to you

That may be all I need
In darkness she is all I see
Come and rest your bones with me
Driving slow on Sunday morning
And I never want to leave

Fingers trace your every outline
Paint a picture with my hands
Back and forth we sway like branches in a storm
Change the weather still together when it ends

That may be all I need
In darkness she is all I see
Come and rest your bones with me
Driving slow on Sunday morning
And I never want to leave

But things just get so crazy even life gets hard to do
Sunday morning rain is falling and I'm calling out to you
Singing someday it'll bring me back to you
Find a way to bring myself back home to you

'Music' 카테고리의 다른 글

to be with you - Mr.big  (0) 2015.02.08
커피소년 - 장가갈 수 있을까  (0) 2014.12.30
김광석 - 먼지가 되어  (0) 2014.01.04
김광석 - 서른즈음에  (0) 2013.12.29
Bruno Mars - Just The Way You Are  (0) 2013.12.26
Posted by 스파게티코더 :

김광석 - 먼지가 되어

2014. 1. 4. 21:01 from Music



바하의 선율에 젖는 날이면 
잊었던 기억들이 피어 나네요

바람에 날려간 나의 노래도 
휘파람 소리로 돌아 오네요

내 조그만 공간 속에 추억만 쌓이고 
까닥모를 눈물 만이 아른거리네..

작은 가슴을 모두 모두와 
시를 써봐도 모자란 당신

먼지가 되어 
날아가야지

바람에 날려 당신 곁으로

작은 가슴을 모두 모두와 
시를 써봐도 모자란 당신

먼지가 되어 날아가야지 
바람에 날려 당신 곁으로

'Music' 카테고리의 다른 글

커피소년 - 장가갈 수 있을까  (0) 2014.12.30
Maroon5 - Sunday Morning  (0) 2014.01.06
김광석 - 서른즈음에  (0) 2013.12.29
Bruno Mars - Just The Way You Are  (0) 2013.12.26
이문세 - 옛사랑  (0) 2013.12.21
Posted by 스파게티코더 :

Homebrew 설치기 - 2

2014. 1. 3. 23:00 from Code

http://brew.sh


http://spaghetticoder.tistory.com/entry/Build-and-using-glib-in-Mac-os-failed

http://spaghetticoder.tistory.com/entry/Homebrew-설치기-1


자.. 이제 Homebrew 를 설치해보자.

위 링크에 가면 맨 아래쪽에 왠 ruby 명령어가 있다.

그대로 복사하며 터미널에 붙여 넣고 enter.


sanchoui-MacBook-Air:~ sancho$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

==> This script will install:

/usr/local/bin/brew

/usr/local/Library/...

/usr/local/share/man/man1/brew.1


Press ENTER to continue or any other key to abort

==> /usr/bin/sudo /bin/mkdir /usr/local


WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.


To proceed, enter your password, or type Ctrl-C to abort.


Password:

==> /usr/bin/sudo /bin/chmod g+rwx /usr/local

==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local

==> Installing the Command Line Tools (expect a GUI popup):

==> /usr/bin/sudo /usr/bin/xcode-select --install

xcode-select: note: install requested for command line developer tools

Press any key when the installation has completed.


그러면 xcode command line tool 이 설치되어 있지 않았다고 하면서 설치하라고 창이 뜬다.

가볍게 설치 버튼 누르고 계속 진행한다.


==> Downloading and installing Homebrew...

remote: Counting objects: 144698, done.

remote: Compressing objects: 100% (47500/47500), done.

Receiving objects:  42% (61625/144698), 11.97 MiB | 76.00 KiB/s   


그럼 왠 git repository 를 clone 하기 시작한다. 이거 뭐야 무서워..

약 3~4분 후에 완료되고 아래와 같이 나온다.


==> Downloading and installing Homebrew...

remote: Counting objects: 144698, done.

remote: Compressing objects: 100% (47500/47500), done.

remote: Total 144698 (delta 102505), reused 137250 (delta 96133)

Receiving objects: 100% (144698/144698), 21.46 MiB | 346.00 KiB/s, done.

Resolving deltas: 100% (102505/102505), done.

From https://github.com/Homebrew/homebrew

 * [new branch]      master     -> origin/master

HEAD is now at 745311b pyqt: patch handling of qmake inline comments.

==> Installation successful!

You should run `brew doctor' *before* you install anything.

Now type: brew help

sanchoui-MacBook-Air:~ sancho$ 


Installation successful?? 벌써 끝이란 말인가...

아무거나 install 하지말고 먼저 brew doctor 를 실행하란다. brew help 도 실행해보고.

brew help 부터 해볼까나.


sanchoui-MacBook-Air:~ sancho$ brew help

Example usage:

  brew [info | home | options ] [FORMULA...]

  brew install FORMULA...

  brew uninstall FORMULA...

  brew search [foo]

  brew list [FORMULA...]

  brew update

  brew upgrade [FORMULA...]

  brew pin/unpin [FORMULA...]


Troubleshooting:

  brew doctor

  brew install -vd FORMULA

  brew [--env | --config]


Brewing:

  brew create [URL [--no-fetch]]

  brew edit [FORMULA...]

  open https://github.com/Homebrew/homebrew/wiki/Formula-Cookbook


Further help:

  man brew

  brew home


여기서 FORMULA 라고 하는것은 brew 가 관리할 package name 이라고 보면 된다.

brew install/uninstall 은 FORMULA 설치 및 삭제로 보이고..
brew search 는 brew를 통해 설치 가능한 FORMULA 검색,
brew list 는 현재 설치된 FORMULA 리스팅???
brew update 는 homebrew 자체를 update 하는 것으로 보이고..
brew upgrade 는 FORMULA 를 update 하는 것 처럼 보인다.

이정도만 알아도 뭐 사용하는데는 문제 없어 보인다.
install 하기 전에 brew doctor 를 실행하라고 신신당부 하였으니 brew doctor 를 실행해 보자.

sanchoui-MacBook-Air:~ sancho$ brew doctor

Your system is ready to brew.

sanchoui-MacBook-Air:~ sancho$ 


나의 시스템은 brew를 사용할 준비가 되었단다.

자.. 이제 그럼 숙원 사업인 glib를 설치해보자 ㅠㅠ
일단 brew search 명령으로 glib을 검색해 보자.

sanchoui-MacBook-Air:~ sancho$ brew search glib

dbus-glib glib   glib-networking  glibmm     json-glib     taglib

sanchoui-MacBook-Air:~ sancho$ 


2번째에 애증의 glib이 보인다. brew install 명령으로 설치해주자.


sanchoui-MacBook-Air:~ sancho$ brew install glib

==> Installing dependencies for glib: xz, pkg-config, gettext, libffi

==> Installing glib dependency: xz

==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/xz-5.0.5.mavericks.bottle.2.tar.gz

######################################################################## 100.0%

==> Pouring xz-5.0.5.mavericks.bottle.2.tar.gz

   /usr/local/Cellar/xz/5.0.5: 58 files, 1.5M

==> Installing glib dependency: pkg-config

==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.28.mavericks.bottle.2.tar.gz

######################################################################## 100.0%

==> Pouring pkg-config-0.28.mavericks.bottle.2.tar.gz

   /usr/local/Cellar/pkg-config/0.28: 10 files, 604K

==> Installing glib dependency: gettext

==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gettext-0.18.3.1.mavericks.bottle.1.tar.gz

######################################################################## 100.0%

==> Pouring gettext-0.18.3.1.mavericks.bottle.1.tar.gz

==> Caveats

This formula is keg-only, so it was not symlinked into /usr/local.


OS X provides the BSD gettext library and some software gets confused if both are in the library path.


Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:


    LDFLAGS:  -L/usr/local/opt/gettext/lib

    CPPFLAGS: -I/usr/local/opt/gettext/include


==> Summary

   /usr/local/Cellar/gettext/0.18.3.1: 374 files, 12M

==> Installing glib dependency: libffi

==> Downloading http://mirrors.kernel.org/sources.redhat.com/libffi/libffi-3.0.13.tar.gz

######################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/libffi/3.0.13

==> make install

==> Caveats

This formula is keg-only, so it was not symlinked into /usr/local.


Mac OS X already provides this software and installing another version in

parallel can cause all kinds of trouble.


Some formulae require a newer version of libffi.


Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:


    LDFLAGS:  -L/usr/local/opt/libffi/lib


==> Summary

   /usr/local/Cellar/libffi/3.0.13: 13 files, 388K, built in 14 seconds


이 ㅅㅂ.. 내가 삽질한 작업들을 모두 자동으로.. 성공적으로 수행해 준다.

dependency 있는 library 들을 자동으로 찾아서 소스 다운받고 컴파일 하고 설치한다.. brew 짱짱맨 ㅠㅠ


==> Installing glib

==> Downloading http://ftp.gnome.org/pub/gnome/sources/glib/2.38/glib-2.38.2.tar.xz

######################################################################## 100.0%

==> Downloading patches

######################################################################## 100.0%

######################################################################## 100.0%

==> Patching

patching file aclocal.m4

Hunk #1 succeeded at 1580 (offset 15 lines).

patching file config.h.in

patching file configure

Hunk #2 succeeded at 27737 (offset 41 lines).

patching file configure.ac

Hunk #1 succeeded at 2683 (offset 1 line).

patching file gio/gdbusprivate.c

patching file gio/xdgmime/xdgmime.c

patching file gio/Makefile.am

patching file gio/Makefile.in

patching file gio/gnextstepsettingsbackend.c

patching file gio/gnextstepsettingsbackend.m

==> ./configure --disable-maintainer-mode --disable-silent-rules --disable-dtrace --disable-libelf --prefix=/usr/local/Cellar/glib/2.38.2 --localstatedir=/usr/local/var --with-gio-module-dir=/usr/local/li

==> make

==> make install

   /usr/local/Cellar/glib/2.38.2: 413 files, 17M, built in 99 seconds


dependency library 설치가 끝나고 애증의 glib 을 설치하기 시작한다.

허허 이렇게 간단할 줄이야.. 99초 걸렸단다. 99초.


자 그럼 간단히 hello 소스를 작성하고 실제로 glib을 링크 시켜 보자앗.


1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
#include <glib.h>
 
int main(int c, char **v)
{
    char *str = NULL;
    
    str = g_strdup("Hello world!");
    printf("%s\n", str);
 
    return 0;
}


간단히 g_strdup 이용해서 우리의 친구 Hello world 를 strdup 하고 출력한다.

pkg-config 도 설치 되었으니 pkg-config 이용해서 컴파일 해보자.


sanchoui-MacBook-Air:glib_test sancho$ gcc `pkg-config --cflags --libs glib-2.0` hello.c

sanchoui-MacBook-Air:glib_test sancho$ ./a.out 

Hello world!


굿 잡! 성공이다~!


오픈 소스를 받아서 직접 컴파일 하기란 쉽지가 않다.

아무리 dependency 라이브러리들이 명시가 되어있어도 하나하나 검색해서 소스 다운 받고 컴파일 하고.. 킹왕짱 노가다 작업이다.

우분투를 사용했을적에는 거긴 시스템이 워낙 잘되어 있으니.. 왠만한건 모두 패키징 되어 있고 받아다가 간단히 사용할 수 있다.

mac에서도 비슷한 녀석을 찾아서 다행이다. 



'Code' 카테고리의 다른 글

dbus - 2  (0) 2014.01.23
dbus - 1  (0) 2014.01.15
Homebrew 설치기 - 1  (0) 2014.01.02
Build and using glib in Mac os - failed!  (0) 2014.01.02
bash shell script #1  (0) 2013.12.01
Posted by 스파게티코더 :

Homebrew 설치기 - 1

2014. 1. 2. 22:05 from Code

나의 맥북에서 glib 빌드 실패 이후 생각해 보았다.

(http://spaghetticoder.tistory.com/entry/Build-and-using-glib-in-Mac-os-failed)

(솔직히 말하면 작성중이었던 실패기 - 쓰던 시각에는 실패기가 아니었다 - 를 짜증이 이빠이 나서 날려버리려고 하였으나,

실패의 기록도 기록이기에 남겨두었다. 괜히 영어로 썼다)


과연 macosx 에는 이런 dependecy 를 자동으로 관리해주고 이미 빌드되어 있는 녀석들을 제공해 주는,

말하자면 패키지 관리자(우분투, 데비안의 dpkg 처럼)는 없는지.


찾아보니 과연 있다. 유명한 녀석들이 3개쯤 보인다.


http://brew.sh

http://www.macports.org

http://www.finkproject.org


각각의 장단점이 있겠지만, 면밀한 조사 끝에 homebrew 를 설치하기로 했다.


처음엔 macport 를 설치하려 했지만 macport는 dependency package 들 중에, 

그것이 현재 platform 에 설치되어 있어도 지 맘대로 지 서버에서 가져와서 설치한단다.

그러면 나의 실패기와 무엇이 다르단 말인가.. library 버전 안맞아서 부팅도 안되는 상황이 또 발생할 수 있다.


Homebrew 홈페이지 가보니 xcode와 xcode command line utility 가 필요한 듯 보인다.

맥북을 초기화 하였으므로 이전에 설치했던 녀석들이 모조리 날아갔다. 다시 xcode 설치해야한다.


귀찮다.. 설치 걸어두고 자야겠다. 피곤하다.

본격적인 설치기는 2편에서.. 


'Code' 카테고리의 다른 글

dbus - 2  (0) 2014.01.23
dbus - 1  (0) 2014.01.15
Homebrew 설치기 - 2  (0) 2014.01.03
Build and using glib in Mac os - failed!  (0) 2014.01.02
bash shell script #1  (0) 2013.12.01
Posted by 스파게티코더 :

Reference - https://developer.gnome.org/glib/stable/glib-building.html


1. Downloading glib code.

http://ftp.gnome.org/pub/gnome/sources/glib/


2. Extract the archive and run ./configure

sanchoui-MacBook-Air:glib-2.39.2 sancho$ ./configure

....

configure: error: in `/Users/sancho/Downloads/glib-2.39.2':

configure: error: The pkg-config script could not be found or is too old.  Make sure it

is in your PATH or set the PKG_CONFIG environment variable to the full

path to pkg-config.


Alternatively, you may set the environment variables LIBFFI_CFLAGS

and LIBFFI_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.


To get pkg-config, see <http://pkg-config.freedesktop.org/>.

See `config.log' for more details


There is no pkg-config.. we need to find and install it.



2-1. Download pkg-config code and install


http://www.freedesktop.org/wiki/Software/pkg-config/

http://pkgconfig.freedesktop.org/releases/


sanchoui-MacBook-Air:pkg-config-0.28 sancho$ ./configure 

...

checking for GLIB... no

configure: error: Either a previously installed pkg-config or "glib-2.0 >= 2.16" could not be found. Please set GLIB_CFLAGS and GLIB_LIBS to the correct values or pass --with-internal-glib to configure to use the bundled copy.


shit.. we should use the glib in pkg-config source internally to build it. 

sanchoui-MacBook-Air:pkg-config-0.28 sancho$ ./configure --with-internal-glib

sanchoui-MacBook-Air:pkg-config-0.28 sancho$ make

sanchoui-MacBook-Air:pkg-config-0.28 sancho$ sudo make install

sanchoui-MacBook-Air:pkg-config-0.28 sancho$ pkg-config 

Must specify package names on the command line


success.. let's retry ./configure in glib source directory.

sanchoui-MacBook-Air:glib-2.39.2 sancho$ ./configure

...

checking for LIBFFI... no

configure: error: Package requirements (libffi >= 3.0.0) were not met:


No package 'libffi' found


shit...... what the libffi???
I don't know it even if read below link but we should install it to build fucking glib.


2-2. Download libffi code and install


http://sourceware.org/libffi/


sanchoui-MacBook-Air:libffi-3.0.13 sancho$ ./configure

sanchoui-MacBook-Air:libffi-3.0.13 sancho$ make

sanchoui-MacBook-Air:libffi-3.0.13 sancho$ sudo make install


success without any exception! let's retry again ./configure in glib source directory..

sanchoui-MacBook-Air:glib-2.39.2 sancho$ ./configure 

...

configure: error: 

*** You must have either have gettext support in your C library, or use the

*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html


fucking gettext.. go to the above link and download the source and build and install it.

2-3. Download gettext and install


sanchoui-MacBook-Air:gettext-0.18.3.1 sancho$ ./configure 

sanchoui-MacBook-Air:gettext-0.18.3.1 sancho$ make

sanchoui-MacBook-Air:gettext-0.18.3.1 sancho$ sudo make install


Good. Fortunately, success without any error. If it is, I would stop this fucking build!

Let's retry again ./configure in glib source directory :)

sanchoui-MacBook-Air:glib-2.39.2 sancho$ ./configure 

...

checking for libintl.h... no

configure: error: 

*** You must have either have gettext support in your C library, or use the

*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html


fuck!!!! I installed it!!!!! hmm.. what's the problem? Once, I checked the location of libintl.h

sanchoui-MacBook-Air:glib-2.39.2 sancho$ find /usr -name "libintl.h"

/usr/local/include/libintl.h

find: /usr/sbin/authserver: Permission denied


It is in /usr/local/include. Once, I checked the config.log and found the problem like below.

 639 configure:7963: checking libintl.h usability

 640 configure:7963: gcc -c -g -O2  conftest.c >&5

 641 conftest.c:66:10: fatal error: 'libintl.h' file not found

 642 #include <libintl.h>

 643          ^

 644 1 error generated.

 645 configure:7963: $? = 1


shit.... this stupid configure script operated the gcc without -I option.
hmm.. remove the gettext installed just before and install newly with prefix /usr.

sanchoui-MacBook-Air:gettext-0.18.3.1 sancho$ ./configure --prefix=/usr

sanchoui-MacBook-Air:gettext-0.18.3.1 sancho$ make

sanchoui-MacBook-Air:gettext-0.18.3.1 sancho$ sudo make install


I checked the libintl.h in /usr/include.

sanchoui-MacBook-Air:gettext-0.18.3.1 sancho$ ls -al /usr/include/libintl.h 

-rw-r--r--  1 root  wheel  16654 12 31 22:34 /usr/include/libintl.h


Ok, let's retry ./configure again in glib source directory.

sanchoui-MacBook-Air:glib-2.39.2 sancho$ ./configure 

...

checking for libintl.h... no

configure: error: 

*** You must have either have gettext support in your C library, or use the

*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html


failed...... :( what's the problem? default include path?

I set the default include path like below and retry configure.

sanchoui-MacBook-Air:Downloads sancho$ declare -x C_INCLUDE_PATH="/usr/include/"

sanchoui-MacBook-Air:glib-2.39.2 sancho$ ./configure 

...

checking for libintl.h... yes

checking for ngettext in libc... no

checking for bindtextdomain in -lintl... no

checking if -liconv is needed to use gettext... 

checking for ngettext in -lintl... no

configure: error: 

*** You must have either have gettext support in your C library, or use the

*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html


fortunately, it found the libintl.h but there is library dependency problem.

libiconv may be required to link gettext. This problem was already mentioned in glib manual page.


2-4. Download iconv and install it.


http://www.gnu.org/software/libiconv/


sanchoui-MacBook-Air:libiconv-1.14 sancho$ ./configure --prefix=/usr

sanchoui-MacBook-Air:libiconv-1.14 sancho$ make

sanchoui-MacBook-Air:libiconv-1.14 sancho$ make install


retry configure in glib directory.

sanchoui-MacBook-Air:glib-2.39.2 sancho$ ./configure --prefix=/usr

...

checking for LIBFFI... no

configure: error: in `/Users/sancho/Downloads/glib-2.39.2':

configure: error: The pkg-config script could not be found or is too old.  Make sure it

is in your PATH or set the PKG_CONFIG environment variable to the full

path to pkg-config.


Alternatively, you may set the environment variables LIBFFI_CFLAGS

and LIBFFI_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.


To get pkg-config, see <http://pkg-config.freedesktop.org/>.

See `config.log' for more details


But......

libcups2 could not find a symbol in iconv, so pkg-config was not be operated!!!

Furthermore, some applications were not be launched normally also..

I guessed that the version of iconv just installed is improper with libcups2 in my macbook..


I rebooted my macbook and checked it could not be booted also. :(

Eventually I initialized again my macbook. shit.



'Code' 카테고리의 다른 글

dbus - 2  (0) 2014.01.23
dbus - 1  (0) 2014.01.15
Homebrew 설치기 - 2  (0) 2014.01.03
Homebrew 설치기 - 1  (0) 2014.01.02
bash shell script #1  (0) 2013.12.01
Posted by 스파게티코더 :

김광석 - 서른즈음에

2013. 12. 29. 17:16 from Music




또 하루 멀어져간다
내 뿜은 담배연기처럼
작기만한 내 기억속에
무얼채워 살고 있는지

점점 더 멀어져간다
머물러 있는 청춘인줄 알았는데
비워가는 내 가슴속에
더 아무것도 찾을 수 없네

계절은 다시 돌아 오지만
떠나간 내 사랑은 어디에

내가 떠나 보낸것도 아닌데
내가 떠나온것도 아닌데

조금씩 잊혀져간다
머물러 있는 사랑인줄 알았는데

또 하루 멀어져간다
매일 이별하며 살고 있구나
매일 이별하며 살고 있구나

점점 더 멀어져간다
머물러 있는 청춘인줄 알았는데
비워가는 내 가슴속엔
더 아무것도 찾을 수 없네

계절은 다시 돌아오지만
떠나간 내사랑은 어디에

내가 떠나 보낸것도 아닌데
내가 떠나온것도 아닌데

조금씩 잊혀져간다
머물러 있는 사랑인줄 알았는데

또하루 멀어져 간다
매일 이별하며 살고 있구나

매일 이별하며 살고 있구나

'Music' 카테고리의 다른 글

Maroon5 - Sunday Morning  (0) 2014.01.06
김광석 - 먼지가 되어  (0) 2014.01.04
Bruno Mars - Just The Way You Are  (0) 2013.12.26
이문세 - 옛사랑  (0) 2013.12.21
뜨거운 감자 - 고백  (0) 2013.12.21
Posted by 스파게티코더 :