Summary: | ntp-4.1.1a fails to build | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Karl Trygve Kalleberg (RETIRED) <karltk> |
Component: | Current packages | Assignee: | Jon Nelson (RETIRED) <jnelson> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 1.0 | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Karl Trygve Kalleberg (RETIRED)
2002-08-13 20:41:18 UTC
Which gcc are you using? It works just fine here, and CONFIG_PHONE is part of the package. What filesystems (note the 's') are you using? Try this: host ntpd # pwd /var/tmp/portage/ntp-4.1.1a/work/ntp-4.1.1a/ntpd host ntpd # cpp -DHAVE_CONFIG_H -I../include -I. -I.. -I../librsaref ntp_config.c | grep 'phone' extern char sys_phone[][60 ]; { "phone", 29 }, char sys_phone[5 ][60 ]; memset((char *)sys_phone, 0, sizeof(sys_phone)); (void)strncpy(sys_phone[i - 1], sys_phone[i - 1][0] = '\0'; host ntpd # What you are looking for the the line that has the 29 in it. If it doesn't, what errors do you get? The problem is that /usr/include/linux/autoconf.h does /usr/include/linux/autoconf.h:#undef CONFIG_PHONE and for some reason autoconf.h gets included down the line. /usr/include/linux on my system is a symlink to /usr/src/linux, which in turn is a symlink to linux-2.4.19-r7, the kernel I run. autoconf.h is automatically created my Linux' make menuconfig, and does not contain any #ifdef guards that easily prevents it from being included. Any ideas (apart from adding telephony support to my kernel, which I really don't need nor want) ? THe contents of /usr/include/linux/autoconf.h shouldn't have anything to do with it. I'll check again but I don't think they are ever referenced. Did you try any of the stuff I suggested? Yes, I tried what you suggested. CONFIG_PHONE is not expanded, it looks like this: [#31 /var/tmp/portage/ntp-4.1.1a/work/ntp-4.1.1a/ntpd] gcc -E -DHAVE_CONFIG_H -I../include -I. -I.. -I../librsaref ntp_config.c | grep phone extern char sys_phone[][60 ]; { "phone", CONFIG_PHONE }, char sys_phone[5 ][60 ]; memset((char *)sys_phone, 0, sizeof(sys_phone)); (void)strncpy(sys_phone[i - 1], sys_phone[i - 1][0] = '\0'; If I remove /usr/include/linux/autoconf.h, CONFIG_PHONE is replaced with 29, as it should. After removing autoconf.h, I get the errors: [#26 /var/tmp/portage/ntp-4.1.1a/work/ntp-4.1.1a/ntpd] gcc -E -DHAVE_CONFIG_H -I../include -I. -I.. -I../librsaref ntp_config.c >! foo In file included from /usr/include/linux/param.h:4, from /usr/include/sys/param.h:24, from ntp_config.c:28: /usr/include/asm/param.h:4: linux/autoconf.h: No such file or directory Now, the problem occurs only because I have symlinked /usr/include/linux and /usr/include/asm (this was done because another package [was it freeswan ?] wouldn't compile without it). If I restore the header directories from the linux-headers package, ntp compiles and installs very nicely. For future reference, I guess we should mark all packages that need the /usr/include/linux to be a symlink to the properly patched kernel _BAD_, and rather require them to also update linux-headers ? The bug is in some other package according to karltk - closing. got a fix :) |