Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Clang 3.6 instead of clang 3.4 #12

Closed
cibersheep opened this issue Dec 17, 2016 · 4 comments
Closed

Clang 3.6 instead of clang 3.4 #12

cibersheep opened this issue Dec 17, 2016 · 4 comments

Comments

@cibersheep
Copy link

cibersheep commented Dec 17, 2016

Hi!
I'm trying to compile em-Dosbox (but it happens the same with any other transcompile I try after updating emscripten).

emcc -v shows:
emcc (Emscripten GCC-like replacement + linker emulating GNU ld ) 1.22.1
clang version 3.9.0 (https://github.com/kripken/emscripten-fastcomp-clang/ 271ce598c3d1fe74efadc254f5be1b57edea9f41) (https://github.com/kripken/emscripten-fastcomp/ 61acfb230665464544f2e8db292f8999fc3c628c) (emscripten 1.36.0 : 1.36.0)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: MyDirectory/emsdk_portable/clang/fastcomp/build_master_64/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
WARNING root: LLVM version appears incorrect (seeing "(https://github.com/kripken/emscripten-fastcomp-clang/", expected "3.4")
INFO root: (Emscripten: Running sanity checks)

When I try to compile, this error:
/usr/share/emscripten/em++ -O3 -s TOTAL_MEMORY=67108864 --pre-js pre.js -o dosbox.html dosbox.o cpu/libcpu.a debug/libdebug.a dos/libdos.a fpu/libfpu.a hardware/libhardware.a gui/libgui.a ints/libints.a misc/libmisc.a shell/libshell.a hardware/serialport/libserial.a libs/gui_tk/libgui_tk.a
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 389, in _handle_results
task = get()
TypeError: ('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())

What am I doing wrong?

@kripken
Copy link
Member

kripken commented Dec 19, 2016

I think your repos are out of sync. The 3 repos (emscripten, fastcomp, fastcomp-clang) must all be on the same version number or the same up to date branch, http://kripken.github.io/emscripten-site/docs/building_from_source/building_fastcomp_manually_from_source.html?highlight=repos#branches

Or, if you are using the emsdk, perhaps it needs to be updated?

@juj
Copy link
Collaborator

juj commented Dec 20, 2016

Emsdk automatically takes all the three repos in sync, there's no special update steps there to synchronize them.

@cibersheep
Copy link
Author

I forgot to mention: I use Ubuntu 16.04 64bits.
I didn't build Emscripten, I've download it and updated emsdk as it says.

After updating, I got the error and the version mismatch.

The result of ./emsdk list is

The following precompiled tool packages are available for download:
node-4.1.1-32bit
(*) node-4.1.1-64bit INSTALLED
emscripten-1.30.0
emscripten-1.34.1
emscripten-1.35.0

The following tools can be compiled from source:
clang-tag-e1.36.13-32bit
clang-tag-e1.36.14-32bit
clang-tag-e1.36.13-64bit
clang-tag-e1.36.14-64bit
clang-incoming-32bit
clang-incoming-64bit
clang-master-32bit
() clang-master-64bit INSTALLED
emscripten-tag-1.36.13-32bit
emscripten-tag-1.36.14-32bit
emscripten-tag-1.36.13-64bit
emscripten-tag-1.36.14-64bit
emscripten-incoming-32bit
emscripten-master-32bit
emscripten-incoming-64bit
(
) emscripten-master-64bit INSTALLED

The following precompiled SDKs are available for download:

The following SDKs can be compiled from source:
sdk-incoming-32bit
sdk-incoming-64bit
sdk-master-32bit
* sdk-master-64bit INSTALLED
sdk-tag-1.36.13-32bit
sdk-tag-1.36.14-32bit

@cibersheep
Copy link
Author

Ok. I remerbered also that with the last update I did all steps from instructuions and tried running emcc with python3. That worked.

Solved the error that stopped transpilation.
python3 routeto/emcc routeto/files

juj pushed a commit that referenced this issue Jan 31, 2018
Summary:
The test being added in this patch used to cause an assertion failure:

/build/./bin/clang -cc1 -internal-isystem /build/lib/clang/5.0.0/include -nostdsysteminc -verify -fsyntax-only -std=c++11 -Wshadow-all /src/tools/clang/test/SemaCXX/warn-shadow.cpp
--
Exit Code: 134

Command Output (stderr):
--
clang: /src/tools/clang/lib/AST/ASTDiagnostic.cpp:424: void clang::FormatASTNodeDiagnosticArgument(DiagnosticsEngine::ArgumentKind, intptr_t, llvm::StringRef, llvm::StringRef, ArrayRef<DiagnosticsEngine::ArgumentValue>, SmallVectorImpl<char> &, void *, ArrayRef<intptr_t>): Assertion `isa<NamedDecl>(DC) && "Expected a NamedDecl"' failed.
#0 0x0000000001c7a1b4 PrintStackTraceSignalHandler(void*) (/build/./bin/clang+0x1c7a1b4)
#1 0x0000000001c7a4e6 SignalHandler(int) (/build/./bin/clang+0x1c7a4e6)
#2 0x00007f30880078d0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0xf8d0)
#3 0x00007f3087054067 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35067)
#4 0x00007f3087055448 abort (/lib/x86_64-linux-gnu/libc.so.6+0x36448)
#5 0x00007f308704d266 (/lib/x86_64-linux-gnu/libc.so.6+0x2e266)
#6 0x00007f308704d312 (/lib/x86_64-linux-gnu/libc.so.6+0x2e312)
#7 0x00000000035b7f22 clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind, long, llvm::StringRef, llvm::StringRef, llvm::ArrayRef<std::pair<clang::DiagnosticsEngine::ArgumentKind, long> >, llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>) (/build/
./bin/clang+0x35b7f22)
#8 0x0000000001ddbae4 clang::Diagnostic::FormatDiagnostic(char const*, char const*, llvm::SmallVectorImpl<char>&) const (/build/./bin/clang+0x1ddbae4)
#9 0x0000000001ddb323 clang::Diagnostic::FormatDiagnostic(char const*, char const*, llvm::SmallVectorImpl<char>&) const (/build/./bin/clang+0x1ddb323)
#10 0x00000000022878a4 clang::TextDiagnosticBuffer::HandleDiagnostic(clang::DiagnosticsEngine::Level, clang::Diagnostic const&) (/build/./bin/clang+0x22878a4)
#11 0x0000000001ddf387 clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const (/build/./bin/clang+0x1ddf387)
#12 0x0000000001dd9dea clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) (/build/./bin/clang+0x1dd9dea)
#13 0x0000000002cad00c clang::Sema::EmitCurrentDiagnostic(unsigned int) (/build/./bin/clang+0x2cad00c)
#14 0x0000000002d91cd2 clang::Sema::CheckShadow(clang::NamedDecl*, clang::NamedDecl*, clang::LookupResult const&) (/build/./bin/clang+0x2d91cd2)

Stack dump:
0.      Program arguments: /build/./bin/clang -cc1 -internal-isystem /build/lib/clang/5.0.0/include -nostdsysteminc -verify -fsyntax-only -std=c++11 -Wshadow-all /src/tools/clang/test/SemaCXX/warn-shadow.cpp
1.      /src/tools/clang/test/SemaCXX/warn-shadow.cpp:214:23: current parser token ';'
2.      /src/tools/clang/test/SemaCXX/warn-shadow.cpp:213:26: parsing function body 'handleLinkageSpec'
3.      /src/tools/clang/test/SemaCXX/warn-shadow.cpp:213:26: in compound statement ('{}')
/build/tools/clang/test/SemaCXX/Output/warn-shadow.cpp.script: line 1: 15595 Aborted                 (core dumped) /build/./bin/clang -cc1 -internal-isystem /build/lib/clang/5.0.0/include -nostdsysteminc -verify -fsyntax-only -std=c++11 -Wshadow-all /src/tools/clang/test/SemaCXX/warn-shadow.cpp

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: krytarowski, cfe-commits

Differential Revision: https://reviews.llvm.org/D33207

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303325 91177308-0d34-0410-b5e6-96231b3b80d8
@sbc100 sbc100 closed this as completed Nov 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants