Opened 4 years ago

Closed 2 months ago

#45180 closed defect (fixed)

fswatch: build fails on Snow Leopard

Reported by: ryandesign (Ryan Schmidt) Owned by: emcrisostomo (Enrico Maria Crisostomo)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc:
Port: fswatch


fswatch 1.4.5 fails to build on the Snow Leopard build server because clang-3.5 crashes:

Assertion failed: (EST != EST_Unevaluated && EST != EST_Uninstantiated), function isNothrow, file Type.cpp, line 1697.
0  libLLVM-3.5.dylib 0x00000001023257eb llvm::sys::PrintStackTrace(__sFILE*) + 40
1  libLLVM-3.5.dylib 0x0000000102325bd6 SignalHandler(int) + 248
2  libSystem.B.dylib 0x00007fff820f61ba _sigtramp + 26
3  libSystem.B.dylib 0x0000000103bf0a00 _sigtramp + 2175772768
4  libLLVM-3.5.dylib 0x0000000102325a3d abort + 22
5  libLLVM-3.5.dylib 0x0000000102325a27 abort + 0
6  clang             0x0000000100a88024 clang::FunctionProtoType::isNothrow(clang::ASTContext const&, bool) const + 258
7  clang             0x00000001001be797 clang::CodeGen::CodeGenModule::ConstructAttributeList(clang::CodeGen::CGFunctionInfo const&, clang::Decl const*, llvm::SmallVector<llvm::AttributeSet, 8u>&, unsigned int&, bool) + 425
8  clang             0x0000000100280b5a clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(clang::Decl const*, clang::CodeGen::CGFunctionInfo const&, llvm::Function*) + 86
9  clang             0x000000010028122b clang::CodeGen::CodeGenModule::SetFunctionAttributes(clang::GlobalDecl, llvm::Function*, bool) + 137
10 clang             0x0000000100282aa5 clang::CodeGen::CodeGenModule::GetOrCreateLLVMFunction(llvm::StringRef, llvm::Type*, clang::GlobalDecl, bool, bool, llvm::AttributeSet) + 459
11 clang             0x00000001001ba24f clang::CodeGen::CodeGenModule::GetAddrOfCXXDestructor(clang::CXXDestructorDecl const*, clang::CXXDtorType, clang::CodeGen::CGFunctionInfo const*, llvm::FunctionType*, bool) + 199
12 clang             0x00000001002b04b9 (anonymous namespace)::ItaniumCXXABI::EmitDestructorCall(clang::CodeGen::CodeGenFunction&, clang::CXXDestructorDecl const*, clang::CXXDtorType, bool, bool, llvm::Value*) + 185
13 clang             0x00000001001cde39 clang::CodeGen::CodeGenFunction::destroyCXXObject(clang::CodeGen::CodeGenFunction&, llvm::Value*, clang::QualType) + 163
14 clang             0x00000001001e9cd2 clang::CodeGen::CodeGenFunction::emitDestroy(llvm::Value*, clang::QualType, void (*)(clang::CodeGen::CodeGenFunction&, llvm::Value*, clang::QualType), bool) + 144
15 clang             0x00000001001d4411 EmitCleanup(clang::CodeGen::CodeGenFunction&, clang::CodeGen::EHScopeStack::Cleanup*, clang::CodeGen::EHScopeStack::Cleanup::Flags, llvm::Value*) + 292
16 clang             0x00000001001d3bbc clang::CodeGen::CodeGenFunction::PopCleanupBlock(bool) + 4128
17 clang             0x00000001001d2b52 clang::CodeGen::CodeGenFunction::PopCleanupBlocks(clang::CodeGen::EHScopeStack::stable_iterator) + 64
18 clang             0x00000001001d3f08 clang::CodeGen::CodeGenFunction::PopCleanupBlocks(clang::CodeGen::EHScopeStack::stable_iterator, unsigned long) + 32
19 clang             0x00000001002200f9 clang::StmtVisitorBase<clang::make_ptr, (anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 4467
20 clang             0x0000000100218daf clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 99
21 clang             0x00000001001e791e clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 188
22 clang             0x00000001001e93d4 clang::CodeGen::CodeGenFunction::EmitExprAsInit(clang::Expr const*, clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 430
23 clang             0x00000001001e89f1 clang::CodeGen::CodeGenFunction::EmitAutoVarInit(clang::CodeGen::CodeGenFunction::AutoVarEmission const&) + 619
24 clang             0x00000001001e6f4a clang::CodeGen::CodeGenFunction::EmitAutoVarDecl(clang::VarDecl const&) + 46
25 clang             0x0000000100269d95 clang::CodeGen::CodeGenFunction::EmitDeclStmt(clang::DeclStmt const&) + 79
26 clang             0x000000010026587f clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 295
27 clang             0x0000000100264f03 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 75
28 clang             0x000000010026a5c3 clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) + 83
29 clang             0x0000000100279b3d clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&, clang::Stmt const*) + 93
30 clang             0x000000010027a0ab clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 1111
31 clang             0x0000000100283d4c clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) + 642
32 clang             0x0000000100281e27 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) + 327
33 clang             0x000000010028566f clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 1229
34 clang             0x00000001002c19cc (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 80
35 clang             0x0000000100276208 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 132
36 clang             0x00000001002d966f clang::ParseAST(clang::Sema&, bool, bool) + 306
37 clang             0x0000000100275759 clang::CodeGenAction::ExecuteAction() + 461
38 clang             0x000000010005e683 clang::FrontendAction::Execute() + 67
39 clang             0x000000010003a24b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 527
40 clang             0x000000010000b31a clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4054
41 clang             0x0000000100003d77 cc1_main(char const**, char const**, char const*, void*) + 907
42 clang             0x0000000100009849 main + 7818
43 clang             0x00000001000039e4 start + 52
44 clang             0x0000000000000047 start + 4294952599
Stack dump:
0.	Program arguments: /opt/local/libexec/llvm-3.5/bin/clang -cc1 -triple x86_64-apple-macosx10.6.0 -emit-obj -disable-free -main-file-name libfswatch.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 136 -dwarf-column-info -coverage-file /opt/local/var/macports/build/_opt_mports_dports_sysutils_fswatch/fswatch/work/fswatch-1.4.5/libfswatch/src/libfswatch/c/.libs/libfswatch.o -resource-dir /opt/local/libexec/llvm-3.5/bin/../lib/clang/3.5.0 -dependency-file c/.deps/libfswatch.Tpo -sys-header-deps -MP -MT c/libfswatch.lo -D HAVE_CONFIG_H -D LOCALEDIR="/opt/local/share/locale" -D PIC -I . -I ../.. -I /opt/local/include -I/opt/local/include -stdlib=libstdc++ -Os -Wall -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /opt/local/var/macports/build/_opt_mports_dports_sysutils_fswatch/fswatch/work/fswatch-1.4.5/libfswatch/src/libfswatch -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.6.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fno-common -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o c/.libs/libfswatch.o -x c++ c/libfswatch.cpp 
1.	c/libfswatch.cpp:209:1: current parser token 'int'
2.	c/libfswatch.cpp:166:12: LLVM IR generation of declaration 'fsw_init_session'
3.	c/libfswatch.cpp:166:12: Generating code for declaration 'fsw_init_session'
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.5.0 (branches/release_35 216817)
Target: x86_64-apple-darwin10.8.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 

Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /opt/local/var/macports/build/_opt_mports_dports_sysutils_fswatch/fswatch/work/.tmp/libfswatch-b660f8.cpp
clang: note: diagnostic msg: /opt/local/var/macports/build/_opt_mports_dports_sysutils_fswatch/fswatch/work/.tmp/
clang: note: diagnostic msg: 

make[5]: *** [c/libfswatch.lo] Error 1

This was previously reported in #44726 where it was using clang-3.4, and the solution was to blacklist clang-3.4 and clang-3.3 and add clang-3.5 to the fallback, but now clang-3.5 is crashing as well.

Using clang-3.5 or later on OS X 10.8 or earlier is problematic because it forces the use of libc++.

I'll test with clang-3.6, but it'll take me awhile to build it.

Was a bug report ever filed with llvm, as the error message says to do? If not, that should be done. If there is a fix, it would be great to get it into llvm-3.4 at least so that libc++ is not required.

Change History (4)

comment:1 Changed 4 years ago by emcrisostomo (Enrico Maria Crisostomo)


Thank you very much Ryan.

No, I did not file a bug report and I’m glad to do it now. By the way, how can I get the files I should attach to the bug report, as specified by the CLang error message:

Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /opt/local/var/macports/build/_opt_mports_dports_sysutils_fswatch/fswatch/work/.tmp/libfswatch-b660f8.cpp
clang: note: diagnostic msg: /opt/local/var/macports/build/_opt_mports_dports_sysutils_fswatch/fswatch/work/.tmp/
clang: note: diagnostic msg: 

Thank you very much in advance, -- Enrico

comment:2 Changed 3 years ago by ryandesign (Ryan Schmidt)

Those files are on the automated build server, to which you don't have access (they get removed right after the automated build anyway). You would need to reproduce the failure on your own system (which might need to be a Snow Leopard system) and then attach the files from your own system.

comment:3 Changed 2 months ago by kencu (Ken)

Fixed somewhere along the way:

$ port -v installed fswatch
The following ports are currently installed:
  fswatch @1.14.0_0 (active) platform='darwin 10' archs='x86_64' date='2018-12-05T17:11:28-0800'

comment:4 Changed 2 months ago by kencu (Ken)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.