ブート時に途中から画面が真っ暗で表示されなくなる時のtips
ブートローダの選択画面やブートの途中までは画面に映るのに、ある途端から画面が真っ暗になったり、バックグラウンドで処理は行われているのに画面が停止した際の解決法。
nvidiaのプロプライエタリドライバを使用していることが前提。
原因はカーネルのオプションの選択ミスで、DRMというカーネルオプションを無効にしてドライバを再コンパイルすると直った。
詳しくはこちら NVidia/nvidia-drivers - Gentoo Wiki
DRMというのはDirect Rendering Managerといい、モダンなビデオカードを扱うためのインタフェースとのこと。
これがLinux kernelのものとドライバのもので競合を起こしていたのが原因の様子。
原因というか、.configファイルを消してしまったのが一番痛い。
glibcの野良ビルド方法
ちゃんとINSTALL読もうね案件
続きを読むセキュキャンに落ちた解答を晒す
んなもん誰が読むんじゃ
まずはセキュリティ・キャンプ合格者のみなさんおめでとうございます。僕は残念ながら落ちてしまいましたが、部内に一人合格者がいたので全滅は免れました。KK君おめでとう&頑張れ。
年齢的に最後のチャンスだったので、落ちた時はかなりへこみましたが、これを期に他の勉強会等にも積極的に参加していきたいです。
今回晒す解答は実際に提出したものをそのまま貼り付けています。
反面教師として来年度以降誰かの参考になったら幸いです。
尚、選択問題2,5,6,9,11に取り組みました。
Gnome3のアプリケーション一覧を汚染された
winetricksでゴニョゴニョといくつかパッケージを入れていたら、Gnomeのアプリケーション一覧(Activities→Show Applications)がバッテン印のアプリケーションに汚染された。
アプリケーション一覧からアプリを起動することはあまりないが、見た目がよろしくない。
rm -rf ~/.local/share/desktop-directories/*
rm -rf ~/.local/share/applications/wine*
して一度ログアウトしたら消えた。
wineのアイコンも消えたが、コンソール以外から使うことはないから問題ない。
ちゃんとfind ~ .name .desktopして不要なものを見極めてから消すことをおすすめ。
yosemite上のGentoo/Prefixでmedia-libs/libcanberraのemergeがコケる
誰かバグレポート書いて案件その3。
とりあえず
% emerge libcanberra
すると
canberra-gtk-module.c:28:22: error: gdk/gdkx.h: No such file or directory canberra-gtk-module.c: In function 'window_get_desktop': canberra-gtk-module.c:303: error: 'Atom' undeclared (first use in this function) canberra-gtk-module.c:303: error: (Each undeclared identifier is reported only once canberra-gtk-module.c:303: error: for each function it appears in.) canberra-gtk-module.c:303: error: expected ';' before 'type_return' canberra-gtk-module.c:315: warning: implicit declaration of function 'XGetWindowProperty' canberra-gtk-module.c:315: warning: implicit declaration of function 'GDK_DISPLAY_XDISPLAY' canberra-gtk-module.c:315: warning: implicit declaration of function 'GDK_WINDOW_XID' canberra-gtk-module.c:316: warning: implicit declaration of function 'gdk_x11_get_xatom_by_name_for_display' canberra-gtk-module.c:317: error: 'False' undeclared (first use in this function) canberra-gtk-module.c:317: error: expected ')' before numeric constant canberra-gtk-module.c:317: error: 'type_return' undeclared (first use in this function) canberra-gtk-module.c:319: error: 'Success' undeclared (first use in this function) canberra-gtk-module.c:322: error: expected ')' before numeric constant canberra-gtk-module.c:329: error: 'None' undeclared (first use in this function) canberra-gtk-module.c:330: warning: implicit declaration of function 'XFree' canberra-gtk-module.c: In function 'display_get_desktop': canberra-gtk-module.c:336: error: 'Atom' undeclared (first use in this function) canberra-gtk-module.c:336: error: expected ';' before 'type_return' canberra-gtk-module.c:348: warning: implicit declaration of function 'DefaultRootWindow' canberra-gtk-module.c:350: error: 'False' undeclared (first use in this function) canberra-gtk-module.c:350: error: expected ')' before numeric constant canberra-gtk-module.c:350: error: 'type_return' undeclared (first use in this function) canberra-gtk-module.c:352: error: 'Success' undeclared (first use in this function) canberra-gtk-module.c:355: error: expected ')' before numeric constant canberra-gtk-module.c:363: error: 'None' undeclared (first use in this function) canberra-gtk-module.c: In function 'window_is_xembed': canberra-gtk-module.c:370: error: 'Atom' undeclared (first use in this function) canberra-gtk-module.c:370: error: expected ';' before 'type_return' canberra-gtk-module.c:376: error: expected ';' before 'xembed' canberra-gtk-module.c:386: error: 'xembed' undeclared (first use in this function) canberra-gtk-module.c:392: error: 'False' undeclared (first use in this function) canberra-gtk-module.c:392: error: 'type_return' undeclared (first use in this function) canberra-gtk-module.c:394: error: 'Success' undeclared (first use in this function) canberra-gtk-module.c:408: error: 'None' undeclared (first use in this function)
こんなエラーが出てくる。
面倒なので(あと昨日の夜に寝ぼけながらやったせいでほとんど覚えてないので)解決方法だけ乗せると
% LDFLAGS="-L/Users/vicco/Gentoo/usr/lib -L/usr/local/lib" CPPFLAGS="-I/Users/vicco/Gentoo/usr/include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include" CC=clang CXX=clang++ ebuild ~/Gentoo/usr/portage/media-libs/libcanberra/libcanberra-0.30-r4.ebuild unpack % vim ~/Gentoo/var/tmp/portage/media-libs/libcanberra-0.30-r4/work/libcanberra-0.30/configure.ac
で117行目から
CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ -Wl,--as-needed \ -Wl,--gc-sections])
の部分をコメントアウト。clangでは--as-neededと--gc-sectionsはunsupported optionとのこと。
あとは
% LDFLAGS="-L/Users/vicco/Gentoo/usr/lib -L/usr/local/lib" CPPFLAGS="-I/Users/vicco/Gentoo/usr/include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include" CC=clang CXX=clang++ ebuild ~/Gentoo/usr/portage/media-libs/libcanberra/libcanberra-0.30-r4.ebuild configure % LDFLAGS="-L/Users/vicco/Gentoo/usr/lib -L/usr/local/lib" CPPFLAGS="-I/Users/vicco/Gentoo/usr/include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include" CC=clang CXX=clang++ ebuild ~/Gentoo/usr/portage/media-libs/libcanberra/libcanberra-0.30-r4.ebuild compile % LDFLAGS="-L/Users/vicco/Gentoo/usr/lib -L/usr/local/lib" CPPFLAGS="-I/Users/vicco/Gentoo/usr/include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include" CC=clang CXX=clang++ ebuild ~/Gentoo/usr/portage/media-libs/libcanberra/libcanberra-0.30-r4.ebuild install % LDFLAGS="-L/Users/vicco/Gentoo/usr/lib -L/usr/local/lib" CPPFLAGS="-I/Users/vicco/Gentoo/usr/include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include" CC=clang CXX=clang++ ebuild ~/Gentoo/usr/portage/media-libs/libcanberra/libcanberra-0.30-r4.ebuild qmerge
(毎回LDFLAGSとか指定する必要は多分無い)
Gentoo/Prefix上のライブラリとbrewで突っ込んだライブラリを使ったせいでとてもカオス。
今後アップデートがあった時にとても面倒くさそう。
yosemite上のGentoo/Prefixでx11-libs/gtk+のemergeがコケる
さっきの記事と似たような内容
とりあえずそのままemergeするとこんな感じのエラーが大量に出てコケる。
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:207, from /Users/vicco/Gentoo/var/tmp/portage/x11-libs/gtk+-3.14.8/work/gtk+-3.14.8/gdk/quartz/gdkquartz.h:23, from /Users/vicco/Gentoo/var/tmp/portage/x11-libs/gtk+-3.14.8/work/gtk+-3.14.8/gdk/quartz/gdkprivate-quartz.h:26, from /Users/vicco/Gentoo/var/tmp/portage/x11-libs/gtk+-3.14.8/work/gtk+-3.14.8/gdk/quartz/gdkcursor-quartz.c:25: /System/Library/Frameworks/AppKit.framework/Headers/NSCollectionView.h:114: error: expected a property attribute before 'strong'
原因はさっきの記事と同じでgccでコンパイルするとよく分からないヘッダファイルで構文エラーが出るため。とりあえずclangでコンパイルするために
% CC=clang CXX=clang++ emerge gtk+
する。
けれども今度は
checking for GLIB - version >= 2.41.2... no *** Could not run GLIB test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GLIB is incorrectly installed. configure: error: *** GLIB 2.41.2 or better is required. The latest version of *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.
こんなエラーが出てきてconfigure phaseでコケる。
emerge -s glib(当然eixでも良い)すると
* dev-libs/glib Latest version available: 2.42.1 Latest version installed: 2.42.1 Size of files: 8,708 KiB Homepage: http://www.gtk.org/ Description: The GLib library of C routines License: LGPL-2+
になっているため、間違いなくGLIBのバージョンは2.41.2より高い。
原因としては-lintlというリンカオプションでライブラリが見つからずにコケているようなので、とりあえずgettextをemergeして(すでにあるなら不要)
% emerge gettext % LDFLAGS=-L/Users/vicco/Gentoo/usr/lib CPPFLAGS=-I/Users/vicco/Gentoo/usr/include CC=clang CXX=clang++ emerge gtk+
で解決。
yosemite上のGentoo/Prefixでsys-apps/dbusのemergeがコケる
OSX 10.10.2な環境でsys-apps/dbusをemergeするとconfigure phaseでコケる。
configure: error: launchd support explicitly enabled but not available
こんな感じのエラーログが出る。
原因はlaunch.h内でインクルードしているxpc/base.hでclangでしか使えないプリプロセッサディレクティブ(__has_extension(),__has_feature())を使っているため。
要するにコンパイラをgccからclangに代えてやればコンパイルは通るので、
% CC=clang CXX=clang++ emerge sys-apps/dbus
してやればコンパイル出来る。
次回以降もclangを指定してやらないとコンパイルが失敗するため、
% echo -e "CC=clang\nCXX=clang++" >> ${prefix_root}/etc/portage/env/clang % echo -e "sys-apps/dbus clang" >> ${prefix_root}/etc/portage/package.env
(もちろん適宜変更してください)
すると次回以降もclangでコンパイルされる(はず)。
参考:Clang - Gentoo Wiki
これはバグレポート案件なのだろうか。
英語が出来ないのでバグレポート書いてないんですが誰か暇な人いたら書いてくれませんか。
早くGentoo/Prefixでemerge mikutterしたい。