www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Trying to use the libclang Dub package

reply bachmeier <no spam.net> writes:
I haven't been able to get dpp to build. I've discovered that the 
problem is with libclang. It installs, but when running the 
tests, I get the lengthy message below. Obviously I need to 
install something (running Ubuntu 16.04) but I've got numerous 
libclang related packages installed already and have no idea what 
that could be. What dependency am I missing?




$ dub test libclang
Building package libclang in 
/home/office/.dub/packages/libclang-0.0.6/libclang/
Package unit-threaded can be upgraded from 0.7.40 to 0.7.46.
Use "dub upgrade" to perform those changes.
Running custom 'unittest' configuration.
Performing "unittest" build using /usr/bin/dmd for x86_64.
unit-threaded 0.7.40: target for configuration "library" is up to 
date.
libclang 0.0.6: building configuration "unittest"...
tests/parse/cooked.d(22,45): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(23,45): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(27,45): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(28,45): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(32,45): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(33,45): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(79,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(80,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(84,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(85,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(89,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(90,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(114,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(118,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(122,41): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(139,14): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/parse/cooked.d(159,36): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module parse.cooked
tests/wrap.d(17,34): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module wrap
tests/wrap.d(23,40): Deprecation: 
test.infra.file.NewTranslationUnit.Cursor is not visible from 
module wrap
Linking...
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang5parseFNfxAyaxAQfxEQz9__mixin1620TranslationUnitFlagsZSQCj15TranslationUnit':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:35:
undefined reference to `clang_createIndex'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:61:
undefined reference to `clang_getNumDiagnostics'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:62:
undefined reference to `clang_getDiagnostic'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:64:
undefined reference to `clang_getDiagnosticSeverity'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:67:
undefined reference to `clang_formatDiagnostic'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:63:
undefined reference to `clang_disposeDiagnostic'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang5parseFNfxAyaxAQfxEQz9__mixin1620TranslationUnitFlagsZ9__lambda5MFNeZEQCy9__mixin189ErrorCode':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:51:
undefined reference to `clang_parseTranslationUnit2'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang15TranslationUnit6__ctorMFNbNcNfPSQBo1c5index21CXTranslationUnitImplZSQCyQCv':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:108:
undefined reference to `clang_getTranslationUnitCursor'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang8toStringFNaNbNfSQx1c8CXStringQjZAya':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:114:
undefined reference to `clang_getCString'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:115:
undefined reference to `clang_disposeString'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang9toStringsFNaNbNePSQz1c8CXString11CXStringSetZAAya':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:120:
undefined reference to `clang_disposeStringSet'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor6__ctorMFNbNcNfSQBd1c5index8CXCursorZSQBzQBw':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:144:
undefined reference to `clang_getCursorKind'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:145:
undefined reference to `clang_getCursorSpelling'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:146:
undefined reference to `clang_getCursorType'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:147:
undefined reference to `clang_getCursorExtent'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor8childrenMNgFNbNdNfZ9__lambda1MFNbNeZv':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:177:
undefined reference to `clang_visitChildren'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor10returnTypeMxFNaNbNfZSQBk4Type':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:186:
undefined reference to `clang_getCursorResultType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor14underlyingTypeMxFNaNbNfZSQBo4Type':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:195:
undefined reference to `clang_getTypedefDeclUnderlyingType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor17enumConstantValueMxFNaNbNiNfZl':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:203:
undefined reference to `clang_getEnumConstantDeclValue'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor8languageMxFNaNbNiNfZEQBj9__mixin178Language':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:207:
undefined reference to `clang_getCursorLanguage'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor9canonicalMxFNbNfZSQBgQBd':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:211:
undefined reference to `clang_getCanonicalCursor'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor11isCanonicalMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:220:
undefined reference to `clang_getCanonicalCursor'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:220:
undefined reference to `clang_equalCursors'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor12isDefinitionMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:224:
undefined reference to `clang_isCursorDefinition'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor6isNullMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:228:
undefined reference to `clang_Cursor_isNull'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor10nullCursorFNbNfZSQBgQBd':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:232:
undefined reference to `clang_getNullCursor'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor10definitionMxFNbNfZSQBiQBf':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:236:
undefined reference to `clang_getCursorDefinition'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor14semanticParentMxFNbNfZSQBmQBj':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:257:
undefined reference to `clang_getCursorSemanticParent'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor13lexicalParentMxFNbNfZSQBlQBi':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:261:
undefined reference to `clang_getCursorLexicalParent'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor9isInvalidMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:265:
undefined reference to `clang_isInvalid'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor4hashMxFNaNbNiNfZk':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:269:
undefined reference to `clang_hashCursor'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor8manglingMxFNaNbNfZAya':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:273:
undefined reference to `clang_Cursor_getMangling'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor11isAnonymousMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:277:
undefined reference to `clang_Cursor_isAnonymous'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor10isBitFieldMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:281:
undefined reference to `clang_Cursor_isBitField'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor8bitWidthMxFNaNbNiNfZi':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:285:
undefined reference to `clang_getFieldDeclBitWidth'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor15accessSpecifierMxFNaNbNiNfZEQBr9__mixin2115AccessSpecifier':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:289:
undefined reference to `clang_getCXXAccessSpecifier'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor12storageClassMxFNaNbNiNfZEQBoQBl9__mixin4112StorageClass':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:293:
undefined reference to `clang_Cursor_getStorageClass'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor16isConstCppMethodMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:297:
undefined reference to `clang_CXXMethod_isConst'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor17isMoveConstructorMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:301:
undefined reference to `clang_CXXConstructor_isMoveConstructor'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor17isCopyConstructorMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:305:
undefined reference to `clang_CXXConstructor_isCopyConstructor'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor15isMacroFunctionMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:309:
undefined reference to `clang_Cursor_isMacroFunctionLike'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor8opEqualsMxFNaNbNiNfKxSQBkQBhZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:313:
undefined reference to `clang_equalCursors'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang6Cursor8opEqualsMxFNaNbNiNfxSQBjQBgZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:317:
undefined reference to `clang_equalCursors'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang6Cursor13visitChildrenMxFNbNfDFSQBmQBjQhZEQBw9__mixin2016ChildVisitResultZv':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:321:
undefined reference to `clang_visitChildren'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang11SourceRange6__ctorMFNaNbNcNfSQBl1c5index13CXSourceRangeZSQCnQCk':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:362:
undefined reference to `clang_getRangeStart'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:363:
undefined reference to `clang_getRangeEnd'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang14SourceLocation6__ctorMFNaNbNcNfSQBo1c5index16CXSourceLocationZSQCtQCq':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:385:
undefined reference to `clang_getFileName'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang14SourceLocation6__ctorMFNaNbNcNfSQBo1c5index16CXSourceLocationZ9__lambda2MFNaNbNiNeZv':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:384:
undefined reference to `clang_getExpansionLocation'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang14SourceLocation6__ctorMFNaNbNcNfSQBo1c5index16CXSourceLocationZ9__lambda3MFNaNbNiNeZv':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:387:
undefined reference to `clang_getSpellingLocation'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang4Type6__ctorMFNaNbNcNfSQBd1c5index6CXTypeZSQBxQBu':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:439:
undefined reference to `clang_getTypeSpelling'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type7pointeeMxFNaNbNfZSQBeQBb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:462:
undefined reference to `clang_getPointeeType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type11unelaborateMxFNbNfZSQBhQBe':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:466:
undefined reference to `clang_Type_getNamedType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type9canonicalMxFNaNbNfZSQBgQBd':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:470:
undefined reference to `clang_getCanonicalType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type10returnTypeMxFNaNfZSQBgQBd':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:474:
undefined reference to `clang_getResultType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type10paramTypesMxFNaNfZASQBhQBe':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:478:
undefined reference to `clang_getNumArgTypes'
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:482:
undefined reference to `clang_getArgType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang4Type18isVariadicFunctionMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:489:
undefined reference to `clang_isFunctionTypeVariadic'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type11elementTypeMxFNaNbNfZSQBjQBg':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:493:
undefined reference to `clang_getElementType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type11numElementsMxFNaNbNiNfZl':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:497:
undefined reference to `clang_getNumElements'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type9arraySizeMxFNaNbNiNfZl':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:501:
undefined reference to `clang_getArraySize'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type16isConstQualifiedMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:505:
undefined reference to `clang_isConstQualifiedType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5clang4Type19isVolatileQualifiedMxFNaNbNiNfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:509:
undefined reference to `clang_isVolatileQualifiedType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type11declarationMxFNbNfZSQBh6Cursor':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:513:
undefined reference to `clang_getTypeDeclaration'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type9namedTypeMxFNaNbNfZSQBgQBd':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:517:
undefined reference to `clang_Type_getNamedType'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type8opEqualsMxFNaNbNiNfKxSQBiQBfZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:521:
undefined reference to `clang_equalTypes'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type8opEqualsMxFNaNbNiNfxSQBhQBeZb':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:525:
undefined reference to `clang_equalTypes'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5clang4Type9getSizeofMxFNaNbNiNfZl':
/home/office/.dub/packages/libclang-0.0.6/libclang/source/clang/package.d:533:
undefined reference to `clang_Type_getSizeOf'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5parse3raw16__unittest_L8_C9FZv':
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:14:
undefined reference to `clang_createIndex'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:24:
undefined reference to `clang_parseTranslationUnit'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:27:
undefined reference to `clang_getTranslationUnitCursor'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:30:
undefined reference to `clang_visitChildren'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `fooCppVisitor':
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:44:
undefined reference to `clang_getCursorKind'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:45:
undefined reference to `clang_getCursorKind'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:49:
undefined reference to `clang_getCursorKind'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:50:
undefined reference to `clang_getCursorKind'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:54:
undefined reference to `clang_getCursorKind'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF45479E7A30874E9/ut.o:/home/office/.dub/packages/libclang-0.0.6/libclang/t
sts/parse/raw.d:55: more undefined references to `clang_getCursorKind' follow
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function `_D5parse3raw17__unittest_L64_C9FZv':
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:72:
undefined reference to `clang_createIndex'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:82:
undefined reference to `clang_parseTranslationUnit'
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:85:
undefined reference to `clang_getTranslationUnitCursor'
.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5parse3raw17__unittest_L64_C9FZ12__dgliteral1MFNaNbNiNfZk':
/home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:88:
undefined reference to `clang_visitChildren'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code 1.
Jul 19 2018
parent reply bachmeier <no spam.net> writes:
On Thursday, 19 July 2018 at 14:21:51 UTC, bachmeier wrote:

[...]

 .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2081-A8A607969A46E4CDF4
479E7A30874E9/ut.o: In function
`_D5parse3raw17__unittest_L64_C9FZ12__dgliteral1MFNaNbNiNfZk':
 /home/office/.dub/packages/libclang-0.0.6/libclang/tests/parse/raw.d:88:
undefined reference to `clang_visitChildren'
 collect2: error: ld returned 1 exit status
 Error: linker exited with status 1
 /usr/bin/dmd failed with exit code 1.
Found the problem. The libclang package is looking for /usr/lib/llvm-3.9/lib/libclang.so. For some reason, Ubuntu has libclang.so.1. Creating a symlink in that directory to libclang.so is a solution.
Jul 19 2018
parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Thursday, 19 July 2018 at 15:42:02 UTC, bachmeier wrote:
 Found the problem. The libclang package is looking for 
 /usr/lib/llvm-3.9/lib/libclang.so. For some reason, Ubuntu has 
 libclang.so.1. Creating a symlink in that directory to 
 libclang.so is a solution.
Do you have the development package (probably something like libclang-3.9-dev) installed ? Usually they are the ones containing the correct symlink (see https://forum.dlang.org/thread/ea9432f8d37a563bc4920d0bb8748ae7ab23dfd4.camel winder.org.uk)
Jul 20 2018
parent reply bachmeier <no spam.net> writes:
On Friday, 20 July 2018 at 10:31:44 UTC, Laurent Tréguier wrote:
 On Thursday, 19 July 2018 at 15:42:02 UTC, bachmeier wrote:
 Found the problem. The libclang package is looking for 
 /usr/lib/llvm-3.9/lib/libclang.so. For some reason, Ubuntu has 
 libclang.so.1. Creating a symlink in that directory to 
 libclang.so is a solution.
Do you have the development package (probably something like libclang-3.9-dev) installed ? Usually they are the ones containing the correct symlink (see https://forum.dlang.org/thread/ea9432f8d37a563bc4920d0bb8748ae7ab23dfd4.camel winder.org.uk)
Yeah, I didn't need the symlink on a different machine with Ubuntu 18.04. After some digging around, I found that I had libclang1-3.9, libclang-dev, and libclang-common-3.9-dev installed. libclang1-3.9 installs libclang.so.1. The one I was missing was libclang-3.9-dev. It's confusing and I think this could be handled better by the distro. But this is also one of the reasons I'm not a fan of dub. The user is left to sort through these dependencies themselves, and that means it's really not suitable for packages that link to C code (which is most of what I do). One of the main selling points of D is its C interoperability, but a lot of new users would walk away rather than trying to figure this out, concluding that D is buggy.
Jul 20 2018
parent Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Friday, 20 July 2018 at 14:03:20 UTC, bachmeier wrote:
 Yeah, I didn't need the symlink on a different machine with 
 Ubuntu 18.04. After some digging around, I found that I had 
 libclang1-3.9, libclang-dev, and libclang-common-3.9-dev 
 installed. libclang1-3.9 installs libclang.so.1. The one I was 
 missing was libclang-3.9-dev.

 It's confusing and I think this could be handled better by the 
 distro. But this is also one of the reasons I'm not a fan of 
 dub. The user is left to sort through these dependencies 
 themselves, and that means it's really not suitable for 
 packages that link to C code (which is most of what I do). One 
 of the main selling points of D is its C interoperability, but 
 a lot of new users would walk away rather than trying to figure 
 this out, concluding that D is buggy.
I don't think it's confusing, you will also need to install the development package if you are coding something in C. It's the same, except for the language being D instead of C. As D is advertised as a systems programming language, this doesn't seem confusing (to me, at least). If a dub package uses a system library though, it can be hinted at by the `systemDependencies` key in `dub.json`/`dub.sdl`. The problem is, I don't think many packages actually use it and I agree that since it's too easy to overlook it, you're often left to figure everything out. It's not something you're likely to find out unless you are already looking for it.
Jul 21 2018