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

LLVM 3.3 crash on OSX: /bin/sh: line 1: 84249 Floating point exception: 8 #436

Closed
timotheecour opened this issue Aug 3, 2013 · 12 comments
Closed

Comments

@timotheecour
Copy link

cd path/to/ldc
git pull
git submodule update --init
mkdir build2
cd build2
ccmake ..
cmake ..
make -j8

[ 51%] Generating std/metastrings.o
[ 51%] /bin/sh: line 1: 84249 Floating point exception: 8 /Users/timothee/shortcuts/git_clone/D/ldc/build2/bin/ldc2 --output-o -c -I/Users/timothee/shortcuts/git_clone/D/ldc/runtime/druntime/src -I/Users/timothee/shortcuts/git_clone/D/ldc/runtime/druntime/src/gc /Users/timothee/shortcuts/git_clone/D/ldc/runtime/phobos/std/file.d -of/Users/timothee/shortcuts/git_clone/D/ldc/build2/runtime/std/file.o -w -d -O3 -release -I/Users/timothee/shortcuts/git_clone/D/ldc/runtime/phobos
make[2]: *** [runtime/std/file.o] Error 136
make[2]: *** Waiting for unfinished jobs....

@timotheecour
Copy link
Author

ping ?
this is a real blocker

@timotheecour
Copy link
Author

i also tried building ldc using the latest llvm git master :

[ 30%] Generating src/core/thread-debug.o
Assertion failed: (Ty && "Trying to add a type that doesn't exist?"), function addType, file llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp, line 779.
0 ldc2 0x000000010afa8b23 llvm::sys::PrintStackTrace(sFILE) + 51
1 ldc2 0x000000010afa8e8e PrintStackTraceSignalHandler(void
) + 30
2 ldc2 0x000000010afa90c0 SignalHandler(int) + 320
3 libsystem_c.dylib 0x00007fff98b4594a sigtramp + 26
4 libsystem_c.dylib 0x00007ff000000000 sigtramp + 1733011152
5 ldc2 0x000000010afa89ef raise + 31
6 ldc2 0x000000010afa8a20 abort + 16
7 ldc2 0x000000010afa8aed assert_rtn + 189
8 ldc2 0x000000010a455f75 llvm::CompileUnit::addType(llvm::DIE
, llvm::DIType, unsigned short) + 125
9 ldc2 0x000000010a456573 llvm::CompileUnit::createMemberDIE(llvm::DIDerivedType) + 355
10 ldc2 0x000000010a4552c8 llvm::CompileUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType) + 2574
11 ldc2 0x000000010a45460f llvm::CompileUnit::getOrCreateTypeDIE(llvm::MDNode const
) + 475
12 ldc2 0x000000010a455ff2 llvm::CompileUnit::addType(llvm::DIE
, llvm::DIType, unsigned short) + 250
13 ldc2 0x000000010a4598b7 llvm::CompileUnit::createGlobalVariableDIE(llvm::MDNode const
) + 957
14 ldc2 0x000000010a472a9d llvm::DwarfDebug::beginModule() + 887
15 ldc2 0x000000010a477904 llvm::DwarfDebug::DwarfDebug(llvm::AsmPrinter_, llvm::Module_) + 2270
16 ldc2 0x000000010a4285b9 llvm::AsmPrinter::doInitialization(llvm::Module&) + 1237
17 ldc2 0x000000010aee3efe llvm::FPPassManager::doInitialization(llvm::Module&) + 86
18 ldc2 0x000000010aee7173 llvm::FunctionPassManagerImpl::doInitialization(llvm::Module&) + 301
19 ldc2 0x000000010aee315d llvm::FunctionPassManager::doInitialization() + 59
20 ldc2 0x0000000109578e29 codegenModule(llvm::TargetMachine&, llvm::Module&, llvm::raw_fd_ostream&, llvm::TargetMachine::CodeGenFileType) + 681
21 ldc2 0x0000000109577ace writeModule(llvm::Module_, std::string) + 3470
22 ldc2 0x00000001095879bb main + 16779
23 libdyld.dylib 0x00007fff912ce7e1 start + 0
24 libdyld.dylib 0x000000000000000b start + 1859328042
/bin/sh: line 1: 75813 Illegal instruction: 4 ldc/build5/bin/ldc2 --output-o -c -ldc/runtime/druntime/src -Ildc/runtime/druntime/src/gcldc/runtime/druntime/src/core/thread.d -ofldc/build5/runtime/src/core/thread-debug.o -w -d -g -disable-invariants
make[2]: *_* [runtime/src/core/thread-debug.o] Error 132
make[1]: *** [runtime/CMakeFiles/druntime-ldc-debug.dir/all] Error 2

@timotheecour
Copy link
Author

update: ok it compiles and runs with llvm 3.2, not 3.3

@timotheecour
Copy link
Author

reopening because it should be made to work on 3.3

@timotheecour timotheecour reopened this Aug 19, 2013
@redstar
Copy link
Member

redstar commented Aug 19, 2013

I am working on the LLVM 3.4 issue. They introduced new functionality and extended the checks on debug info which leads to this crash.
I am not sure if can do anything about the OSX problem because I don't have an OSX box.

@timotheecour
Copy link
Author

please don't neglect OSX users :) !

@dnadlinger
Copy link
Member

@timotheecour: On OS X, LDC will never run on LLVM 3.3, because of a regression the LLVM team deliberately chose to leave unfixed: http://llvm.org/bugs/show_bug.cgi?id=15972

Of course, once it became obvious that this also affects Clang (I guess I should have spelt that out explicitly), they fixed it, but…

@dnadlinger
Copy link
Member

Also added that piece of information to the "Building from source" page. Do you think it makes sense to add checks for known bad versions to CMake?

@timotheecour
Copy link
Author

yes, until it's fixed. Took me some time to figure out it was because I was using 3.3 instead of 3.2.

Also, seems like they DID fix it in that thread you mentioned, so can LDC run

  • on 3.3?
  • on 3.4?

@dnadlinger
Copy link
Member

Nope, the fix was done after the 3.3 release (Clang also shipped with the regression, and it turns out that people have thread-local statics in C++ templates too…). I don't know a reason why LLVM trunk shouldn't work in theory, but then again, API changes are pretty frequent, and there still seems be an issue concerning debug info (https://travis-ci.org/ldc-developers/ldc/jobs/10686173).

@dnadlinger
Copy link
Member

Also, regarding "until it's fixed": As far as I am aware, there are are no point releases of LLVM, so this is never going to get fixed in LLVM 3.3.

@redstar
Copy link
Member

redstar commented Aug 28, 2013

There is ongoing work to prepare a LLVM 3.3.1 release. But I don't know if this particular problem is fixed in this release.

redstar pushed a commit that referenced this issue Sep 27, 2014
Remove long-deprecated time-related functions.
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

3 participants