なんかの Log

良い感じで投げっぱなしにしてみせる。

brew doctor警告の備忘録

久しぶりにbrew doctorしたら警告でてたので(OSアップグレード時点で発生してたんだろうなぁ…)

1回目

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libcdt.5.dylib
    /usr/local/lib/libcgraph.6.dylib
    /usr/local/lib/libgvc.6.dylib
    /usr/local/lib/libgvpr.2.dylib
    /usr/local/lib/libpathplan.4.dylib
    /usr/local/lib/libxdot.4.dylib

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/libcdt.pc
    /usr/local/lib/pkgconfig/libcgraph.pc
    /usr/local/lib/pkgconfig/libgvc.pc
    /usr/local/lib/pkgconfig/libgvpr.pc
    /usr/local/lib/pkgconfig/libpathplan.pc
    /usr/local/lib/pkgconfig/libxdot.pc

適当に/usr/local/_lib/usr/local/_lib/_pkgconfigに警告ファイルを移動させた。

2回目

Warning: Broken symlinks were found. Remove them with `brew prune`:
  /usr/local/lib/libcdt.dylib
  /usr/local/lib/libcgraph.dylib
  /usr/local/lib/libgvc.dylib
  /usr/local/lib/libgvpr.dylib
  /usr/local/lib/libpathplan.dylib
  /usr/local/lib/libxdot.dylib

指示通りにコマンド実行

$ brew prune

解決。

Cordova 3系でのエラー

Cordova 3.3.1にて。

$ cordova platform add android
Creating android project...

/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error: An error occured during creation of android sub-project. 

/Users/[username]/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
                    throw e;
                          ^
Error: ERROR : executing command 'ant', make sure you have ant installed and added to your path.
    at /Users/[username]/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:47:27
    at ChildProcess.exithandler (child_process.js:641:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

    at /usr/local/lib/node_modules/cordova/src/platform.js:244:30
    at ChildProcess.exithandler (child_process.js:641:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

エラーの通りantがなかっただけ。

$ brew install ant

他にもAndroid SDKへのパスが通ってなかったり、最新じゃなくても似た感じのエラーがでるっぽい(未確認)。

3系でフォルダ構成が変わって既存のバージョン管理の移動させ方に悩み中。

Internal Compile Error

Unityで起きたエラーですが、直接の原因がUnityかは不明です。

他の環境(といってもOSのバージョンが違うのだけど)でビルド通ってるプロジェクトなのに、自分のMacだとエラーとなって原因調査しました。

Software Version
Mac OS X 10.9.1
Unity 3.5.7

コンソールにはInternal Compile Errorと出てずらずら警告やらが並びます。このエラーは単純にコンパイルエラーとのことで、原因は様々だとか。自分の場合は、Open Editor Logから下記のようなエラーが見つかりました。

Unhandled Exception: System.StackOverflowException: The requested operation caused a stack overflow.
  at Mono.CSharp.ResolveContext.WithFlowAnalysis (Boolean do_flow_analysis, Boolean omit_struct_analysis) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

省略

Javaの考え的には、Monoが使うメモリ空間を指定してあげたらいいんだろうと思ったけど、どうすりゃいいねん(´・ω・`)

じみーちに調べた結果、あるプログラムファイルで長めの文字列を結合したファイルでコンパイルがこけてたことがわかり解決できました。

意味もない例

string longLongStr = "とっても" + "ながい" + "もじれつ…。。。";

一応書き残しておきます。