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

Clang importer error #279

Open
aehlke opened this issue Dec 6, 2023 · 5 comments
Open

Clang importer error #279

aehlke opened this issue Dec 6, 2023 · 5 comments

Comments

@aehlke
Copy link

aehlke commented Dec 6, 2023

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)

@phbardon
Copy link

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)

@brendand
Copy link

brendand commented Feb 27, 2024

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 {```

@aehlke
Copy link
Author

aehlke commented Feb 27, 2024

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

@brendand
Copy link

@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.

@aehlke
Copy link
Author

aehlke commented Feb 27, 2024

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

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