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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:04:19+00:00 2026-06-17T13:04:19+00:00

I’m trying to compile gcc-4.7.2 from source using gcc-4.6.1. First I run the contrib/download_prerequisites

  • 0

I’m trying to compile gcc-4.7.2 from source using gcc-4.6.1.

First I run the contrib/download_prerequisites to download the required packages then follow instructions on LFS http://www.linuxfromscratch.org/blfs/view/svn/general/gcc.html

when running make bootstrap, I got the error message:

In file included from ../../gcc-4.7.2/gcc/c-lang.c:24:0:
../../gcc-4.7.2/gcc/system.h:499:20: error: conflicting types for ‘strsignal’
/usr/include/string.h:566:14: note: previous declaration of ‘strsignal’ was here

My situation is the same as the one posted here: http://gcc.gnu.org/ml/gcc-help/2011-12/msg00062.html . The reason is also the same: gcc finds the wrong config.h, which should be the one at the current directory, but actually it uses the one under gmp.

I find the reason is that, even though the command line specify -I. before all other -I options, -I. is ignored because it is already in the standard search path. Here is the message I got via running gcc -v:

ignoring duplicate directory "."
as it is a non-system directory that duplicates a system directory

Here is the order of path searching related to this problem ( http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html ):
“The only exception is when dir is already searched by default. In this case, the option is ignored and the search order for system directories remains unchanged.”

What can I do to make gcc search the current directory before other paths specified by -I options?

The command that yield the error message is:

gcc -c  -DIN_GCC_FRONTEND -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.7.2/gcc -I../../gcc-4.7.2/gcc/. -I../../gcc-4.7.2/gcc/../include -I../../gcc-4.7.2/gcc/../libcpp/include -I/home/dwang/Downloads/gcc-build/./gmp -I/home/dwang/Downloads/gcc-4.7.2/gmp -I/home/dwang/Downloads/gcc-build/./mpfr -I/home/dwang/Downloads/gcc-4.7.2/mpfr -I/home/dwang/Downloads/gcc-4.7.2/mpc/src  -I../../gcc-4.7.2/gcc/../libdecnumber -I../../gcc-4.7.2/gcc/../libdecnumber/bid -I../libdecnumber    ../../gcc-4.7.2/gcc/c-lang.c -o c-lang.o

Thanks.

  • 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-06-17T13:04:20+00:00Added an answer on June 17, 2026 at 1:04 pm

    This turns out to be a very wired configuration problem in my ~/.bashrc. I used to add the following line to bashrc:

    export C_INCLUDE_PATH=/home/dwang/local/include:/export/scratch/packages/include/:$C_INCLUDE_PATH
    

    The output of echo $C_INCLUDE_PATH is:

    /home/dwang/local/include:/export/scratch/packages/include/:
    

    It turns out that if there is a trailing : in the C_INCLUDE_PATH, then . is also added. If I remove the trailing :, everything is fine.

    The reason is documented here:

    In all these variables, an empty element instructs the compiler to search its current working directory. Empty elements can appear at the beginning or end of a path. For instance, if the value of CPATH is :/special/include, that has the same effect as `-I. -I/special/include’.

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

Sidebar

Related Questions

I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
We're building an app, our first using Rails 3, and we're having to build
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm making a simple page using Google Maps API 3. My first. One marker
I am using jsonparser to parse data and images obtained from json response. When
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.