compiler-research / CppInterOp

A Clang-based C++ Interoperability Library
Other
50 stars 22 forks source link

Regarding lot of undefined symbols while building xeus-cpp against emscripten #334

Open anutosh491 opened 1 week ago

anutosh491 commented 1 week ago

Few days back I had opened https://github.com/compiler-research/xeus-cpp/issues/159 to discuss the above topic.

I hope xeus-cpp is expected to be abstracted away from any libraries coming out of llvm/clang which means eventually we might only want to link with clangcppInterOp but when I build xeus-cpp using emscripten we end up with lot of undefined symbols

warning: undefined symbol: LLVMInitializeWebAssemblyAsmPrinter (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: LLVMInitializeWebAssemblyTarget (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: LLVMInitializeWebAssemblyTargetInfo (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: LLVMInitializeWebAssemblyTargetMC (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm11StringErrorC1ERKNS_5TwineENSt3__210error_codeE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm11raw_ostream14flush_nonemptyEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm11raw_ostream16SetBufferAndModeEPcmNS0_10BufferKindE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm11raw_ostream5writeEPKcm (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm11raw_ostreamD2Ev (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm13ErrorInfoBase2IDE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm13StringMapImpl11RehashTableEj (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm13StringMapImpl4initEj (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm13StringMapImpl9RemoveKeyEPNS_18StringMapEntryBaseE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm14identify_magicENS_9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm15SmallVectorBaseIjE13mallocForGrowEPvmmRm (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm15SmallVectorBaseIjE8grow_podEPvmm (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm15allocate_bufferEmm (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm17deallocate_bufferEPvmm (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm19SmallPtrSetImplBase14insert_imp_bigEPKv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm21logAllUnhandledErrorsENS_5ErrorERNS_11raw_ostreamENS_5TwineE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm2cl23ParseCommandLineOptionsEiPKPKcNS_9StringRefEPNS_11raw_ostreamES2_b (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3orc15ResourceTrackerD1Ev (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3orc34AbsoluteSymbolsMaterializationUnitC1ENS_8DenseMapINS0_15SymbolStringPtrENS0_17ExecutorSymbolDefENS_12DenseMapInfoIS3_vEENS_6detail12DenseMapPairIS3_S4_EEEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3orc5LLJIT25getProcessSymbolsJITDylibEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3orc8JITDylib10defineImplERNS0_19MaterializationUnitE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3orc8JITDylib25getDefaultResourceTrackerEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3orc8JITDylib26installMaterializationUnitENSt3__[210](https://github.com/compiler-research/xeus-cpp/actions/runs/11208333044/job/31151843688#step:7:211)unique_ptrINS0_19MaterializationUnitENS2_14default_deleteIS4_EEEERNS0_15ResourceTrackerE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3orc8JITDylib6removeERKNS_8DenseSetINS0_15SymbolStringPtrENS_12DenseMapInfoIS3_vEEEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3orc8JITDylibD1Ev (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys14DynamicLibrary24SearchForAddressOfSymbolEPKc (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys2fs12current_pathERNS_15SmallVectorImplIcEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys2fs12is_directoryERKNS_5TwineERb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys2fs13get_file_typeERKNS_5TwineEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys2fs17getMainExecutableEPKcPv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys2fs6detail27directory_iterator_destructERNS2_12DirIterStateE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys2fs6detail28directory_iterator_constructERNS2_12DirIterStateENS_9StringRefEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys2fs6detail28directory_iterator_incrementERNS2_12DirIterStateE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys2fs9real_pathERKNS_5TwineERNS_15SmallVectorImplIcEEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path11is_absoluteERKNS_5TwineENS1_5StyleE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path11is_relativeERKNS_5TwineENS1_5StyleE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path11parent_pathENS_9StringRefENS1_5StyleE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path12is_separatorEcNS1_5StyleE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path13get_separatorENS1_5StyleE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path14home_directoryERNS_15SmallVectorImplIcEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path15remove_filenameERNS_15SmallVectorImplIcEENS1_5StyleE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path6appendERNS_15SmallVectorImplIcEERKNS_5TwineES7_S7_S7_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys4path8filenameENS_9StringRefENS1_5StyleE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm3sys7Process6GetEnvENS_9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm4errsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm5APInt12initSlowCaseERKS0_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm6APSIntC1ENS_9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm6object10ObjectFile16createObjectFileENS_9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm6object15object_categoryEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm6object21getELFSectionTypeNameEjj (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm6object23ExportDirectoryEntryRef8moveNextEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm9DebugFlagE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN4llvm9ErrorList2IDE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang10ASTContext19createMangleContextEPKNS_10TargetInfoE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11DeclContext17getPrimaryContextEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11DeclContext7classofEPKNS_4DeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11FileManager15getDirectoryRefEN4llvm9StringRefEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11Interpreter14createWithCUDAENSt3__210unique_ptrINS_16CompilerInstanceENS1_14default_deleteIS3_EEEES6_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11Interpreter15ParseAndExecuteEN4llvm9StringRefEPNS_5ValueE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11Interpreter18LoadDynamicLibraryEPKc (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11Interpreter18getExecutionEngineEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11Interpreter5ParseEN4llvm9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11Interpreter6createENSt3__210unique_ptrINS_16CompilerInstanceENS1_14default_deleteIS3_EEEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11Interpreter7ExecuteERNS_22PartialTranslationUnitE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11InterpreterD1Ev (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11LangOptionsC1Ev (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang11ParmVarDecl13getDefaultArgEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang12HeaderSearch13AddSearchPathERKNS_15DirectoryLookupEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang12LookupResult11deletePathsEPNS_12CXXBasePathsE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang12LookupResult11resolveKindEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang12LookupResult9configureEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang12TemplateNameC1EPNS_12TemplateDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang13MangleContext10mangleNameENS_10GlobalDeclERN4llvm11raw_ostreamE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang13MangleContext20shouldMangleDeclNameEPKNS_9NamedDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang16CompilerInstance20LoadRequestedPluginsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang16TemplateArgumentC1ERNS_10ASTContextERKN4llvm6APSIntENS_8QualTypeEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang18DeclarationNameLocC1ENS_15DeclarationNameE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang18UsingDirectiveDecl21getNominatedNamespaceEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang19getClangFullVersionEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang26IncrementalCompilerBuilder14CreateCudaHostEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang26IncrementalCompilerBuilder16CreateCudaDeviceEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang26IncrementalCompilerBuilder9CreateCppEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Decl17castToDeclContextEPKS0_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Decl19castFromDeclContextEPKNS_11DeclContextE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Decl7addAttrEPNS_4AttrE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Expr14IgnoreImpCastsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema10LookupNameERNS_12LookupResultEPNS_5ScopeEbb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema13IsDerivedFromENS_14SourceLocationENS_8QualTypeES2_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema17CheckLookupAccessERKNS_12LookupResultE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema18CheckVarTemplateIdEPNS_15VarTemplateDeclENS_14SourceLocationES3_RKNS_24TemplateArgumentListInfoE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema19CheckTemplateIdTypeENS_12TemplateNameENS_14SourceLocationERNS_24TemplateArgumentListInfoE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema19LookupQualifiedNameERNS_12LookupResultEPNS_11DeclContextEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema19RequireCompleteTypeENS_14SourceLocationENS_8QualTypeENS0_16CompleteTypeKindEj (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema23DeduceTemplateArgumentsEPNS_20FunctionTemplateDeclEPNS_24TemplateArgumentListInfoERPNS_12FunctionDeclERNS_4sema21TemplateDeductionInfoEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema23DiagnoseAmbiguousLookupERNS_12LookupResultE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema23RequireCompleteTypeImplENS_14SourceLocationENS_8QualTypeENS0_16CompleteTypeKindEPNS0_13TypeDiagnoserE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema24LookupDefaultConstructorEPNS_13CXXRecordDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema24getDefaultedFunctionKindEPKNS_12FunctionDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema29InstantiateFunctionDefinitionENS_14SourceLocationEPNS_12FunctionDeclEbbb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema29getTrivialTemplateArgumentLocERKNS_16TemplateArgumentENS_8QualTypeENS_14SourceLocationE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang4Sema33ForceDeclarationOfImplicitMembersEPNS_13CXXRecordDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang5ValueC1ERKS0_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang5ValueD1Ev (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang7VarDecl7getInitEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang8QualType16getDesugaredTypeES0_RKNS_10ASTContextE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang8QualType27getSplitUnqualifiedTypeImplES0_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang8UsedAttr14CreateImplicitERNS_10ASTContextENS_11SourceRangeENS0_8SpellingE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZN5clang9NamedDecl21getUnderlyingDeclImplEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm11GlobalValue13isDeclarationEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm13StringMapImpl7FindKeyENS_9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm19SmallPtrSetImplBase13FindBucketForEPKv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm3sys2fs15directory_entry6statusEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm5APInt11sextOrTruncEj (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm5APInt11zextOrTruncEj (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm5APInt25countLeadingZerosSlowCaseEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm5Twine8toVectorERNS_15SmallVectorImplIcEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm5Value7getNameEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object14COFFObjectFile20export_directory_endEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object14COFFObjectFile22export_directory_beginEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object15MachOObjectFile13load_commandsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object15MachOObjectFile15getRpathCommandERKNS1_15LoadCommandInfoE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object15MachOObjectFile21getDylibIDLoadCommandERKNS1_15LoadCommandInfoE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object23ExportDirectoryEntryRef13getSymbolNameERNS_9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object23ExportDirectoryEntryRefeqERKS1_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE0ELb0EEEE12toMappedAddrEyNS_12function_refIFNS_5ErrorERKNS_5TwineEEEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE0ELb0EEEE14dynamicEntriesEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE0ELb1EEEE12toMappedAddrEyNS_12function_refIFNS_5ErrorERKNS_5TwineEEEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE0ELb1EEEE14dynamicEntriesEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE12toMappedAddrEyNS_12function_refIFNS_5ErrorERKNS_5TwineEEEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb0EEEE14dynamicEntriesEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb1EEEE12toMappedAddrEyNS_12function_refIFNS_5ErrorERKNS_5TwineEEEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm6object7ELFFileINS0_7ELFTypeILNS_7support10endiannessE1ELb1EEEE14dynamicEntriesEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm9StringRef16find_last_not_ofES0_m (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm9StringRef17find_first_not_ofES0_m (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm9StringRef17find_first_not_ofEcm (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm9StringRef23starts_with_insensitiveES0_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm9StringRef4findES0_m (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm9StringRef5rfindES0_ (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK4llvm9StringRef5splitERNS_15SmallVectorImplIS0_EES0_ib (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10ASTContext11getIntWidthENS_8QualTypeE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10ASTContext11getTypeInfoEPKNS_4TypeE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10ASTContext14getComplexTypeENS_8QualTypeE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10ASTContext14getTagDeclTypeEPKNS_7TagDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10ASTContext18getASTRecordLayoutEPKNS_10RecordDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10ASTContext19getTypeDeclTypeSlowEPKNS_8TypeDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10ASTContext19toCharUnitsFromBitsEx (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10ASTContext24GetGVALinkageForVariableEPKNS_7VarDeclE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang10RecordDecl11field_beginEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11DeclContext11decls_beginEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11DeclContext13udir_iteratordeEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11DeclContext16using_directivesEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11DeclContext20isTransparentContextEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11DeclContext6lookupENS_15DeclarationNameE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11Interpreter16getSymbolAddressEN4llvm9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11Interpreter19getCompilerInstanceEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11Interpreter30getSymbolAddressFromLinkerNameEN4llvm9StringRefE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11ParmVarDecl13hasDefaultArgEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang11ParmVarDecl15getOriginalTypeEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl10isVariadicEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl12getNumParamsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl16getTemplatedKindEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl23getMinRequiredArgumentsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl23isTemplateInstantiationEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl24isImplicitlyInstantiableEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl29getTemplateSpecializationKindEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl31getTemplateInstantiationPatternEb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang12FunctionDecl9isDefinedERPKS0_b (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang13CXXMethodDecl23size_overridden_methodsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang13CXXMethodDecl8isStaticEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang13CXXRecordDecl11forallBasesEN4llvm12function_refIFbPKS0_EEE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang13CXXRecordDecl13getDestructorEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang13CXXRecordDecl13isDerivedFromEPKS0_RNS_12CXXBasePathsE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang13CXXRecordDecl14DefinitionData16getBasesSlowCaseEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang13CXXRecordDecl41lambdaIsDefaultConstructibleAndAssignableEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang13SourceManager13loadSLocEntryEjPb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang15DeclarationName11getAsStringEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang18CXXConstructorDecl20isDefaultConstructorEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Decl11getLangOptsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Decl13getASTContextEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Decl4dumpEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Decl5printERN4llvm11raw_ostreamERKNS_14PrintingPolicyEjb (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Decl8getAttrsEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Stmt11printPrettyERN4llvm11raw_ostreamEPNS_13PrinterHelperERKNS_14PrintingPolicyEjNS1_9StringRefEPKNS_10ASTContextE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Type14getPointeeTypeEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Type14isFloatingTypeEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Type18getAsCXXRecordDeclEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Type27getUnqualifiedDesugaredTypeEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang4Type29getArrayElementTypeNoTypeQualEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang7TagDecl13getDefinitionEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang7TagType7getDeclEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang8QualType11getAsStringERKNS_14PrintingPolicyE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang8QualType11getAsStringEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang8QualType19getAsStringInternalERNSt3__[212](https://github.com/compiler-research/xeus-cpp/actions/runs/11208333044/job/31151843688#step:7:213)basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_14PrintingPolicyE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang8QualType5printERN4llvm11raw_ostreamERKNS_14PrintingPolicyERKNS1_5TwineEj (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang8QualType9isPODTypeERKNS_10ASTContextE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang9FieldDecl13getFieldIndexEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZNK5clang9NamedDecl24getQualifiedNameAsStringEv (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZTVN4llvm18raw_string_ostreamE (referenced by root reference (e.g. compiled C/C++ code))
warning: undefined symbol: _ZTVN4llvm9ErrorListE (referenced by root reference (e.g. compiled C/C++ code))

As I made a note on the other issue, these are coming out of these 8-9 libraries

libLLVMWebAssemblyCodeGen.a - for first 4
libLLVMSupport.a
libLLVMOrcJIT.a
libLLVMObject.a
libclangAST.a
libclangInterpreter.a
libclangLex.a
libclangBasic.a
anutosh491 commented 1 week ago

Now I see this https://github.com/compiler-research/CppInterOp/blob/757e7e8fcbb988be53a4035d214e86cc11778e3c/lib/Interpreter/CMakeLists.txt#L37-L44

Which hopefully links these against clangcppInterop (I see quite some common like above we have clanglex, clangbasic, clangast which are a part of link_libs too) so I guess we shouldn't be expecting missing symbols out of these ?

Or am I missing something ?

anutosh491 commented 1 week ago

The llvm recipe on emscripten-forge is pretty clean now and provides all of the libraries that might be essential (under PREFIX/lib)

(base) anutosh491@Anutoshs-MacBook-Air lib % ls
clang                                   libLLVMDlltoolDriver.a                  libLLVMObjCopy.a                        libLLVMWebAssemblyUtils.a               libclangInstallAPI.a
cmake                                   libLLVMExecutionEngine.a                libLLVMObject.a                         libLLVMWindowsDriver.a                  libclangInterpreter.a
libLLVMAggressiveInstCombine.a          libLLVMExegesis.a                       libLLVMObjectYAML.a                     libLLVMWindowsManifest.a                libclangLex.a
libLLVMAnalysis.a                       libLLVMExtensions.a                     libLLVMOptDriver.a                      libLLVMXRay.a                           libclangParse.a
libLLVMAsmParser.a                      libLLVMFileCheck.a                      libLLVMOption.a                         libLLVMipo.a                            libclangRewrite.a
libLLVMAsmPrinter.a                     libLLVMFrontendDriver.a                 libLLVMOrcDebugging.a                   libLTO.a                                libclangRewriteFrontend.a
libLLVMBinaryFormat.a                   libLLVMFrontendHLSL.a                   libLLVMOrcJIT.a                         libRemarks.a                            libclangSema.a
libLLVMBitReader.a                      libLLVMFrontendOffloading.a             libLLVMOrcShared.a                      libclang-cpp.a                          libclangSerialization.a
libLLVMBitWriter.a                      libLLVMFrontendOpenACC.a                libLLVMOrcTargetProcess.a               libclang.a                              libclangStaticAnalyzerCheckers.a
libLLVMBitstreamReader.a                libLLVMFrontendOpenMP.a                 libLLVMPasses.a                         libclangAPINotes.a                      libclangStaticAnalyzerCore.a
libLLVMCFGuard.a                        libLLVMFuzzMutate.a                     libLLVMProfileData.a                    libclangARCMigrate.a                    libclangStaticAnalyzerFrontend.a
libLLVMCFIVerify.a                      libLLVMFuzzerCLI.a                      libLLVMRemarks.a                        libclangAST.a                           libclangSupport.a
libLLVMCodeGen.a                        libLLVMGlobalISel.a                     libLLVMRuntimeDyld.a                    libclangASTMatchers.a                   libclangTooling.a
libLLVMCodeGenData.a                    libLLVMHipStdPar.a                      libLLVMSandboxIR.a                      libclangAnalysis.a                      libclangToolingASTDiff.a
libLLVMCodeGenTypes.a                   libLLVMIRPrinter.a                      libLLVMScalarOpts.a                     libclangAnalysisFlowSensitive.a         libclangToolingCore.a
libLLVMCore.a                           libLLVMIRReader.a                       libLLVMSelectionDAG.a                   libclangAnalysisFlowSensitiveModels.a   libclangToolingInclusions.a
libLLVMCoroutines.a                     libLLVMInstCombine.a                    libLLVMSupport.a                        libclangBasic.a                         libclangToolingInclusionsStdlib.a
libLLVMCoverage.a                       libLLVMInstrumentation.a                libLLVMSymbolize.a                      libclangCodeGen.a                       libclangToolingRefactoring.a
libLLVMDWARFLinker.a                    libLLVMInterfaceStub.a                  libLLVMTableGen.a                       libclangCrossTU.a                       libclangToolingSyntax.a
libLLVMDWARFLinkerClassic.a             libLLVMInterpreter.a                    libLLVMTableGenBasic.a                  libclangDependencyScanning.a            libclangTransformer.a
libLLVMDWARFLinkerParallel.a            libLLVMJITLink.a                        libLLVMTableGenCommon.a                 libclangDirectoryWatcher.a              libear
libLLVMDWP.a                            libLLVMLTO.a                            libLLVMTarget.a                         libclangDriver.a                        liblldCOFF.a
libLLVMDebugInfoBTF.a                   libLLVMLibDriver.a                      libLLVMTargetParser.a                   libclangDynamicASTMatchers.a            liblldCommon.a
libLLVMDebugInfoCodeView.a              libLLVMLineEditor.a                     libLLVMTextAPI.a                        libclangEdit.a                          liblldELF.a
libLLVMDebugInfoDWARF.a                 libLLVMLinker.a                         libLLVMTextAPIBinaryReader.a            libclangExtractAPI.a                    liblldMachO.a
libLLVMDebugInfoGSYM.a                  libLLVMMC.a                             libLLVMTransformUtils.a                 libclangFormat.a                        liblldMinGW.a
libLLVMDebugInfoLogicalView.a           libLLVMMCA.a                            libLLVMVectorize.a                      libclangFrontend.a                      liblldWasm.a
libLLVMDebugInfoMSF.a                   libLLVMMCDisassembler.a                 libLLVMWebAssemblyAsmParser.a           libclangFrontendTool.a                  libscanbuild
libLLVMDebugInfoPDB.a                   libLLVMMCJIT.a                          libLLVMWebAssemblyCodeGen.a             libclangHandleCXX.a
libLLVMDebuginfod.a                     libLLVMMCParser.a                       libLLVMWebAssemblyDesc.a                libclangHandleLLVM.a
libLLVMDemangle.a                       libLLVMMIRParser.a                      libLLVMWebAssemblyDisassembler.a        libclangIndex.a
libLLVMDiff.a                           libLLVMObjCARCOpts.a                    libLLVMWebAssemblyInfo.a                libclangIndexSerialization.a

So I don't think its a problem out of the llvm recipe on emscripten-forge.

anutosh491 commented 6 days ago

The CI building xeus-cpp in cppinterop show even more undefined symbols. Can be seen here https://github.com/compiler-research/CppInterOp/actions/runs/11441766749/job/31835522416?pr=290#step:10:141