gonzalezreal / swift-markdown-ui

Display and customize Markdown text in SwiftUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clang importer error

aehlke opened this issue · comments

error: couldn't IRGen expression: Clang importer error
error: /Users/alex/Library/Developer/Xcode/DerivedData/ChatOnMac-gsqkxqqtibupgzchrgapmxdoaogz/SourcePackages/checkouts/swift-markdown-ui/Sources/cmark-gfm/include/cmark-gfm-core-extensions.h:8:1: error: import of C++ module 'cmark_gfm' appears within extern "C" language linkage specification
#include "cmark-gfm-extension_api.h"
^

(And several other similar errors when attempting to use debugger; Xcode 15)

Equivalent error. CMarkGFM already installed for other packages, leading to duplicate files. Build failed.

…
duplicate symbol '_cmark_strbuf_clear' in:
    /Users/phbardon/Library/Developer/Xcode/DerivedData/SkyCrewCleaner-aizzcijhdkxxjkcsnojebofwafqm/Build/Products/Debug Public-iphonesimulator/cmark-gfm.o
    /Users/phbardon/Library/Developer/Xcode/DerivedData/SkyCrewCleaner-aizzcijhdkxxjkcsnojebofwafqm/Build/Products/Debug Public-iphonesimulator/CMarkGFM.o
ld: 263 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I get this error all the time. Is there any solution to this problem? Makes interacting with the debugger nearly impossible. Can't do a simple po command.

I get this kind of output when I try to print out a variable:

error: couldn't IRGen expression: Clang importer error
error: /Users/brendan/Projects/xcode-builds/Tap_Forms-fyhxleiqqzcqrnankymgwfbmymgj/SourcePackages/checkouts/swift-markdown-ui/Sources/cmark-gfm/include/node.h:95:5: 
error: 'cmark_node::as' from module 'cmark_gfm' is not present in definition of 'struct cmark_node' in module 'libcmark'
  } as;
    ^
error: /Users/brendan/Projects/xcode-builds/Tap_Forms-fyhxleiqqzcqrnankymgwfbmymgj/SourcePackages/checkouts/swift-markdown-ui/Sources/cmark-gfm/include/node.h:86:3: 
error: 'cmark_node::union (unnamed at /Users/brendan/Projects/xcode-builds/Tap_Forms-fyhxleiqqzcqrnankymgwfbmymgj/SourcePackages/checkouts/swift-markdown-ui/Sources/cmark-gfm/include/node.h:86:3)' 
from module 'cmark_gfm' is not present in definition of 'struct cmark_node' in module 'libcmark'
  union {```

Might be best to ask somewhere like the official Swift Forums to know what to do about this kind of issue

@aehlke So I'm guessing you never managed to resolve this then. Mine is a mixed Objective-C and Swift application. So maybe not just a pure Swift language issue.

I have persistent but inconsistent debugger issues with a very mixed lang xcode proj