Certainly that warning didn’t apply to me …

May 13, 2007

I was building gcc and ran into this error:

../.././libgcc/../libdecnumber/decContext.h:52:50: error: gstdint.h: No such file or directory

I was pretty sure I had followed the directions correctly. I had installed the pre-reqs described here. I had enlisted in the source as described here. Then I switched into the gcc directory and ran ./configure – everything looked good so I ran make.

This is where things went downhill. Build errors galore.

It turns out that while I did skim the Configuration instructions I missed the part about not building from the src directory but rather from a sibling directory (or rather – not from the source dir). So I created a sibling directory, re-ran configure and then make. This time it got much further – but it still ended up hitting compile errors (a missing target in a makefile).

Even doing a clean build and re-running configure again could not resurrect the build.

I ended up having to start over with an `rm -f -r *` and getting the source over.

This time I ran configure from the sibling directory right from the start and everything was much happier.

Who would have thought that when the gcc maintainers went through the trouble of documenting the proper way to run configure that they would really mean that you were supposed to do it that way. :)

I posted this because when I hit the original problem I found several sites where people were asking why they were hitting that error and did not find a site where the cause was explained. Hopefully this will get enough Google Juice to save someone else the trouble.

About these ads

4 Responses to “Certainly that warning didn’t apply to me …”

  1. Kyle Says:

    I’m just wondering why you were rebuilding gcc. Normally there’s not a whole lot to gain by doing so. Although it is an experience worth going through once.

    Did you try make clean after your make failed? make clean should bring you back to the original source.

    And my last thing is kind of nitpicky. I think the standard is to combine single letter arguments into one for any given command. Not that it makes a bit of difference but ‘rm -rf *’ is how most people would do it in linux land.

    Good to see your making progress, I really enjoy the posts.

  2. makingtheswitch Says:

    Re: Kyle,

    It was just the learning experience. It seemed like a large enough chunk that I would run into some problems I’d need to get through but a well-known enough one that if I hit a wall I would have a decently sized community to query for help.

    I did try make clean but it did not cure my ills. I suspect that by the time I was trying make clean the misconfiguration had caused enough damage that I was pretty much screwed.

    Thanks for the nit on argument combining – another habit that will be hard to break. I’ll make a point of it though.

  3. Kyle Says:

    GCC is a pretty good learning experience. One of the guys at my work setup a linux machine and was trying to install nagios and ran into problems. So the next day he tells me, “I ran into some problems installing nagios, I got to the part where I was recompiling my kernel and ….” He ran into some problem and google’d his issue and somehow came up as recompiling his kernel as a fix. Just wanted to make sure it wasn’t a similar case here.

    It’s impressive you broke the config enough to even break make clean, nice work.

  4. Andy Lester Says:

    Thanks for the tip. I’ve never bothered to build outside of the source dir, but I will try that now.

    I am building from source because I’m working on a GCC 4.3 snapshot that has features I want to use on the Parrot project.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: