Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I failed to build mozjs on Lubuntu 18.04. #149

Closed
veer66 opened this issue Sep 8, 2018 · 1 comment
Closed

I failed to build mozjs on Lubuntu 18.04. #149

veer66 opened this issue Sep 8, 2018 · 1 comment

Comments

@veer66
Copy link

veer66 commented Sep 8, 2018

When I ran cargo build I got this error message:

/home/vee/Develop/free/mozjs/target/debug/build/mozjs_sys-ec031bee7e5f078f/out/dist/include/mozilla/Compiler.h:49:12: fatal error: 'cstddef' file not found

So I try to set these environment variables as follows:

export HOST_CC=clang
export HOST_CXX=clang++
export LIBCLANG_PATH=/usr/lib/clang/6.0/lib

Then I got this error message instead:

Internal error occurred: Command "clang++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=x86_64-unknown-linux-gnu" "-I" "/home/vee/Develop/free/mozjs/target/debug/build/mozjs_sys-ec031bee7e5f078f/out/dist/include" "-I" "/home/vee/Develop/free/mozjs/target/debug/build/mozjs_sys-ec031bee7e5f078f/out/js/src" "-Wall" "-Wextra" "-include" "/home/vee/Develop/free/mozjs/target/debug/build/mozjs_sys-ec031bee7e5f078f/out/js/src/js-confdefs.h" "-o" "/home/vee/Develop/free/mozjs/target/debug/build/mozjs_sys-ec031bee7e5f078f/out/src/jsglue.o" "-c" "src/jsglue.cpp" with args "clang++" did not execute successfully (status code exit code: 1).
@veer66 veer66 changed the title I failed to build mozjs on Lubuntu 18.04 with clang I failed to build mozjs on Lubuntu 18.04. Sep 8, 2018
@veer66
Copy link
Author

veer66 commented Sep 8, 2018

libstdc++-7-dev wasn't enough. So I still whatever version available and it works.

$ dpkg -l | grep libstd
ii  libstdc++-5-dev:amd64                         5.5.0-12ubuntu1                            amd64        GNU Standard C++ Library v3 (development files)
ii  libstdc++-6-dev:amd64                         6.4.0-17ubuntu1                            amd64        GNU Standard C++ Library v3 (development files)
ii  libstdc++-7-dev:amd64                         7.3.0-16ubuntu3                            amd64        GNU Standard C++ Library v3 (development files)
ii  libstdc++-8-dev:amd64                         8-20180414-1ubuntu2                        amd64        GNU Standard C++ Library v3 (development files)
ii  libstdc++6:amd64                              8-20180414-1ubuntu2                        amd64        GNU Standard C++ Library v3

I don't know which one made it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant