suztomoの日記

2014-11-14

[]ニューヨーク転勤

2011年4月からちょうど3年半働いていた東京オフィスを離れて、2014年10月にアメリカの本社の同じチームに転勤しました。

Untitled

正確にはNew York Cityの隣のJersey Cityというところで働いています。New Yorkと言ったほうがわかりやすいのでNew Yorkに転勤と言っています。

東京のチームは小さかったので、会社内でうちのチームが提供している社内システムのサポートと開発を半々ぐらいにやっていました。うちのチームの東京オフィスはずいぶん特殊で、「広く浅く」業務の端から端まで見渡して、ユーザが困っているところを助けたり、PerlやJavaでいろいろなものを実装していました。労働環境は素晴らしく、同僚や同期にも恵まれてとても充実した社会人生活を送っていましたが、より「狭く深く」ソフトウェア開発業務に専念したいという思いがありました。

このことをしばらく前から東京やNew Yorkにいる上司に相談していて、このたび本社のチームの都合がつくとのことで転勤となりました。これまで主に電話でやりとりしていたチームメイトと対面でプロダクトのデザインやトラブルシューティングのことを話すことができ非常に働きやすいです。生活面でもドル建ての銀行口座やクレジットカードを作ったり、レストランの注文が意味不明だったり、部屋を契約したりとずっと日本で生活してきた自分にとって新鮮なことばかりで楽しいです。

この年になりながら日々新しいことに挑戦できるのは幸せなことです。頑張ります。

はてなスターやWishlistでの応援大歓迎です。

Suztomo New York Survival List

2013-03-04

Qiita寿司

おいしかったです。更なる発展を祈ってクッションを送っておきました。

http://atnd.org/events/37386

2013-01-01

2013年目標

ダイエットで健康診断で再検査なしを目指す

ちゃんとKaggleをやる

Kaggleで勝つ

仕事以外でお金儲けする(いいものを作って対価を得る). 考えて実装して、会社の承認など含めてです

Arduinoで飛ぶものを作る

2012年まとめ

特に大したことできませんでした。仕事に慣れてきた(良いことか悪いことかはともかく)こと、ローマとオーストラリアに行けたことぐらいだと思います。

趣味のウェブサービスは公開してないですが動くものを作って自分で使ってみたら面白くなかったです。

2012-06-16

[]clckwrksの続き

今回ようやく上の画像までたどり着けます。

iconvのfile was built for unsupported file format which is not the architecture being linked (i386)のwarningは"+universal"を付けてやればいいぽいので、

sudo port install gd2 +universal                                             
sudo port install file +universal

で気を取り直して

clckwrks/clckwrks-plugin-media $ cabal install
...
Installing library in
/Users/suztomo/Library/Haskell/ghc-7.4.1/lib/clckwrks-plugin-media-0.2.2/lib
Registering clckwrks-plugin-media-0.2.2...
Updating documentation index /Users/suztomo/Library/Haskell/doc/index.html

次はclckwrks-plugin-bugsディレクトリでcabal install

~/Documents/.../clckwrks/clckwrks-plugin-bugs $ cabal install                  
Resolving dependencies...
Linking ./dist/setup/setup ...
Undefined symbols:
  "_iconv_close", referenced from:
      _hs_iconv_close in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _hs_iconv_close)
  "_iconv", referenced from:
      _hs_iconv in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _base_GHCziIOziEncodingziIconv_iconvEncoding5_info, _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding3_info , _hs_iconv_close )
  "_iconv_open", referenced from:
      _hs_iconv_open in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _hs_iconv_open)
ld: symbol(s) not found
collect2: ld returned 1 exit status
cabal: Error: some packages failed to install:
clckwrks-plugin-bugs-0.2.4 failed during the configure step. The exception
was:
ExitFailure 1

iconv_openがないようです。GHC 6.12.2 on Mac OS X from GHC-6.12.2-i386.pkg fails with ”Undefined symbols: ”_iconv_close”, referenced from: _hs_iconv_close in libHSbase-4.2.0.1.a(iconv.o)を見るに/usr/libと/opt/local/libにlibiconv.dylibというファイルがあって、後者には_iconv_openというシンボルがないので、LIBRARY_PATHを/usr/libにしてやります。

suztomo@SuzBookPro.local ~/Documents/LanguageStudy/Haskell/clckwrks/clckwrks/clckwrks-plugin-bugs
~/Documents/.../clckwrks/clckwrks-plugin-bugs $ export LIBRARY_PATH=/usr/lib 
suztomo@SuzBookPro.local ~/Documents/LanguageStudy/Haskell/clckwrks/clckwrks/clckwrks-plugin-bugs
~/Documents/.../clckwrks/clckwrks-plugin-bugs $ cabal install               
Resolving dependencies...
Linking ./dist/setup/setup ...
Configuring clckwrks-plugin-bugs-0.2.4...
Building clckwrks-plugin-bugs-0.2.4...
Preprocessing library clckwrks-plugin-bugs-0.2.4...
[ 1 of 14] Compiling Paths_clckwrks_plugin_bugs ( dist/build/autogen/Paths_clckwrks_plugin_bugs.hs, dist/build/Paths_clckwrks_plugin_bugs.o )
[ 2 of 14] Compiling Clckwrks.Bugs.Types ( Clckwrks/Bugs/Types.hs, dist/build/Clckwrks/Bugs/Types.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package magic-1.0.8 ... <command line>: can't load .so/.DLL for: libmagic.dylib (dlopen(libmagic.dylib, 9): image not found)
cabal: Error: some packages failed to install:
clckwrks-plugin-bugs-0.2.4 failed during the building phase. The exception
was:
ExitFailure 1

でもこれだと/opt/local/libにいれたlibmagic.dylibをさがせないので

export LIBRARY_PATH=/usr/lib:/opt/local/lib

してやります。

Documentation created: dist/doc/html/clckwrks-plugin-bugs/index.html
Installing library in
/Users/suztomo/Library/Haskell/ghc-7.4.1/lib/clckwrks-plugin-bugs-0.2.4/lib
Registering clckwrks-plugin-bugs-0.2.4...
Updating documentation index /Users/suztomo/Library/Haskell/doc/index.html

clckworks-plugin-bugsをインストールできました。

次はclckwrks-theme-clckwrksです

~/Documents/.../clckwrks/clckwrks-theme-clckwrks $ cabal install                              
Resolving dependencies...
In order, the following will be installed:
clckwrks-theme-clckwrks-0.1.18 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
[1 of 1] Compiling Main             ( Setup.hs, dist/setup/Main.o )
Linking ./dist/setup/setup ...
Undefined symbols:
  "_iconv_close", referenced from:
      _hs_iconv_close in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _hs_iconv_close)
  "_locale_charset", referenced from:
      _localeEncoding in libHSbase-4.5.0.0.a(PrelIOUtils.o)
  "_iconv", referenced from:
      _hs_iconv in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _base_GHCziIOziEncodingziIconv_iconvEncoding5_info, _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding3_info , _hs_iconv_close )
  "_iconv_open", referenced from:
      _hs_iconv_open in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _hs_iconv_open)
ld: symbol(s) not found
collect2: ld returned 1 exit status
cabal: Error: some packages failed to install:
clckwrks-theme-clckwrks-0.1.18 failed during the configure step. The exception
was:
ExitFailure 1

export LIBRARY_PATH=/usr/libしてやると動きました。

~/Documents/.../clckwrks/clckwrks-theme-clckwrks $ cabal install               
Resolving dependencies...
In order, the following will be installed:
clckwrks-theme-clckwrks-0.1.18
Linking ./dist/setup/setup ...
Configuring clckwrks-theme-clckwrks-0.1.18...
Building clckwrks-theme-clckwrks-0.1.18...
Preprocessing library clckwrks-theme-clckwrks-0.1.18...
[1 of 5] Compiling Paths_clckwrks_theme_clckwrks ( dist/build/autogen/Paths_clckwrks_theme_clckwrks.hs, dist/build/Paths_clckwrks_theme_clckwrks.o )
[2 of 5] Compiling Theme.Template   ( Theme/Template.hs, dist/build/Theme/Template.o )
[3 of 5] Compiling Theme.Home       ( Theme/Home.hs, dist/build/Theme/Home.o )
[4 of 5] Compiling Theme.Page       ( Theme/Page.hs, dist/build/Theme/Page.o )
[5 of 5] Compiling Theme.Blog       ( Theme/Blog.hs, dist/build/Theme/Blog.o )
[1 of 5] Compiling Paths_clckwrks_theme_clckwrks ( dist/build/autogen/Paths_clckwrks_theme_clckwrks.hs, dist/build/Paths_clckwrks_theme_clckwrks.p_o )
[2 of 5] Compiling Theme.Template   ( Theme/Template.hs, dist/build/Theme/Template.p_o )
[3 of 5] Compiling Theme.Home       ( Theme/Home.hs, dist/build/Theme/Home.p_o )
[4 of 5] Compiling Theme.Page       ( Theme/Page.hs, dist/build/Theme/Page.p_o )
[5 of 5] Compiling Theme.Blog       ( Theme/Blog.hs, dist/build/Theme/Blog.p_o )
Registering clckwrks-theme-clckwrks-0.1.18...
Running Haddock for clckwrks-theme-clckwrks-0.1.18...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: rts-1.0
Preprocessing library clckwrks-theme-clckwrks-0.1.18...
Haddock coverage:
   0% (  0 /  4) in 'Paths_clckwrks_theme_clckwrks'
   0% (  0 /  3) in 'Theme.Template'
   0% (  0 /  3) in 'Theme.Home'
   0% (  0 /  2) in 'Theme.Page'
   0% (  0 /  4) in 'Theme.Blog'
Documentation created: dist/doc/html/clckwrks-theme-clckwrks/index.html
Installing library in
/Users/suztomo/Library/Haskell/ghc-7.4.1/lib/clckwrks-theme-clckwrks-0.1.18/lib
Registering clckwrks-theme-clckwrks-0.1.18...
Updating documentation index /Users/suztomo/Library/Haskell/doc/index.html

このあとやっぱりiconvのエラーがでたので

extra-lib-dirs: /usr/lib /opt/local/lib

という行をgd-3000.7.3とmagic-1.0.8のcabalファイルに追加したあとcabal installを行い、clckwrksのサブディレクトリでももう一度cabal clean; cabal install --force-reinstallsをしたらちゃんと入りました。


clckwrks-dot-com-serverコマンド

このコマンドを実行するとサーバが動くらしい。

 $ clckwrks-dot-com-server --http-port 8000 --jstree-path=./jstree --json2-path=./json2 --jquery-path=./jquery       
Static Server Started.
clckwrks-dot-com-server: user error (Pattern match failure in do expression at Clckwrks/Page/Types.hs:152:8-18)

Page/Types.hsを見てみるとnextUUIDの取得に失敗している様子。

150 initialFeedConfig :: IO FeedConfig
151 initialFeedConfig =
152     do (Just uuid) <- nextUUID
153        return $ FeedConfig { feedUUID       = uuid
154                            , feedTitle      = fromString "Untitled Feed"
155                            , feedLink       = fromString ""
156                            , feedAuthorName = fromString "Anonymous"
157                            }

ためしにghciでやってみると

Prelude Data.UUID.V1> nextUUID
Nothing

やっぱりnextUUIDがnothingを返しています。 どうやらmaccatcherのSystem.Info.MAC.Fetchがifconfigのパースに失敗しているようです。書き換えてやりましょう。

fetchNICs                   ::  IO [(String, MAC)]
fetchNICs                    =  parser <$> i_config

とあるところを

fetchNICs                   ::  IO [(String, MAC)]
fetchNICs                    =  return [("en0", read "00:1f:5b:d7:01:e5") ] -- parser <$> i_config

としましょう。やっつけになってきましたね。cabal installで自分のMacにだけこの設定を反映してmaccatcherをインストールし、clckwrks-dot-comディレクトリもcabal install --force-reinstallsしてやりましょう。

~/Documents/.../clckwrks/clckwrks $ ls
Makefile                _darcs                  clckwrks-dot-com        clckwrks-plugin-media   jquery
README.html             clckwrks                clckwrks-plugin-bugs    clckwrks-theme-basic    json2
README.md               clckwrks-cli            clckwrks-plugin-ircbot  clckwrks-theme-clckwrks jstree
suztomo@SuzBookPro.local ~/Documents/LanguageStudy/Haskell/clckwrks/clckwrks
~/Documents/.../clckwrks/clckwrks $ clckwrks-dot-com-server --http-port 8000 --jstree-path=./jstree --json2-path=./json2 --jquery-path=./jquery
Static Server Started.
Listening on port 8000

動きました!


下にスクロールすると。。

"Invalid PageId 8" と表示されていますが、これはまだこのページが存在しないということです。no titleのページに従ってアカウントを作って、下のコマンドでアカウントを管理者に昇格させてあげましょう。

clckwrks-cli _state/profileData_socket
Just (ProfileData {dataFor = UserId {unUserId = 1}, username = "suztomo", email = Nothing, roles = fromList [Administrator,Visitor], attributes = fromList []})

"clckwrks-cli setAdmin 1"とかじゃないんですね。


そのあとは管理画面からページを8個つくってやれば、上に表示されているInvalid PageIdは消えます。

2012-06-13

[]Haskellで書かれたCMS「clckwrks」を使ってみよう

http://www.clckwrks.com/

"Get started"

Get startedページにいきましょう。

makeでwgetのエラーがでるので"--no-check-certificate"をいれてあげましょう。

~/Documents/.../clckwrks/clckwrks $ cat Makefile

WGET=wget --no-check-certificate
all: json2/json2.js jstree/jquery.jstree.js jquery/jquery.js

json2/json2.js:
	mkdir -p json2
	$(WGET) https://raw.github.com/douglascrockford/JSON-js/master/json2.js -O json2/json2.js

jstree/jquery.jstree.js:
	mkdir -p jstree
	$(WGET) --no-check-certificate http://github.com/downloads/vakata/jstree/jstree_pre1.0_fix_1.zip -O jstree/jstree_pre1.0_fix_1.zip
	cd jstree ; unzip jstree_pre1.0_fix_1.zip

jquery/jquery.js:
	mkdir -p jquery
	$(WGET) http://code.jquery.com/jquery-1.7.2.js -O jquery/jquery.js

README.html: README.md Makefile
	echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"" > $@
	echo "    \"http://www.w3.org/TR/html4/strict.dtd\">" >> $@
	echo "<html><head><title>happstack-lite tutorial</title><link rel='stylesheet' type='text/css' href='hscolour.css' ></head><body>" >> $@
	HsColour -lit -css -partial $< | markdown --html4tags >> $@
	echo "</body></html>">> $@
	validate $@

.PHONY: all

で以下のディレクトリに移ってcabal installを実行しなさいとのこと。

clckwrks

clckwrks-cli

clckwrks-plugin-media

clckwrks-plugin-bugs

clckwrks-theme-clcwrks

clckwrks-dot-com

clckwrksでcabal installをしたらhappstack-authenticateが必要だったのことでcabal install happstack-authenticateをしたらエラーです。


...
cabal: Error: some packages failed to install:
happstack-authenticate-0.9.2 depends on ixset-1.0.4 which failed to install.
ixset-1.0.4 failed during the building phase. The exception was:
ExitFailure 1
suztomo@SuzBookPro.local ~/Documents/LanguageStudy/Haskell/clckwrks/clckwrks/clckwrks
~/Documents/.../clckwrks/clckwrks $ cabal install ixset
Resolving dependencies...
Configuring ixset-1.0.4...
Building ixset-1.0.4...
Preprocessing library ixset-1.0.4...
[1 of 2] Compiling Data.IxSet.Ix    ( src/Data/IxSet/Ix.hs, dist/build/Data/IxSet/Ix.o )
[2 of 2] Compiling Data.IxSet       ( src/Data/IxSet.hs, dist/build/Data/IxSet.o )
ghc: unrecognised flags: - -
Usage: For basic information, try the `--help' option.
cabal: Error: some packages failed to install:
ixset-1.0.4 failed during the building phase. The exception was:
ExitFailure 1

ixset-1.0.4は調子が悪いようです。

suztomo@SuzBookPro.local ~/Documents/LanguageStudy/Haskell/clckwrks/clckwrks/clckwrks
~/Documents/.../clckwrks/clckwrks $ cabal info happstack-authenticate
* happstack-authenticate (library)
    Synopsis:      Happstack Authentication Library
    Versions available: 0.9.2
    Versions installed: [ Not installed ]
    Homepage:      http://src.seereason.com/happstack-authenticate
    Bug reports:   [ Not specified ]
    Description:   A themeable authentication library with support for
                   username+password and OpenId.
    Category:      Web
    License:       BSD3
    Author:        Jeremy Shaw.
    Maintainer:    jeremy@seereason.com
    Source repo:   [ Not specified ]
    Dependencies:  base >4 && <5, acid-state ==0.6.*, aeson >=0.4 && <0.7,
                   authenticate ==1.2.*, blaze-html ==0.5.*, bytestring ==0.9.*,
                   containers ==0.4.*, ixset ==1.0.*,
                   happstack-server >=6.0 && <7.1, http-conduit ==1.4.*,
                   http-types ==0.6.*, fb ==0.9.*, safecopy ==0.6.*, mtl >=2.0,
                   pwstore-purehaskell ==2.1.*, QuickCheck >=2, text ==0.11.*,
                   time >=1.2 && <1.5, reform ==0.1.*, reform-blaze ==0.1.*,
                   reform-happstack ==0.1.*, unordered-containers ==0.2.*,
                   web-routes >=0.26 && <0.28, web-routes-happstack ==0.23.*
    Cached:        No
    Modules:
        Happstack.Auth
        Happstack.Auth.Blaze.Templates
        Happstack.Auth.Core.Auth
        Happstack.Auth.Core.AuthParts
        Happstack.Auth.Core.AuthProfileURL
        Happstack.Auth.Core.AuthURL
        Happstack.Auth.Core.Profile
        Happstack.Auth.Core.ProfileParts
        Happstack.Auth.Core.ProfileURL

ixset ==1.0.*ならいいそうなのでixset-1.0.3を使ってみます。

Installing library in
/Users/suztomo/Library/Haskell/ghc-7.4.1/lib/happstack-authenticate-0.9.2/lib
Registering happstack-authenticate-0.9.2...
Updating documentation index /Users/suztomo/Library/Haskell/doc/index.html

成功です。

気を取り直してclckwrksディレクトリでcabal install。なかなか時間がかかります。

Installing library in
/Users/suztomo/Library/Haskell/ghc-7.4.1/lib/clckwrks-0.8.3/lib
Registering clckwrks-0.8.3...
Updating documentation index /Users/suztomo/Library/Haskell/doc/index.html

clckwrks-plugin-mediaは画像系のCライブラリが必要なようです。

~/Documents/.../clckwrks/clckwrks-plugin-media $ cabal install               
Resolving dependencies...
Downloading gd-3000.7.3...
Configuring gd-3000.7.3...
cabal: Missing dependencies on foreign libraries:
* Missing (or bad) header file: gd.h
* Missing C libraries: gd, png, jpeg, fontconfig, freetype
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
Downloading magic-1.0.8...
Configuring magic-1.0.8...
cabal: Missing dependency on a foreign library:
* Missing C library: magic
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
clckwrks-plugin-media-0.2.2 depends on magic-1.0.8 which failed to install.
gd-3000.7.3 failed during the configure step. The exception was:
ExitFailure 1
magic-1.0.8 failed during the configure step. The exception was:
ExitFailure 1

cabal unpack --verbose=3 gd
export C_INCLUDE_PATH=/opt/local/include
export LIBRARY_PATH=/opt/local/lib
cabal install

Installing library in
/Users/suztomo/Library/Haskell/ghc-7.4.1/lib/gd-3000.7.3/lib
Registering gd-3000.7.3...
Updating documentation index /Users/suztomo/Library/Haskell/doc/index.html
suztomo@SuzBookPro.local ~/Documents/LanguageStudy/Haskell/clckwrks/gd-3000.7.3

gdをインストールできた。


~/Documents/.../clckwrks/clckwrks-plugin-media $ cabal install
Resolving dependencies...
Configuring magic-1.0.8...
cabal: Missing dependency on a foreign library:
* Missing C library: magic
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
clckwrks-plugin-media-0.2.2 depends on magic-1.0.8 which failed to install.
magic-1.0.8 failed during the configure step. The exception was:
ExitFailure 1
suztomo@SuzBookPro.local ~/Documents/LanguageStudy/Haskell/clckwrks/clckwrks/clckwrks-plugin-media
~/Documents/.../clckwrks/clckwrks-plugin-media $ cabal install magic-1.0.8
Resolving dependencies...
Configuring magic-1.0.8...
cabal: Missing dependency on a foreign library:
* Missing C library: magic
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
magic-1.0.8 failed during the configure step. The exception was:
ExitFailure 1

libmagicが必要。macportではlibmagicはfileに含まれているらしい。

sudo port install file

で/opt/local/libにlibmagicで始まるファイルがインストールされているので、clckwrks-plugin-mediaがインストールできるはず。

suztomo@SuzBookPro.local ~/Documents/LanguageStudy/Haskell/clckwrks/clckwrks/clckwrks-plugin-media
~/Documents/.../clckwrks/clckwrks-plugin-media $ cabal install
Resolving dependencies...
Configuring magic-1.0.8...
Building magic-1.0.8...
Preprocessing library magic-1.0.8...
ld: warning: in /opt/local/lib/libmagic.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libiconv.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libmagic.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libiconv.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libmagic.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libiconv.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libmagic.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libiconv.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libmagic.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libiconv.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
[1 of 7] Compiling Magic.TypesLL    ( Magic/TypesLL.hs, dist/build/Magic/TypesLL.o )
[2 of 7] Compiling Magic.Data       ( dist/build/Magic/Data.hs, dist/build/Magic/Data.o )
[3 of 7] Compiling Magic.Types      ( dist/build/Magic/Types.hs, dist/build/Magic/Types.o )
[4 of 7] Compiling Magic.Utils      ( dist/build/Magic/Utils.hs, dist/build/Magic/Utils.o )
[5 of 7] Compiling Magic.Init       ( dist/build/Magic/Init.hs, dist/build/Magic/Init.o )
[6 of 7] Compiling Magic.Operations ( dist/build/Magic/Operations.hs, dist/build/Magic/Operations.o )
[7 of 7] Compiling Magic            ( Magic.hs, dist/build/Magic.o )
[1 of 7] Compiling Magic.TypesLL    ( Magic/TypesLL.hs, dist/build/Magic/TypesLL.p_o )
[2 of 7] Compiling Magic.Data       ( dist/build/Magic/Data.hs, dist/build/Magic/Data.p_o )
[3 of 7] Compiling Magic.Types      ( dist/build/Magic/Types.hs, dist/build/Magic/Types.p_o )
[4 of 7] Compiling Magic.Utils      ( dist/build/Magic/Utils.hs, dist/build/Magic/Utils.p_o )
[5 of 7] Compiling Magic.Init       ( dist/build/Magic/Init.hs, dist/build/Magic/Init.p_o )
[6 of 7] Compiling Magic.Operations ( dist/build/Magic/Operations.hs, dist/build/Magic/Operations.p_o )
[7 of 7] Compiling Magic            ( Magic.hs, dist/build/Magic.p_o )
Registering magic-1.0.8...
Running Haddock for magic-1.0.8...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: rts-1.0
Preprocessing library magic-1.0.8...
Haddock coverage:
  50% (  1 /  2) in 'Magic.TypesLL'
  50% (  1 /  2) in 'Magic.Data'
  67% (  2 /  3) in 'Magic.Types'
  17% (  1 /  6) in 'Magic.Utils'
 100% (  4 /  4) in 'Magic.Init'
 100% (  9 /  9) in 'Magic.Operations'
 100% (  7 /  7) in 'Magic'
Warning: Magic.Types: could not find link destinations for:
    Magic.TypesLL.CMagic
Documentation created: dist/doc/html/magic/index.html
Installing library in
/Users/suztomo/Library/Haskell/ghc-7.4.1/lib/magic-1.0.8/lib
Registering magic-1.0.8...
[1 of 1] Compiling Main             ( Setup.hs, dist/setup/Main.o )
Linking ./dist/setup/setup ...
ld: warning: in /opt/local/lib/libiconv.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
  "_iconv_close", referenced from:
      _hs_iconv_close in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _hs_iconv_close)
  "_locale_charset", referenced from:
      _localeEncoding in libHSbase-4.5.0.0.a(PrelIOUtils.o)
  "_iconv", referenced from:
      _hs_iconv in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _base_GHCziIOziEncodingziIconv_iconvEncoding5_info, _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding3_info , _hs_iconv_close )
  "_iconv_open", referenced from:
      _hs_iconv_open in libHSbase-4.5.0.0.a(iconv.o)
     (maybe you meant: _hs_iconv_open)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Updating documentation index /Users/suztomo/Library/Haskell/doc/index.html
cabal: Error: some packages failed to install:
clckwrks-plugin-media-0.2.2 failed during the configure step. The exception
was:
ExitFailure 1

\(^o^)/