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

Definition __ZTSPKDu in itanium-base.exp is used for -export_symbol but is really undefined #43094

Closed
mulle-nat opened this issue Oct 21, 2019 · 4 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla duplicate Resolved as "DUPLICATE" libc++ Bugs in the libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Comments

@mulle-nat
Copy link

Bugzilla Link 43749
Resolution INVALID
Resolved on Jun 01, 2020 12:53
Version 9.0
OS MacOS X
CC @ldionne,@mclow

Extended Description

This happens when building on MacOS 10.13. I suppose some parts of the code gets #ifdef-ed out, but the symbollist isn't, that is passed to the linker.
This list is in lib/itanium-base.exp and used as input for -exported_symbols_list.

Now Apple's linker decided in its wisdom, that missing actual symbols are an error (and not a warning, what would be sane) and the build aborts.

All affected symbols are of the form _Z.*du. If I remove them before building things work out OK.

@mulle-nat
Copy link
Author

assigned to @ldionne

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 1, 2020

I also have this problem. BTW, is it OK to have itanium symbols on x86_64 arch? Itanium is kind of different thing isn't it?

@ldionne
Copy link
Member

ldionne commented Jun 1, 2020

What compiler are you using? I'm guessing you're using a fairly old Clang.

The issue is that the compiler emits type information for fundamental types in libc++abi, and your compiler doesn't know about char8_t yet, so it doesn't emit the type information for those. libc++abi tries to export these symbols and it fails to do so, because they haven't been generated in the dylib by the compiler.

Getting a linker error is quite nice, because otherwise you'd be producing a libc++abi.dylib that doesn't work properly at runtime (say if you try to use typeid(char8_t) in your program).

The fix is to use a recent Clang when building libc++ and libc++abi.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@outtersg
Copy link

outtersg commented Sep 2, 2022

(duplicate of #42070, where @ldionne's other comment is of great help to "bootstrap" on unmaintained platforms)

@EugeneZelenko EugeneZelenko added duplicate Resolved as "DUPLICATE" and removed invalid Resolved as "INVALID", i.e. "NOT A BUG" labels Sep 2, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla duplicate Resolved as "DUPLICATE" libc++ Bugs in the libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

No branches or pull requests

5 participants