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

6.5.0b/libstdc++.a(iostream-inst.o): duplicate section - problem with std::setfill #364

Closed
tdolphin-org opened this issue Oct 28, 2023 · 1 comment

Comments

@tdolphin-org
Copy link
Contributor

tdolphin-org commented Oct 28, 2023

for such simple C++ program

#include <iomanip>
#include <iostream>

int main(int argc, char *argv[])
{
    std::cout << std::setfill('0') << std::endl;
}

cross compilation on linux, gives such errors:

$ m68k-amigaos-g++ -lstdc++ -o setfill-error setfill-error.cpp

/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/libstdc++.a(iostream-inst.o): duplicate section `.text.ZSt7setfillIcESt8_SetfillIT_ES1' has different size

/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/libstdc++.a(iostream-inst.o): duplicate section `.text.ZSt7setfillIcESt8_SetfillIT_ES1' has different size

@bebbo
Copy link
Owner

bebbo commented Oct 29, 2023

That's a warning not an error.
The inline function in your file is compiled with a different option as the built library. Try -Os.
I also recommend adding -noixemul.

@bebbo bebbo closed this as completed Oct 29, 2023
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

2 participants