| View previous topic :: View next topic |
| Author |
Message |
chatgris Guru


Joined: 14 Oct 2002 Posts: 383 Location: Canada
|
Posted: Sun Nov 24, 2002 9:39 pm Post subject: Include directories no longer seem to work? PATH_MAX? |
|
|
When I try to compile code (in this instance a module for apache) that always compiled before, I get the error that boils down to PATH_MAX or _POSIX_PATH_MAX cannot be found...
Further investigation led me to fnd that /usr/include/linux wasn't being included.. btu when I included that I got a host of other errors... I really think that somehow my system include directories are messed up..
http://forums.gentoo.org/viewtopic.php?t=12515&highlight=pathmax
From this thread, I tried
emerge linux-headers
and
emerge python
both which had no effect on the problem. In there rac said that it seemed like that guys /usr/include was messed up, and I believe that I may have the same problem, but i Have no idea how to fix it =(
Help anyone?
Tanks,
Joshua Moore-Oliva |
|
| Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Nov 24, 2002 10:08 pm Post subject: |
|
|
I have PATH_MAX defined in /usr/include/linux/limits.h. Do you? _________________ For every higher wall, there is a taller ladder |
|
| Back to top |
|
 |
chatgris Guru


Joined: 14 Oct 2002 Posts: 383 Location: Canada
|
Posted: Sun Nov 24, 2002 10:10 pm Post subject: |
|
|
| Yes I do |
|
| Back to top |
|
 |
chatgris Guru


Joined: 14 Oct 2002 Posts: 383 Location: Canada
|
Posted: Sun Nov 24, 2002 10:14 pm Post subject: |
|
|
One thing i noticed in a thread was that someone said that /usr/include/linux should be symlinked to /usr/src/linux... but from what I noticed (a ls -all in /usr/include ) that didn't seem to be the case, though my /usr/src/linux directory has a lot of stuff in it.
as a stab int he dark while I was wiating for someone to answer I am attempting to recompile//upgrade my kernel from gentoo-sources-r9 to gentoo-sources-10.
I'm ready and waiting on the message board to post any info that could help solve this problem..
Josh.
**EDIT***
Recompiling with a new kernel did not seem to have any effect =(. |
|
| Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Nov 24, 2002 11:31 pm Post subject: |
|
|
| chatgris wrote: | | One thing i noticed in a thread was that someone said that /usr/include/linux should be symlinked to /usr/src/linux. |
Probably means to /usr/src/linux/include/linux, but I disagree either way. /usr/include/linux should be on its own, and part of linux-headers. Can you post 20 or so lines of the output from the compiler before and including the actual error message? _________________ For every higher wall, there is a taller ladder |
|
| Back to top |
|
 |
chatgris Guru


Joined: 14 Oct 2002 Posts: 383 Location: Canada
|
Posted: Mon Nov 25, 2002 8:26 am Post subject: |
|
|
Before.
| Code: |
gcc -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -fpic -DHAVE_DEV_URANDOM -c -I/usr/local/apache/include -I../email_manager -Iaes mod_mastermailings_listowner.c
In file included from /usr/local/apache/include/ap_config.h:58,
from /usr/local/apache/include/httpd.h:72,
from mod_mastermailings_listowner.c:6:
/usr/local/apache/include/apr.h:314:2: #error no decision has been made on APR_PATH_MAX for your platform
make: *** [mod_mastermailings_listowner.o] Error 1
|
This error can be described from the text in this file:
| Code: |
#if defined(PATH_MAX)
#define APR_PATH_MAX PATH_MAX
#elif defined(_POSIX_PATH_MAX)
#define APR_PATH_MAX _POSIX_PATH_MAX
#else
#error no decision has been made on APR_PATH_MAX for your platform
#endif
|
if I include /usr/include/linux I receive
| Code: | gcc -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -fpic -DHAVE_DEV_URANDOM -c -I/usr/local/apache/include -I/usr/include/linux -I../email_manager -Iaes mod_mastermailings_listowner.c
In file included from /usr/include/sys/types.h:132,
from /usr/local/apache/include/apr.h:122,
from /usr/local/apache/include/ap_config.h:58,
from /usr/local/apache/include/httpd.h:72,
from mod_mastermailings_listowner.c:6:
/usr/include/linux/time.h:10: parse error before "time_t"
/usr/include/linux/time.h:12: parse error before '}' token
/usr/include/linux/time.h:89: parse error before "time_t"
/usr/include/linux/time.h:120: field `it_interval' has incomplete type
/usr/include/linux/time.h:121: field `it_value' has incomplete type
/usr/include/linux/time.h:125: field `it_interval' has incomplete type
/usr/include/linux/time.h:126: field `it_value' has incomplete type
In file included from /usr/include/sys/uio.h:29,
from /usr/include/sys/socket.h:27,
from /usr/local/apache/include/apr.h:126,
from /usr/local/apache/include/ap_config.h:58,
from /usr/local/apache/include/httpd.h:72,
from mod_mastermailings_listowner.c:6:
/usr/include/bits/uio.h:45: parse error before "size_t"
In file included from /usr/include/sys/socket.h:35,
from /usr/local/apache/include/apr.h:126,
from /usr/local/apache/include/ap_config.h:58,
from /usr/local/apache/include/httpd.h:72,
from mod_mastermailings_listowner.c:6:
/usr/include/bits/socket.h:232: parse error before "size_t"
/usr/include/bits/socket.h:239: parse error before '}' token
In file included from /usr/local/apache/include/apr.h:126,
from /usr/local/apache/include/ap_config.h:58,
from /usr/local/apache/include/httpd.h:72,
from mod_mastermailings_listowner.c:6:
/usr/include/sys/socket.h:131: parse error before "size_t"
/usr/include/sys/socket.h:136: parse error before "size_t"
/usr/include/sys/socket.h:141: parse error before "size_t"
/usr/include/sys/socket.h:149: parse error before "size_t"
In file included from /usr/local/apache/include/ap_config.h:58,
from /usr/local/apache/include/httpd.h:72,
from mod_mastermailings_listowner.c:6:
... (it continues, btu you only asked for the first 20 lines or so) |
In addition, KDE now takes abotu 30 seconds to load the kdm manager screen where I can login... I remember seeing posts on that and someone said soething about his PATH being weird.. my PATH just in case is:
| Code: | | /bin:/usr/bin:/usr/X11R6/bin:/opt/blackdown-jdk-1.3.1/bin:/opt/blackdown-jdk-1.3.1/jre/bin:/usr/qt/3/bin:/usr/qt/2/bin:/usr/kde/3/bin:/usr/local/bin:/opt/bin:/usr/local/apache/bin |
Thanks for all the help.
Josh. |
|
| Back to top |
|
 |
chatgris Guru


Joined: 14 Oct 2002 Posts: 383 Location: Canada
|
Posted: Mon Nov 25, 2002 11:14 am Post subject: |
|
|
I removed the -ansi flag and I now skip the first stage of errors. I however, still get the second bunch of errors with syntax problems...
Josh. |
|
| Back to top |
|
 |
rac Bodhisattva


Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Mon Nov 25, 2002 6:08 pm Post subject: |
|
|
I wasn't able to find anything about this particular module. You say it compiled before. Did it compile before using the compiler you have now? IOW, is it possible that you moved to GCC 3 and this module is not compatible with it?
Another thing you could try is using apxs to build the module. Perhaps it will give some additional compiler flags that are important. It is not normally necessary to add /usr/include/linux to your include path, because most code references it explicitly, e.g. "#include <linux/types.h>". _________________ For every higher wall, there is a taller ladder |
|
| Back to top |
|
 |
chatgris Guru


Joined: 14 Oct 2002 Posts: 383 Location: Canada
|
Posted: Mon Nov 25, 2002 7:04 pm Post subject: |
|
|
This is just a module I have written myself, and I have compiled it using gcc 3.2.
However, is it possible that since I recently upgraded to gcc3.2-r4 with an emerge -u world, my compiler is broken? I tried re-emerging gcc but it made no difference... I also tried to downgrade the compiler but I couldn't figure out how to downgrade gcc...
Failing this it may just be that my system is borked.. I have done a number of damaging things to it in the past, for example setting CONFIG_PROTECT="-*" cause I thought that was how to get rid of the config msg's, only to have my fstab rewritten and user accounts deleted.. and then I restored things y hand..
btu yes, the point of hte above paragraph is I've probably done so many Bad Things to my computer, it could use a fresh install =).
Josh. |
|
| Back to top |
|
 |
|