Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 795801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:32:14+00:00 2026-05-14T22:32:14+00:00

When I compile something on my Ubuntu Lucid 10.04 PC it gets linked against

  • 0

When I compile something on my Ubuntu Lucid 10.04 PC it gets linked against glibc. Lucid uses 2.11 of glibc. When I run this binary on another PC with an older glibc, the command fails saying there’s no glibc 2.11…

As far as I know glibc uses symbol versioning. Can I force gcc to link against a specific symbol version?

In my concrete use I try to compile a gcc cross toolchain for ARM.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:32:15+00:00Added an answer on May 14, 2026 at 10:32 pm

    You are correct in that glibc uses symbol versioning. If you are curious, the symbol versioning implementation introduced in glibc 2.1 is described here and is an extension of Sun’s symbol versioning scheme described here.

    One option is to statically link your binary. This is probably the easiest option.

    You could also build your binary in a chroot build environment, or using a glibc-new => glibc-old cross-compiler.

    According to the http://www.trevorpounds.com blog post Linking to Older Versioned Symbols (glibc), it is possible to to force any symbol to be linked against an older one so long as it is valid by using the same .symver pseudo-op that is used for defining versioned symbols in the first place. The following example is excerpted from the blog post.

    The following example makes use of glibc’s realpath, but makes sure it is linked against an older 2.2.5 version.

    #include <limits.h>
    #include <stdlib.h>
    #include <stdio.h>
    
    __asm__(".symver realpath,realpath@GLIBC_2.2.5");
    int main()
    {
        const char* unresolved = "/lib64";
        char resolved[PATH_MAX+1];
    
        if(!realpath(unresolved, resolved))
            { return 1; }
    
        printf("%s\n", resolved);
    
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ideally I want a function something like the following (this example doesn't compile): void
Using the command line program lessc installed by following this guide on a Ubuntu
On ubuntu 10.10 64bit I want to compile something with cmake for a 32
I need R header files to compile something. I installed R on ubuntu via:
I'm trying to compile something that depends on gtkspell, which depends on enchant, under
I believe something very odd is happening with my compiler options. When I compile
I want to compile a tiny actionscript file. Is there something out there that
This doesn't seem to work (compiler complains that Something 's getFoo() method doesn't implement
The .Net model is something like this : C# Code -> C# Compiler ->
EDIT: I realized that this code compiles and works: #include <iostream> template<class Something> class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.