Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • U uchardet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • uchardet
  • uchardet
  • Issues
  • #1
Closed
Open
Issue created Aug 08, 2017 by Bugzilla Migration User@bugzilla-migration

Impossible to link to uchardet without -lstdc++ in cross environment

Submitted by Coacher

Assigned to Jehan Pagès @Jehan

Link to original bug (#102119)

Description

Hello.

I have successfully built uchardet in my cross environment (build is amd64, host is arm). Now I'm trying to link to it.

cat test.c

int main() { return 0; }

arm-unknown-linux-gnueabi-gcc test.c -luchardet

/usr/libexec/gcc/arm-unknown-linux-gnueabi/ld: warning: libstdc++.so.6, needed by /usr/arm-unknown-linux-gnueabi/usr/lib/libuchardet.so, not found (try using -rpath or -rpath-link) /usr/arm-unknown-linux-gnueabi/usr/lib/libuchardet.so: undefined reference to __gxx_personality_v0@CXXABI_1.3' /usr/arm-unknown-linux-gnueabi/usr/lib/libuchardet.so: undefined reference to vtable for __cxxabiv1::__si_class_type_info@CXXABI_1.3' /usr/arm-unknown-linux-gnueabi/usr/lib/libuchardet.so: undefined reference to __cxa_pure_virtual@CXXABI_1.3' /usr/arm-unknown-linux-gnueabi/usr/lib/libuchardet.so: undefined reference to vtable for __cxxabiv1::__class_type_info@CXXABI_1.3' /usr/arm-unknown-linux-gnueabi/usr/lib/libuchardet.so: undefined reference to operator new(unsigned int)@GLIBCXX_3.4' /usr/arm-unknown-linux-gnueabi/usr/lib/libuchardet.so: undefined reference to __cxa_end_cleanup@CXXABI_1.3' /usr/arm-unknown-linux-gnueabi/usr/lib/libuchardet.so: undefined reference to `operator delete(void*)@GLIBCXX_3.4' collect2: error: ld returned 1 exit status

arm-unknown-linux-gnueabi-gcc test.c -luchardet -lstdc++

As you can see without adding -lstdc++ I cannot link to uchardet. This problem affects real applications (e.g. mpv), which rely on linker flags provided by uchardet.pc. But uchardet.pc provides only -luchardet, while -lstdc++ is listed under Libs.private. Is there a sane way to deal with this problem?

Thank you.

P.S. gcc test.c -luchardet on native system works just fine.

Assignee
Assign to
Time tracking