I am trying to compile some software I found online. I am getting a bunch of these errors:

No rule to make target `/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h', needed by `formCluster.o'.  Stop.

In the Makefiles, there are certainly lines like this:

transform.o: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h

The errors seem to go away if I simply remove those lines. Is this a reasonable thing to do (there are zillions of them, so I want to be sure this is the right thing to do before spending a lot of time removing them). I'm assuming it was something to do with old compilers that is not needed anymore?

Thanks,

Dave

Recommended Answers

All 10 Replies

Since there are zillions of such lines, and they refer to a particular gcc installation, the makefile is most likely autogenerated. Check the Readme (or Install) for clues of how to regenerate it. Does the tarball have something like configure? Is there a 'depend' target in the makefile? autoconf sources?

There is no 'configure' file. The readme just says to make sure opengl is installed. There are no autoconf sources. The depend target says:

depend:
cd src; make depend-all

So if I can't regenerate, can I just manually remove those stddef.h kinds of dependencies? It doesn't really make sense to build a header file, does it?

Dave

There is no 'configure' file. The readme just says to make sure opengl is installed. There are no autoconf sources. The depend target says:

depend:
cd src; make depend-all

O! Did you try to make depend at the command prompt (I'd even do make clean depend if there's a clean target as well)?

PS:

So if I can't regenerate, can I just manually remove those stddef.h kinds of dependencies? It doesn't really make sense to build a header file, does it?

It surely doesn't, and nobody is going to build them. Notice that there is really no rule for doing that. Such a dependency guarantees recompilation in case any of them change (e.g. you upgraded your GCC).

PPS:
I can bet that the make depend boils down to calling gcc with the -M switch. You can make a huge favor to developers by patching it to -MM.

'make depend' looks promising.

However, I get a bunch of these:

akedepend: warning:  server.c (reading /usr/include/unistd.h, line 227): cannot find include file "stddef.h"
	not in ../../include/stddef.h
	not in ../../3rd_party/libarg/stddef.h
	not in /usr/X11R6/include/stddef.h
	not in /usr/local/include/stddef.h
	not in ./stddef.h
	not in /usr/include/g++-2/stddef.h
	not in /usr/include/stddef.h

Is there a more "c++" header to use instead of "unistd.h"? I think cstddef has replaced stddef.h, so maybe this is the problem?

Thanks,
Dave

Or better yet, it seems like I do have some of these files (stddef.h) on my system, just not in one of the places make depend was looking.

I tried to tell it to look in another place with

make depend -I/usr/include/linux

but it still doesn't seem to be looking there?

'make depend' looks promising.

However, I get a bunch of these:

makedepend

This is really ancient. Please disregard my PPS from the last post.

Is there a more "c++" header to use instead of "unistd.h"? I think cstddef has replaced stddef.h, so maybe this is the problem?

Thanks,
Dave

Yet another crystal ball type guess. Did you install libc6-dev package? stddef.h must be in /usr/include.

I don't have any packages with libc6 in the name. (I'm on Fedora 11). Why must stddef.h be in /usr/include?

It looks like this makefile is simply calling "make depend" on a bunch of other make files. At the end of the chain, this is what is actually getting run:

depend: 
	makedepend -o$(OBJ) -- $(INCFLAGS) $(MAKEDEPEND_INCFLAGS) $(DEFINEFLAGS) -- $(ALL_FILES)

I tried to add the -I flag by putting this:

MAKEDEPEND_INCFLAGS=-I/usr/include/linux

in the top level makefile, but it still isn't looking in the right place.

Any more suggestions?

Why must stddef.h be in /usr/include?

This is a way the compiler works. A source file does #include <stddef.h> , and the compiler looks it up in /usr/include .

Any more suggestions?

I gather that you do have /usr/include/linux/stddef.h , which means that you have the kernel-devel headers installed. What you are missing (judjing by the absence of /usr/include/stddef.h ) is the libc development package. You need to install it. It is called libc-devel . I am not familiar with Fedora administration and can't tell you the exact command.

PS: You can not just remove these dependencies. A compilation will fail at a different phase with a different message.

Unfortunately

sudo yum install libc-devel

tells me

No package libc-devel available.

However, I do have glibc-devel installed (possibly the same thing?), but alas no /usr/include/stddef.h :(

Ok I figured out some makedepend stuff and got past that part.

Now I am getting errors like

/usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/../../../../include/c++/4.5.0/cstddef:52:11: error: ‘::size_t’ has not been declared
/usr/include/wchar.h:148:40: error: ‘size_t’ has not been declared

Any idea how to fix these?

Dave

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.