Can't find libcxx.bc when compiling .bc file to .js

85 views
Skip to first unread message

citytianyu

unread,
Feb 28, 2012, 4:48:51 AM2/28/12
to emscripten-discuss
Hi,

Here I have a project on Mac OS to compile js with clang-llvm 3.0 and
emcc updated on 2012.2.2. So I wrote a Makefile to compile all of the
cpp files to .o file and then combine all .o files into one .bc file.

But when I tried to compile the .bc file to .js file with emcc I, I
got an error said that:
xxxxxxx/clang_llvm/bin/llvm-link: /tmp/emscripten_temp/libcxx/
libcxx.bc: Could not open input file: No such file or directory
xxxxxxx/clang_llvm/bin/llvm-link: error loading file '/tmp/
emscripten_temp/libcxx/libcxx.bc'

And it seems that it is an assert in shared.py

In order to fix this I tried to make libcxx.bc myself but
"has_feature(is_base_of) " failed during the compilation and got
another assert..
I tried to compile single .o file to .js without combining them into
one and this was successful.

What's the problem?

Alon Zakai

unread,
Feb 28, 2012, 9:08:00 PM2/28/12
to emscripte...@googlegroups.com
On Tue, Feb 28, 2012 at 1:48 AM, citytianyu <cityt...@gmail.com> wrote:
> Hi,
>
> Here I have a project on Mac OS to compile js with clang-llvm 3.0 and
> emcc updated on 2012.2.2. So I wrote a Makefile to compile all of the
> cpp files to .o file and then combine all .o files into one .bc file.
>
> But when I tried to compile the .bc file to .js file with emcc I, I
> got an error said that:
> xxxxxxx/clang_llvm/bin/llvm-link: /tmp/emscripten_temp/libcxx/
> libcxx.bc: Could not open input file: No such file or directory
> xxxxxxx/clang_llvm/bin/llvm-link: error loading file '/tmp/
> emscripten_temp/libcxx/libcxx.bc'
>
> And it seems that it is an assert in shared.py

Seems like it can't compile libcxx? Look in the temp directory,
in libcxx/ there where it tries to build libcxx there will be
files for stdout and stderr for make and configure (make_err,
etc.), the contents of those should give a clearer picture of
what causes this failure.

- azakai

citytianyu

unread,
Feb 29, 2012, 3:59:23 AM2/29/12
to emscripten-discuss
Thanks a lot!
I read the make_err file and found that env python hadn't worked well.
After checking I found all of the files' formats are dos but not unix
maybe because I updated them on Windows.
#!/usr/bin/env python at the beginning of the files would get wrong
with dos file format.

On 2月29日, 上午10时08分, Alon Zakai <alonmozi...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages