* Compiler method of finding header.
@ 2003-10-21 21:27 Adam Luchjenbroers
2003-10-22 13:17 ` pa3gcu
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Adam Luchjenbroers @ 2003-10-21 21:27 UTC (permalink / raw)
To: linux-newbie
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
includes line:
#include <krb5.h>
So it's expecting the header to be wherever the compiler expects them.
using locate:
/usr/kerberos/include/krb5.h
How do I tell the compiler where to look for headers? OS is RedHat 9.
- --
"What happens if a big asteroid hits the Earth? Judging from realistic
simulations involving a sledge hammer and a common laboratory frog, we can
assume it will be pretty bad." - Dave Barry
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/laTT94zI/zB2CYURAiGVAKCW7VWzAfZnwwLBZ/v8+3Mi9KNMSgCfZ+L+
n9lCD6pDbUq9YESC2XIyRzs=
=DC42
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compiler method of finding header.
2003-10-21 21:27 Compiler method of finding header Adam Luchjenbroers
@ 2003-10-22 13:17 ` pa3gcu
2003-10-22 18:38 ` John Kelly
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pa3gcu @ 2003-10-22 13:17 UTC (permalink / raw)
To: Adam, linux-newbie
On Tuesday 21 October 2003 23:27, Adam Luchjenbroers wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
>
> includes line:
> #include <krb5.h>
>
> So it's expecting the header to be wherever the compiler expects them.
>
> using locate:
> /usr/kerberos/include/krb5.h
>
> How do I tell the compiler where to look for headers? OS is RedHat 9.
>
Without knowing what you are trying to compile or being able to see the
Makefile it would be hard to say how you could do that in the makefile as
includes "include" header files that are located in /usr/include so your
Makefile is not at fault here, or so it seems to me.
If this is a one file error then you could edit kssl.h and change the above
mentioned include to;
#include </usr/kerberos/include/krb5.h>
I expect you would then find that your compile will go on a little and barf
again as it will miss another file, you can also create a sym link in /usr/
include (possably a better idea).
cd /usr/include
ln -s /usr/kerberos/include kerberos
Or something to that effect.
The most likly explanation for the problem is that your kerberos includes have
been installed one directory too high, header files belong in /usr/include
and not in /usr, that is what i have been taught.
--
If the Linux community is a bunch of theives because they
try to imitate windows programs, then the Windows community
is built on organized crime.
Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compiler method of finding header.
2003-10-21 21:27 Compiler method of finding header Adam Luchjenbroers
2003-10-22 13:17 ` pa3gcu
@ 2003-10-22 18:38 ` John Kelly
2003-10-22 20:44 ` John T. Williams
2003-10-22 20:53 ` Bryan Whitehead
3 siblings, 0 replies; 5+ messages in thread
From: John Kelly @ 2003-10-22 18:38 UTC (permalink / raw)
To: linux-newbie
On Tuesday 21 October 2003 10:27 pm, Adam Luchjenbroers wrote:
> /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
>
> includes line:
> #include <krb5.h>
>
> So it's expecting the header to be wherever the compiler expects them.
>
> using locate:
> /usr/kerberos/include/krb5.h
>
> How do I tell the compiler where to look for headers? OS is RedHat 9.
Hi,
I am not quite sure I understand what you are trying to do here, but this
might help.
If you put something like
#include <foobar.h>
in a source file, then the compiler looks for foobar.h in the default
location(s) - usually /usr/include.
If you put something like
#include "/home/me/include/foobar.h"
in the source, the the compiler looks for that specific file.
Note that the first example uses angle brackets <> and the second uses double
quotes.
So you might try something like:
#include "/usr/kerberos/include/krb5.h"
You second option is to add /usr/kerberos/include/ to the list of places
checked for include files. You can do this on the command line for gcc with
to option:
gcc -I/usr/kerberos/include/ something.c
You are probably using a Makefile, so you would have to hack that to make it
(the -I option) work.
I hope this helps.
regards,
John Kelly
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compiler method of finding header.
2003-10-21 21:27 Compiler method of finding header Adam Luchjenbroers
2003-10-22 13:17 ` pa3gcu
2003-10-22 18:38 ` John Kelly
@ 2003-10-22 20:44 ` John T. Williams
2003-10-22 20:53 ` Bryan Whitehead
3 siblings, 0 replies; 5+ messages in thread
From: John T. Williams @ 2003-10-22 20:44 UTC (permalink / raw)
To: linux-newbie
if you asking how to permanently change your include folder, I have to
admit that I don't actually know. but if you just want it to search a
particular directory at compile time you use the -I option
for instance if I want gcc to look in the /home/mydir/include folder I
would type
gcc file.c -I /home/mydir/include
On Tue, 2003-10-21 at 17:27, Adam Luchjenbroers wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
>
> includes line:
> #include <krb5.h>
>
> So it's expecting the header to be wherever the compiler expects them.
>
> using locate:
> /usr/kerberos/include/krb5.h
>
> How do I tell the compiler where to look for headers? OS is RedHat 9.
>
> - --
> "What happens if a big asteroid hits the Earth? Judging from realistic
> simulations involving a sledge hammer and a common laboratory frog, we can
> assume it will be pretty bad." - Dave Barry
>
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.fsf.org/philosophy/no-word-attachments.html
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQE/laTT94zI/zB2CYURAiGVAKCW7VWzAfZnwwLBZ/v8+3Mi9KNMSgCfZ+L+
> n9lCD6pDbUq9YESC2XIyRzs=
> =DC42
> -----END PGP SIGNATURE-----
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compiler method of finding header.
2003-10-21 21:27 Compiler method of finding header Adam Luchjenbroers
` (2 preceding siblings ...)
2003-10-22 20:44 ` John T. Williams
@ 2003-10-22 20:53 ` Bryan Whitehead
3 siblings, 0 replies; 5+ messages in thread
From: Bryan Whitehead @ 2003-10-22 20:53 UTC (permalink / raw)
To: Adam; +Cc: linux-newbie
> /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
>
> includes line:
> #include <krb5.h>
>
> So it's expecting the header to be wherever the compiler expects them.
>
> using locate:
> /usr/kerberos/include/krb5.h
>
> How do I tell the compiler where to look for headers? OS is RedHat 9.
Short answer:
Add "-I/usr/kerberos/include" to your GCC command.
Long answer:
This looks like a problem with kssl.h expecting a file to be located in
the "standard search path" for gcc but it is not.
To see the standard search path for includes do this:
cpp -v
On my machine I get this:
[driver@mulan ~/junk]$ cpp -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking
--enable-long-long --enable-__cxa_atexit
--enable-languages=c,c++,ada,f77,objc,java
--host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/cpp0 -lang-c -v
-D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__
-D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix
-D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386
-D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ -
GNU CPP version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) (cpplib) (i386
Linux/ELF)
ignoring nonexistent directory "/usr/i586-mandrake-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/include
/usr/include
End of search list.
The important part is at the bottom - I cut/paste the important part:
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/include
/usr/include
End of search list.
So the default search path for files that are "#include <...>" is:
/usr/local/include
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/include
/usr/include
If you want to ADD a directory to this when you run gcc pass "-I". You
can do a test with cpp:
[driver@mulan ~/junk]$ cpp -v -I/usr/X11R6/include
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking
--enable-long-long --enable-__cxa_atexit
--enable-languages=c,c++,ada,f77,objc,java
--host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/cpp0 -lang-c -v
-I/usr/X11R6/include/ -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__
-D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix
-D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386
-D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ -
GNU CPP version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk) (cpplib) (i386
Linux/ELF)
ignoring nonexistent directory "/usr/i586-mandrake-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/X11R6/include
/usr/local/include
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/include
/usr/include
End of search list.
Notice the search list now includes /usr/X11R6/include as I added it
with the -I.
Remember if you pass a direcory that doesn't exist, or you cannot access
it will be listed before the directories with an error. A standard
mandrake install has one already compiled in... It's this:
ignoring nonexistent directory "/usr/i586-mandrake-linux-gnu/include"
Note: cpp is the C pre-proccessor that gcc will call. -I works the same
in both.
--
Bryan Whitehead
SysAdmin - JPL - Interferometry and Large Optical Systems
Phone: 818 354 2903
driver@jpl.nasa.gov
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-22 20:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-21 21:27 Compiler method of finding header Adam Luchjenbroers
2003-10-22 13:17 ` pa3gcu
2003-10-22 18:38 ` John Kelly
2003-10-22 20:44 ` John T. Williams
2003-10-22 20:53 ` Bryan Whitehead
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox