Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 6432
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Jon Nelson <jnelson@jnelson.disabled>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Karl Trygve Kalleberg (RETIRED) <karltk@gentoo.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 6432 depends on: Show dependency tree
Bug 6432 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2002-08-13 20:41 0000
Making all in ntpd
make[2]: Entering directory `/var/tmp/portage/ntp-4.1.1a/work/ntp-4.1.1a/ntpd'
source='ntp_config.c' object='ntp_config.o' libtool=no \
depfile='.deps/ntp_config.Po' tmpdepfile='.deps/ntp_config.TPo' \
depmode=gcc /bin/sh ../depcomp \
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../librsaref 
  -march=i686 -O3 -pipe -Wall -Wcast-qual -Wmissing-prototypes  -Wshadow
-Wstrict-prototypes -pipe -c `test -f ntp_config.c || echo './'`ntp_config.c
ntp_config.c:130: `CONFIG_PHONE' undeclared here (not in a function)
ntp_config.c:130: initializer element is not constant
ntp_config.c:130: (near initialization for `keywords[21].keytype')
ntp_config.c: In function `getconfig':
ntp_config.c:1619: `CONFIG_PHONE' undeclared (first use in this function)
ntp_config.c:1619: (Each undeclared identifier is reported only once
ntp_config.c:1619: for each function it appears in.)
make[2]: *** [ntp_config.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/ntp-4.1.1a/work/ntp-4.1.1a/ntpd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/ntp-4.1.1a/work/ntp-4.1.1a'
make: *** [all] Error 2

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_compile, Line 10, Exitcode 2
!!! (no error message)

!!! emerge aborting on  /usr/portage/net-misc/ntp/ntp-4.1.1a.ebuild .


Don't ask me what CONFIG_PHONE is or where it comes from. There are no use flags
to turn on/off...

------- Comment #1 From Jon Nelson 2002-08-13 21:29:34 0000 -------
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?


------- Comment #2 From Karl Trygve Kalleberg (RETIRED) 2002-08-16 10:16:56 0000 -------
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) ? 

------- Comment #3 From Jon Nelson 2002-08-16 11:07:08 0000 -------
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?

------- Comment #4 From Karl Trygve Kalleberg (RETIRED) 2002-08-16 11:45:18 0000 -------
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 ?

------- Comment #5 From Jon Nelson 2002-08-16 11:51:36 0000 -------
The bug is in some other package according to karltk - closing.

------- Comment #6 From SpanKY 2003-01-01 21:02:26 0000 -------
got a fix :)

------- Comment #7 From SpanKY 2003-01-01 21:02:36 0000 -------
http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-x86/net-misc/ntp/files/linux-config-phone.patch?rev=1.1&content-type=text/vnd.viewcvs-markup

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug