Showing posts with label gcc. Show all posts
Showing posts with label gcc. Show all posts

Saturday, May 23, 2015

OSX Yosemite

OSX Yosemite

OSX Yosemite


;; =================================================
;; εμαcs is ⎋[esc]⌘[meta]⌥[alt]⌃[ctrl]⇧[shift].
;; =================================================

This post is written with emacs org-mode.


이 문서는 emacs org-mode로 작성된 글입니다.


System Environments

Operating Systems

  • Main- : OS X Yosemite (10.10.3)
  • Sub- : Debian GNU/Linux Wheezy (7.8)
  • Server: Debian GNU/Linux Wheezy || Squeeze
  • Mobile: iOS 7.1.2

Hardware Systems

  • OSX installed : MacBook Pro(13-inch, Mid 2009) 2.53 GHz Intel Core 2 Duo
  • Debian installed : Zotac ZBOX ID12 Intel Atom D525

Yosemite

7-month-late upgrading to Yosemite has done after its release. It's not a good time to say something generally useful. I wanna make a few comments for particular things that are quite valuable to me, not to everyone.

Brief lists

My indispensable applications, such as Quicksilver, Aquamacs(2.5x), baram(Input Method), MATHEMATICA(8) are smoothly working and so is MacPorts for installation of LaTeX, gcc, etc. It would be a good start.

OK w/o any upgrade

  • Aquamacs 2.5x, Photoscape X 1.8, Skype 6.17x, TeamViewer 9, Acrobat 9, MATHEMATICA 8
  • baram (1.5.2), Quicksilver(1.2.2), Veusz(1.23), EzPlusforMac, AppCleaner, EasyFind, HandBrake, Max, MPlayer X, VLC, KeyCastr, Screeny, Sublime Text 2, BugsMusicDownloadManager, VirtualBox, ATOM, TextMate(2.0-β.7.1)
  • StartupSound diabled, source codes in Quicklook(⌘y or Spacebar)

Applications on top are of older versions, because of my personal purpose. There is no difficulty for using them in OSX Yosemite at all.1

The disabled OSX StartupSound is being as it was done in Mavericks. Color syntax for source codes in Quicklook(⌘y or Spacebar) of Finder or Quicksilver turns off at first. But it can be easily turned on by opening TextMate(2.0-β.7.1) once as it was done in Mavericks or earlier.

OK, but ugprade available or required

  • 1Password(5.3), DEVONThink(2.8.5), Skim(1.4.11), BibDesk(1.6.4), CyberDuck(4.7), Prizmo(3.1.2),
  • GPG, Trim Enabler
  • MacPorts: gcc

You could see an warning message like GPG mail is not compatible to Yosemite. It's gonna located in /incompatible applications. Solution is simple. After upgrading is done, you can download the GPG Suite for For OS X 10.10 Yosemite from the homepage and feely delete the older version. I did't turn off the trim before upgrading from Mavericks to Yosemite by means of Trim Enabler, but had no error fortunately. Trim turns off automatically and I could do it manually on via Trim Enabler in Yosemite.

LaTeX and gcc48 were installed in Mavericks via MacPorts. LaTeX sources turn out to be directly compilable by commands, pdflatex, xelatex, etc. But gcc does not. During compiling you could see an error message like gcc: warning: couldn't understand kern.osversion '14.3.0, even though MacPorts is upgraded and sudo port selfupdate is done in Terminal. It can be also easily resolved by installation of gcc49 via MacPorts. FYI) you may need to install gcc_select as well in order to link gcc to gcc-mp-4.9.

Newly installed

  • Java 1.6.0.jdk

Things annoying

  1. Default Font is disgusting. It has been well-known, but worse than my expectation. It literally disgusts me.
  2. tab[↹] key is not working in a dialog box for MATHEMATICA. It is supposed to be once All controls is selected under [System Preferences]->[Keyboard]->[Shortcuts] as the other else. MATHEMATICA is the only application that doesn't work. For the time being, the only option to use a keyboard stroke is use of shortcuts: ⌘d for "Don't save", ⌘r for "Replace", ⎋ for "Cancel", etc.
  3. Korean-spelling check is systemwidely dysfunctional. It is not an useful information for english-speaking people.

17381170424_84ac4c25b0_o.png

A dialog box in MATHEMATICA

요세미티(Yosemite)

무려 7개월이나 지나서 Yosemite 업그레이드를 했다. 너무 늦어서 유용한 정보를 포스팅하기는 어려울 것 같고, 많은 사람들이 쓰지는 않지만 나는 유용하게 쓰는 것들을 위주로 간단한 느낌을 적어보려한다.

간단한 리스트

나에게 없어서는 안될 Quicksilver, Aquamacs(2.5x), 바람입력기, MATHEMATICA(8), 등이 문제없이 작동하고, gcc, LaTeX, 등을 위한 MacPorts 동작도 무난하다. 우선 이것으로 한시름 놓을 수 있겠다.

바로 잘 동작하는 것들

  • Aquamacs 2.5x, Photoscape X 1.8, Skype 6.17x, TeamViewer 9, Acrobat 9, MATHEMATICA 8
  • 바람입력기(1.5.2), Quicksilver(1.2.2), Veusz(1.23), EzPlusforMac, AppCleaner, EasyFind, HandBrake, Max, MPlayer X, VLC, KeyCastr, Screeny, Sublime Text 2, BugsMusicDownloadManager, VirtualBox, ATOM, TextMate(2.0-β.7.1)
  • StartupSound diabled, source codes in Quicklook(⌘y or Spacebar)

맨위의 목록은 이유가 있어서 옛버전을 쓰는 것인데, Yosemite에서 잘 동작했다.2

OSX 시작음(StartupSound)은 Mavericks에서 했던데로 계속 무음으로 된다. Finder나 Quicksilver에서 Quicklook(⌘y or Spacebar)로 source codes를 볼 때 color syntax는 풀려서 안되다가, Mavericks에서 했던데로 TextMate(2.0-β.7.1)를 한 번 열면 잘 먹는다.

업그레이드를 요구하거나 가능한 것들

  • 1Password(5.3), DEVONThink(2.8.5), Skim(1.4.11), BibDesk(1.6.4), CyberDuck(4.7), Prizmo(3.1.2),
  • GPG, Trim Enabler
  • MacPorts: gcc

GPG mail은 Yosermite 설치 도중에 호환되지 않는다는 경고가 뜨고 /incompatible applications 아래에 남음. 따로 홈페이지에서 업그레이드 가능하고, 전버전은 지워버리면 된다. Mavericks에서 Trim Enabler로 Trim을 끄지 않고 Yosemite로 업그레이드했으나, 문제는 일으키지 않았다. Trim은 저절로 꺼졌으며, Trim Enabler로 Yosemite에서 다시 켤 수 있었다.

Mavericks에서 LaTeX과 gcc48을 MacPorts로 설치해서 쓰고 있었는데, Yosemite로 업그레이드 후에도 LaTeX(pdflatex, xelatex, etc)은 바로 쓸 수 있었다. LaTeX은 되면 손대지 않는 것이 상책이니 당분간(?) 그냥 쓸 것이다. 문제는 gcc인데, 컴파일시 에러를 토해냈다. MacPorts 업그레이드와 sudo port selfupdate 후에도 문제는 고쳐지지 않았으나, gcc49 설치로 깔끔하게 해결됐다. gcc_select 는 Mavericks에서 설치했었는데, 따로 설치하지 않아도 Yosemite에서 gcc가 gcc49 알아서 잘 찾더라.

새로 설치한 것(Newly installed)

  • Java 1.6.0.jdk

몇가지 구리구리한 것들

  1. 폰트 가독성이 토나온다. 얘기는 익히 들었으나 이 정도일 줄은 몰랐다. 말그대로 어지러워 토나온다.
  2. MATHEMATICA 대화 상자에서 tab[↹] 키가 먹지 않는다. 물론, [System Preferences]->[Keyboard]->[Shortcuts]에서 All controls 선택은 이미 설정했다. 다른 프로그램에서는 잘 동작하는데, 유독 MATHEMATICA만 그렇다. 현재로서는 키보드 단축키가 유일한 해결책으로 보인다. 이를테면, ⌘d for "Don't save", ⌘r for "Replace", ⎋ for "Cancel", etc.
  3. Aquamacs에서 한글 맞춤법검사가 이상 동작한다. 이건 비단 Aquamacs만의 문제 아니다. 다른 편집기에서도 같은 증상을 보이는 것으로 보아, 지금 쓰고 있는 hunspell 문제로 보이는데… 대안이 있나 모르겠다.

17381170424_84ac4c25b0_o.png

A dialog box in MATHEMATICA

17383243883_23068602f2_o.png

Korean in Aquamacs

17977305976_32c7546023_o.png

Korean in TextEdit

Epilog

사실 Mavericks를 잘 쓰고 있었고 내 MacBook Pro는 낡은데다 이미 너무 늦어서 Yosemite는 건너뛰려고 했었다. 개인적으로 안 좋은 일이 너무 많은 지난 일년을 정리하고, 앞인지 옆이지 모르지만 우선 좀 발을 떼보려는 수작으로 OS 업그레이드를 단행했다. 아직 뭔가 많이 달라진 것은 없지만, 기분은 새롭다.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Footnotes:

1

The recent versions of Aquamacs have a problem to use Korean. 2.5x is the latest version functioning with it. Photoscape X 1.8 has no commercial appearing. The others including an AppStore for Mac version keep showing commercial.

2

Aquamacs의 최신버전은 한글 사용에 문제가 있어서 2.5x를 유지하고 있고, Photoscape X는 AppStore for Mac 버전과 최신버전 모두 광고가 있어서 1.8을 유지하고 있다.


Created: 2015-05-24 Sun 01:46

Emacs 23.4.1 (Org mode 8.0.2)

Sunday, November 17, 2013

GCC in OS X Mavericks

GCC in OS X Mavericks

GCC in OS X Mavericks


;; =================================================
;; εμαcs is ⎋[esc]⌘[meta]⌥[alt]⌃[ctrl]⇧[shift].
;; =================================================

This post is written with emacs org-mode.

Operating System Environments

  • Main- : OS X Mavericks (10.9)
  • Sub- : Debian GNU/Linux Wheezy (7.2)
  • Server: Debian GNU/Linux Squeeze || Lenny
  • Mobile: iOS 7.0.4

Installation of GCC(gcc48) via MacPorts

GCC is the GNU Compiler Collection, including front ends for C, C++, Objective-C, Objective-C++, Fortran, and Java. In OS X Mavericks a sort of gcc is preinstalled, but it is based on the Clang. This preinstalled gcc is not fully compatible to GCC(GNU Compiler Collection). Moreover it can compile only C, C++, and Objective-C. I need a Fortran compiler.

Up to OS X Mountain Lion (10.8), GCC(GNU Compiler Collection) has been easily installed via MacPorts. However, in OS X Mavericks (10.9) a GCC(GNU Compiler Collection) port seems to be broken. A problem may be caused by the broken libgcc port that is the mainly dependent port of gcc43, gcc44, gcc45, gcc46, gcc47, gcc48. It cannot be installed via sudo port install libgcc. I don't fully understand why, but my conclusion is that any GCC(GNU Compiler Collection) is not possible to be installed via MacPorts in the usual way.

Fortunately I found a way around. It works!!! If you install the port py27-scipy, then GCC(GNU Compiler Collection), particularly gcc48, is going to be automatically installed. (see here.)

The versions of Xcode and MacPorts in my OS X Mavericks are

The proper version of MacPorts for Mavericks is required to be installed or re-installed.

Procedure in Bash shell (Terminal.app)

  1. Install Xcode command line tools.
    $xcode-select --install
    
  2. Update ports and install py27-scipy for gcc48 to be installed.1 Be patient. It takes about 2 hours.
    $sudo port selfupdate
    $sudo port install py27-scipy
    
  3. Set gcc to gcc48. gcc_select port is required. To see all variants of installed gcc, run the second line.2
    $sudo port install gcc_select
    $port select --list gcc
    $sudo port select gcc mp-gcc48
    $hash gcc
    $gcc --version
    

    10900062763_f192a02d82.jpg

  4. Clean up temporary files used in the middle of a port installation procedure.(Optional)3
    $sudo port -f uninstall inactive
    $sudo port -f clean --all all
    

HaPPy coding.

Epilog

Mavericks upgrade 후에 자동으로 깔리는 gcc는 적응이 안된다. C의 경우 options를 조정하면 어찌어찌 그 전에 짜 놓은 C codes를 돌릴 수도 있을 것 같기도 한데… 이렇게 돌린 계산 값의 신뢰도도 조금 우려되고… 어차피 Java나 Fortran을 돌리려면 GCC(GNU Compiler Collection)가 필요하다.

지난 Posts(OS X Mavericks, OS X Mavericks: list of compatible applications)에서 $sudo port selfupdate 가 먹히는 것만 보고 MacPorts가 동작한다고 썼는데, 제대로 쓰려면 현재(<2013-11-17 Sun>) 홈페이지에서 배포하는 MacPorts-2.2.1-10.9-Mavericks.pkg 를 받아 설치를 해야 한다. 그전 버전을 지울 필요는 없었다. 몇몇 ports가 깨져있어서 gcc48 같은 것이 바로 안 깔리는데, 지원자에 자원 봉사자들로 이루어진 MacPorts project를 욕할 생각은 없다. 오히려 고마울 뿐이며, py27-scipy 를 깔면 gcc48이 깔린다는 것을 알아낸 능력자 분께도 감사할 따름이다. Clang… Apple과 Google이 만든 compiler라… 이게 얼마나 좋은 지는 내가 평가할 수는 없지만, 나에게는 이 현상이 Apple이 끊임없이 보여주고 있는 지난 OS 지원 미비 혹은 중단 의 연장선으로 비춰진다.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Footnotes:

1

See Ref. #1.

2

See Ref. #2 and #3.

3

See Ref. #4.

Created: 2013-11-17 Sun 10:36

Emacs 23.4.1 (Org mode 8.0.2)

Validate XHTML 1.0

Wednesday, July 27, 2011

[Mac Life - 02] gcc4.5(c/c++/fortran)


gcc4.5 (c/c++/fortran)

gcc45는 The GNU compiler collection으로, C, C++, Objective-C, Objective-C++, Fortran, 그리고 Java 언어 compilers를 모두 포함있다.

다른 언어는 잘 모르겠고, C/C++ 과 Fortran은, 설치하고 나면
$gcc [target.c]
$gfortran [target.f]
로 compile할 수 있다.

여기서는 예를 들어 설명할 일이 있을 경우는 C/C++과 Fortran 만 들기로 하겠다. 다른 언어에 대해서는 무지하므로 용서를 구한다.

gcc collection을 Mac에 설치하는 방법은 여러 개가 있으나, 가장 깔끔하게 설치하는 방법은 MacPort를 이용하기를 추천한다.

gcc45설치 방법 in Snow Leopard :

  1. 인스톨DVD에 포함된 XCode를 설치한다.
  2. MacPort를 설치한다. <--- 지난 포스팅 참조,
  3. Bash Shell (terminal application)을 열고 아래 순서로 타이핑한다.

$sudo port install gcc45
$sudo port install gcc_select

설치에 시간이 꽤 소요되므로 참고 기다리자.

  1. XCode를 깔면 사실 gcc apple version이 깔린다. 새로 설치한 gcc45가 default로 동작하게 하기 위해서 아래와 같이 bash shell에 타이핑한다.

$gcc_select -l <--- 가능한 버전을 보여준다.
$gcc_select mp-gcc45 <--- gcc45로 설치한 버전(mp-gcc45)를 default로 정하는 명령

제대로 동작했는지 확인해 보기 위해서는 'gcc_select' command를 실행하기 전후의 gcc version을 아래와 같이 확인해 보면 된다.

$gcc –version
$gfortran –version




알아두면 좋은 사항들 :

XCode만 깔면 gcc apple version이 깔린다고 언급했는데, 사실 바로 C/C++는 최소한 compile 할 수 있다. 그러나 본래 GNU에서 배포하는 gcc compiler collection에는 fortran compiler도 함께 들어있는데 XCode에는 없다.

MacPort를 통해서 gcc45만 깔아도 전혀 문제는 없으나 쓰기에 다소 불편하다. 왜냐하면 여기서 제공되는 compiler 이름이 그냥 gcc와 gfortran이 아니라, 'gcc-mp-45' 와 'gfortran-mp-45' 라는 이름을 갖게 되는데, bash shell 차원에서 aliases를 만들어서 해결해도 되지만 혹시 업데이트라도 한다면 다시 aliases를 설정해줘야 하는 등의 불편함이 생긴다. 이를 쉽게 해결해 주는 것이 바로 gcc_select이다.



아래는 실제 bash shell(terminal)에서 보이는 화면의 일부이다.