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 6000025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:38:05+00:00 2026-05-23T00:38:05+00:00

(This is different to the question ccache and absolute path as I want only

  • 0

(This is different to the question ccache and absolute path as I want only the command path to not be expanded on the ccache host machine)

When using ccache and distcc together ccache is expanding the compiler to an absolute path, and then distcc cannot use the PATH on the remote machine to choose which compiler to use.

e.g. I call CCACHE_PREFIX=distcc ccache g++ foo.cc and ccache expands this into a local preprocessing step and cache check and then a call to distcc as distcc /usr/bin/g++, which is the wrong version (g++ lives in the path on the remote before /usr/bin, but this doesn’t give it the chance to search the path at all).

I have various different machines being used as distcc hosts, and they have the same version of gcc/g++ installed in different locations (yes, this problem goes away if I put them all in somewhere like /usr/local, but I can’t do that at the moment).

Is there a setting to get ccache to pass just g++ to distcc rather than expanding the path to the absolute path of the local compiler? I’m not completely against patching ccache if there is no setting yet, but that’s a last resort 🙂

  • 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-23T00:38:06+00:00Added an answer on May 23, 2026 at 12:38 am

    Turns out there’s a simple way to do this : just use a wrapper for CCACHE_PREFIX instead of distcc directly, with something like this:

    File : distcc-wrap.sh

    #!/bin/sh
    compiler=$(basename $1)
    shift
    exec distcc "$compiler" "$@"
    

    export CCACHE_PREFIX=distcc-wrap.sh and then this allows the remote compiler to live at a different place and distcc will search the PATH for it.

    (Thanks to Joel on the ccache mailing list for this answer; see http://www.mail-archive.com/ccache@lists.samba.org/msg00670.html for original message)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is a different question concerning: add a connection to database not working, asp.net
This is a new iPhone project, only 1 target (different from this question )
[Please note that this is a different question from the already answered How to
This is similar to (but different from) this question . Here is some simple
Similar, but different to this question : I use highlight occurrences a lot, but
I'm re-asking this question but with a different framework this time. I have two
I asked a question about different testing frameworks yesterday. This question can be found
This question has been asked before ( link ) but I have slightly different
This question has been asked in various forms in a number of different forums,
This is related to an earlier question by a different user, asking How to

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.