Click to See Complete Forum and Search --> : MAKE error, missing tons of files


scoobydope
02-24-2001, 03:04 PM
This is strange, i was just trying to install portsentry again on a new box, and when i finished all the basic setup and tried to run make linux, i got the following :
(this is only a partial snippet, but you get the idea)


/usr/include/linux/param.h:4: asm/param.h: No such file or directory
In file included from /usr/include/signal.h:300,
from portsentry.h:37,
from ./portsentry_util.c:31:
/usr/include/bits/sigcontext.h:28: asm/sigcontext.h: No such file or directory
In file included from /usr/include/sys/socket.h:34,
from /usr/include/netdb.h:31,
from portsentry.h:39,
from ./portsentry_util.c:31:
/usr/include/bits/socket.h:295: asm/socket.h: No such file or directory
In file included from /usr/include/bits/errno.h:25,
from /usr/include/errno.h:36,
from portsentry.h:42,
from ./portsentry_util.c:31:
/usr/include/linux/errno.h:4: asm/errno.h: No such file or directory
In file included from /usr/include/sys/param.h:25,
from portsentry.h:45,
from ./portsentry_util.c:31:
/usr/include/linux/param.h:4: asm/param.h: No such file or directory
make: *** [linux] Error 1

its got all these No such file or directory problems.
now if i do a locate asm/param.h i get NOTHING.

however, locate param.h finds this:
locate param.h
/usr/include/rpcsvc/bootparam.h
/usr/include/sys/param.h
/usr/src/linux-2.2.17/include/asm-i386/param.h
/usr/src/linux-2.2.17/include/asm-i386/shmparam.h
/usr/src/linux-2.2.17/include/linux/param.h


as a matter of fact every error above, comes from errors stating that it can't locate asm/*whatever*

well, there obviously isn't an asm directory, its bloodywell asm-i386

So my question is this:
By looking at the error generated above, is the error being generated from the portsentry.h files? or does it look like the actual system files (/include/bits/socket.h ... /include/linux/param.h etc) are to blame.

This is very strange indeed.

Ben Briggs
02-24-2001, 03:07 PM
Looks like you need the Linux include files.

If you are using Slackware, it's the linuxinc.tgz package. If you are using any other distro, sorry I can't help.

scoobydope
02-24-2001, 03:20 PM
well, that is totally screwed.

On a whim, i went into the /usr/src/linux/include directory

#ls
asm-i386/ asm-ia64/ asm-parisc/ asm-sparc/ net/
asm-alpha/ asm-m68k/ asm-ppc/ asm-sparc64/ pcmcia/
asm-arm/ asm-mips/ asm-s390/ linux/ scsi/
asm-generic/ asm-mips64/ asm-sh/ math-emu/ video/

and renamed the /asm-i386/ to /asm/

tried running the make again,
and bingo!! it ran without troubles.

the wierd thing is, it was the actual files that shipped with Mandrake (/usr/include/bits/socket.h, etc) that had the errors!

/usr/include/bits/socket.h:295: asm/socket.h: No such file or directory

so i go

cat -n /usr/include/bits/socket.h | grep 295

and i get :

295 #include <asm/socket.h>

i check all the files that were responsible for kicking out these errors, and they all are trying to access a directory called asm, yet the same distro installed a directory called asm-i386!

OR ... is it some hidden secret that you have to manually change the name of these directories as listed above to your own architecture after installing?

Energon
02-24-2001, 04:14 PM
how about instead of renaming, you make symlink? That way if something needs the asm-i386 directory, it can still find it...

jemfinch
02-24-2001, 04:37 PM
This is the probably with compiling your kernel in /usr/src.

Kernels shouldn't be compiled in /usr/src. They should be compiled in your home directory. Glibc, among other things, links to the kernel sources that it was compiled against. These needs to stay the same.

Also, as you've noticed, if you stick a new kernel in there but don't compile it, you'll be unable to compile anything that links to kernel headers because the proper asm symlink won't be there.

The workaround to your problem is to mv asm back to asm-i386, and then compile that kernel (which will create a symlink to the proper asm directory). The solution to your problem is to compile your kernels in your home directory.

Jeremy

scoobydope
02-24-2001, 07:14 PM
i guess that would also explain why the compilation of 2.4 never worked. That was an absolute mess.

ok, starting from scratch.
i am going to buy a new drive and put linux all by itself on there a few times over.

Thanx for the kernel hint. i see the new 2.4 kernel NHF mentions that, but not the older kernel compiling one (that i went off as i had printed it out)
anyways, i need a new drive anyways, best to start from scratch. I think i will have a few different versions on the same 45 gig disk so i have a couple of them that are the sacrificial lambs for testing before doing this on my main install.

anyways, thanks again.