diary/Kojima/2013-09-01
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[diary/Kojima]]
・LLVM-3.3 on Plamo-5.1/i586(その2)
64ビット用のビルドスクリプトを32ビット用に直してLLVM-3.3...
パッケージ化もエラーなく進んだので、できたパッケージをイ...
libclcをビルドしようとすると、ビルドが途中で止まってしま...
ちなみにlibclcはOpenCL 1.1仕様に基づくOpen CL C言語用のラ...
LLVM-LINK nvptx--nvidiacl/lib/builtins.link.bc
OPT nvptx--nvidiacl/lib/builtins.opt.bc
LLVM-CXX utils/prepare-builtins.o
In file included from ./utils/prepare-builtins.cpp:1:
/usr/include/llvm/ADT/OwningPtr.h:18:10: fatal error: 'c...
#include <cassert>
^
1 error generated.
make: *** [utils/prepare-builtins.o] エラー 1
エラーは"インクルードファイルのcassertがない"という明快な...
C++用のcassertはちゃんと存在している.
$ ls -l /usr/include/c++/4.6.3/cassert
-rw-r--r-- 1 root root 1,699 4月 18日 2012年 /usr/inclu...
おかしいなぁ,,と思って,C++の"Hello World!" で試してみ...
やはりインクルードファイル回りでコケる.
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
return 0;
}
$ clang++ test.cpp
test.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
もう少しエラー表示を詳しくさせようと,-v オプションを指定...
どうやらインクルードファイルを /usr/include/c++/4.6.3/
以下に探しにいっていない模様.
$ clang++ -v test.cpp
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-plamo-linux-gnu
Thread model: posix
"/usr/bin/clang-3.3" -cc1 -triple i386-plamo-linux-gnu ...
-disable-free -disable-llvm-verifier -main-file-name ...
-mrelocation-model static -mdisable-fp-elim -fmath-er...
-mconstructor-aliases -target-cpu pentium4 -v
-resource-dir /usr/bin/../lib/clang/3.3 -internal-isy...
-internal-isystem /usr/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-...
-fdeprecated-macro -fdebug-compilation-dir /mnt/Srcs/...
-fmessage-length 95 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions...
-fdiagnostics-show-option -fcolor-diagnostics -backen...
-o /tmp/test-CT8OmO.o -x c++ test.cpp
clang -cc1 version 3.3 based upon LLVM 3.3svn default ta...
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/bin/../lib/clang/3.3/include
/usr/include
End of search list.
test.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
それでは,と,-IオプションでC++用のヘッダファイルを明示し...
別のヘッダファイルで引っかかる.
$ clang++ test.cpp -I/usr/include/c++/4.6.3
In file included from test.cpp:1:
/usr/include/c++/4.6.3/iostream:39:10: fatal error: 'bit...
#include <bits/c++config.h>
^
1 error generated.
c++config.h というファイルを調べてみると
/usr/include/c++/4.6.3/i586-pc-linux-gnu/bits/c++config.h...
$ grep c++config.h /var/log/packages/*
/var/log/packages/g++:usr/include/c++/4.6.3/i586-pc-linu...
これも-Iオプションで指定してやると,
インクルードファイルは見付けて,コンパイルは通ったようだ...
今度はリンク時にエラーになる.
$ clang++ -v test.cpp -I/usr/include/c++/4.6.3 -I/usr/i...
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-plamo-linux-gnu
Thread model: posix
"/usr/bin/clang-3.3" -cc1 -triple i386-plamo-linux-gnu ...
...
clang -cc1 version 3.3 based upon LLVM 3.3svn default ta...
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.6.3
/usr/include/c++/4.6.3/i586-pc-linux-gnu
/usr/local/include
/usr/bin/../lib/clang/3.3/include
/usr/include
End of search list.
"/usr/bin/ld" --eh-frame-hdr -m elf_i386 -dynamic-linke...
-o a.out /usr/lib/crt1.o /usr/lib/crti.o crtbegin.o ...
/tmp/test-dMwktf.o -lstdc++ -lm -lgcc_s -lgcc -lc -l...
/usr/lib/crtn.o
/usr/bin/ld: cannot find crtbegin.o: No such file or dir...
/usr/bin/ld: cannot find -lgcc
clang-3.3: error: linker command failed with exit code 1...
うーん,,今度はリンカがスタートアップファイルを見つけら...
さてどうしたものか,,と首を捻ったのであった..
(続く)
#comment
終了行:
[[diary/Kojima]]
・LLVM-3.3 on Plamo-5.1/i586(その2)
64ビット用のビルドスクリプトを32ビット用に直してLLVM-3.3...
パッケージ化もエラーなく進んだので、できたパッケージをイ...
libclcをビルドしようとすると、ビルドが途中で止まってしま...
ちなみにlibclcはOpenCL 1.1仕様に基づくOpen CL C言語用のラ...
LLVM-LINK nvptx--nvidiacl/lib/builtins.link.bc
OPT nvptx--nvidiacl/lib/builtins.opt.bc
LLVM-CXX utils/prepare-builtins.o
In file included from ./utils/prepare-builtins.cpp:1:
/usr/include/llvm/ADT/OwningPtr.h:18:10: fatal error: 'c...
#include <cassert>
^
1 error generated.
make: *** [utils/prepare-builtins.o] エラー 1
エラーは"インクルードファイルのcassertがない"という明快な...
C++用のcassertはちゃんと存在している.
$ ls -l /usr/include/c++/4.6.3/cassert
-rw-r--r-- 1 root root 1,699 4月 18日 2012年 /usr/inclu...
おかしいなぁ,,と思って,C++の"Hello World!" で試してみ...
やはりインクルードファイル回りでコケる.
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
return 0;
}
$ clang++ test.cpp
test.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
もう少しエラー表示を詳しくさせようと,-v オプションを指定...
どうやらインクルードファイルを /usr/include/c++/4.6.3/
以下に探しにいっていない模様.
$ clang++ -v test.cpp
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-plamo-linux-gnu
Thread model: posix
"/usr/bin/clang-3.3" -cc1 -triple i386-plamo-linux-gnu ...
-disable-free -disable-llvm-verifier -main-file-name ...
-mrelocation-model static -mdisable-fp-elim -fmath-er...
-mconstructor-aliases -target-cpu pentium4 -v
-resource-dir /usr/bin/../lib/clang/3.3 -internal-isy...
-internal-isystem /usr/bin/../lib/clang/3.3/include
-internal-externc-isystem /include -internal-externc-...
-fdeprecated-macro -fdebug-compilation-dir /mnt/Srcs/...
-fmessage-length 95 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions...
-fdiagnostics-show-option -fcolor-diagnostics -backen...
-o /tmp/test-CT8OmO.o -x c++ test.cpp
clang -cc1 version 3.3 based upon LLVM 3.3svn default ta...
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/bin/../lib/clang/3.3/include
/usr/include
End of search list.
test.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
それでは,と,-IオプションでC++用のヘッダファイルを明示し...
別のヘッダファイルで引っかかる.
$ clang++ test.cpp -I/usr/include/c++/4.6.3
In file included from test.cpp:1:
/usr/include/c++/4.6.3/iostream:39:10: fatal error: 'bit...
#include <bits/c++config.h>
^
1 error generated.
c++config.h というファイルを調べてみると
/usr/include/c++/4.6.3/i586-pc-linux-gnu/bits/c++config.h...
$ grep c++config.h /var/log/packages/*
/var/log/packages/g++:usr/include/c++/4.6.3/i586-pc-linu...
これも-Iオプションで指定してやると,
インクルードファイルは見付けて,コンパイルは通ったようだ...
今度はリンク時にエラーになる.
$ clang++ -v test.cpp -I/usr/include/c++/4.6.3 -I/usr/i...
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-plamo-linux-gnu
Thread model: posix
"/usr/bin/clang-3.3" -cc1 -triple i386-plamo-linux-gnu ...
...
clang -cc1 version 3.3 based upon LLVM 3.3svn default ta...
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.6.3
/usr/include/c++/4.6.3/i586-pc-linux-gnu
/usr/local/include
/usr/bin/../lib/clang/3.3/include
/usr/include
End of search list.
"/usr/bin/ld" --eh-frame-hdr -m elf_i386 -dynamic-linke...
-o a.out /usr/lib/crt1.o /usr/lib/crti.o crtbegin.o ...
/tmp/test-dMwktf.o -lstdc++ -lm -lgcc_s -lgcc -lc -l...
/usr/lib/crtn.o
/usr/bin/ld: cannot find crtbegin.o: No such file or dir...
/usr/bin/ld: cannot find -lgcc
clang-3.3: error: linker command failed with exit code 1...
うーん,,今度はリンカがスタートアップファイルを見つけら...
さてどうしたものか,,と首を捻ったのであった..
(続く)
#comment
ページ名: