Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55637 - compile of pam-0.77 fails: pam_console.c: storage size ... isn't known
Summary: compile of pam-0.77 fails: pam_console.c: storage size ... isn't known
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: PAM Gentoo Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-29 22:54 UTC by Markus Wernig
Modified: 2005-02-27 23:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Wernig 2004-06-29 22:54:21 UTC
Gentoo Base System version 1.4.3.8p1, Kernel 2.6.4 

libpam can't be built because of errors during compilation. Here's the last lines of output:

pam_console.c: At top level:
pam_console.c:52: error: storage size of `consolelock' isn't known
pam_console.c:53: error: storage size of `consolerefs' isn't known
pam_console.c:54: error: storage size of `consoleapps' isn't known
pam_console.c:55: error: storage size of `consoleperms' isn't known
config.y:327: warning: `set_permissions_single' defined but not used
config.y:367: warning: `reset_permissions_single' defined but not used
pam_console.c:52: warning: `consolelock' defined but not used
pam_console.c:53: warning: `consolerefs' defined but not used
pam_console.c:54: warning: `consoleapps' defined but not used
pam_console.c:55: warning: `consoleperms' defined but not used
config.lex.c:1432: warning: `_pc_yy_delete_buffer' defined but not used
config.lex.c:1549: warning: `_pc_yy_scan_string' defined but not used
config.lex.c:1227: warning: `yyunput' defined but not used
config.y:467: warning: `do_yyerror' defined but not used
make[2]: *** [dynamic/pam_console.o] Error 1


This is especially annoying since pam is a system dependency and is tried with almost any emerge -D -u ... so all those fail as well.

/markus
Comment 1 Markus Wernig 2004-06-30 11:41:15 UTC
Hi

I found out where the error is: the variable PATH_MAX, that is used for allocating space for a static array, isn't known, because the appropriate system includes (<linux/limits.h>) were not #included.

If I add the following lines to/var/tmp/portage/pam-0.77/work/Linux-PAM-0.77/ _pam_aconf.h.in after the source gets unpacked, but before the build starts, I get the ebuild built. I'm leaving this bug as NEW, because it needs to be fixed by the pam people still.

--- _pam_aconf.h.in ---

[...]
# ifndef _LINUX_LIMITS_H
# include <linux/limits.h>
# endif
[...]

krgds /markus
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-08-12 00:12:34 UTC
coming up in 0.77-r2 I'm rolling.
Comment 3 Kelly McCauley 2004-11-18 08:10:33 UTC
Stage1 amd64 2004.3

Experienced the same problem with pam-0.77-r3.

executed:

emerge --verbose system

output:

pam_console.c: At top level:
pam_console.c:52: error: storage size of `consolelock' isn't known
pam_console.c:53: error: storage size of `consolerefs' isn't known
pam_console.c:54: error: storage size of `consoleapps' isn't known
pam_console.c:55: error: storage size of `consoleperms' isn't known
config.y:327: warning: `set_permissions_single' defined but not used
config.y:367: warning: `reset_permissions_single' defined but not used
pam_console.c:52: warning: `consolelock' defined but not used
pam_console.c:53: warning: `consolerefs' defined but not used
pam_console.c:54: warning: `consoleapps' defined but not used
pam_console.c:55: warning: `consoleperms' defined but not used
config.lex.c:1432: warning: `_pc_yy_delete_buffer' defined but not used
config.lex.c:1549: warning: `_pc_yy_scan_string' defined but not used
config.lex.c:1227: warning: `yyunput' defined but not used
config.y:473: warning: `do_yyerror' defined but not used
make[2]: *** [dynamic/pam_console.o] Error 1


Kelly
Comment 4 Michael Jinks 2004-12-21 22:24:21 UTC
Gentoo Base System version 1.4.16

I'm having what appears to be a similar problem, but modifying _pam_aconf.h.in as suggested by Markus doesn't make any difference in my case.  I first noticed this while trying to update my system, which was using pam-0.77-r1, but I've also tried specifying -r4 to ebuild, no difference that I can see.

Lengthy screen paste follows; sorry it's so long but I wasn't sure what to cut out... -mrj

[...]
gcc -Wall -Wwrite-strings       -Wpointer-arith -Wcast-qual -Wcast-align        -Wstrict-prototypes -Wmissing-prototypes   -Wnested-externs -Winline -Wshadow -Dlinux -march=athlon-mp -O3 -pipe -fPIC -I/var/tmp/portage/pam-0.77-r4/work/Linux-PAM-0.77/include  -I./include -I/var/tmp/portage/pam-0.77-r4/work/Linux-PAM-0.77/libpam/include -I/var/tmp/portage/pam-0.77-r4/work/Linux-PAM-0.77 -I/var/tmp/portage/pam-0.77-r4/work/Linux-PAM-0.77/libpamc/include  -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_GNU_SOURCE -DLOCKDIR=\"/var/run/console\" -I../pammodutil/include  -o pam_console_apply pam_console_apply.c -Wl,-Bstatic //usr/lib/libglib.a -L../pammodutil -lpammodutil -Wl,-Bdynamic ../../libpam/libpam.so -lc
In file included from pam_console_apply.c:5:
../../_pam_aconf.h:31:1: warning: "_GNU_SOURCE" redefined
<command line>:5:1: warning: this is the location of the previous definition
In file included from pam_console_apply.c:7:
/usr/include/glib-1.2/glib.h:1697: warning: declaration of `index' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1703: warning: declaration of `index' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1705: warning: declaration of `index' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1719: warning: declaration of `index' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1721: warning: declaration of `index' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1745: warning: declaration of `index' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:1747: warning: declaration of `index' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
/usr/include/glib-1.2/glib.h:2319: warning: declaration of `index' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here
pam_console_apply.c: In function `main':
pam_console_apply.c:107: warning: assignment discards qualifiers from pointer target type
In file included from pam_console_apply.c:126:
config.tab.c: At top level:
config.tab.c:777: warning: static declaration for `_pc_yyparse' follows non-static
config.y: In function `_pc_yyparse':
config.y:104: warning: char format, void arg (arg 4)
config.tab.c:1203: warning: passing arg 1 of `_pc_yyerror' discards qualifiers from pointer target type
config.tab.c:1302: warning: passing arg 1 of `_pc_yyerror' discards qualifiers from pointer target type
config.lex.c: At top level:
config.y:327: warning: `set_permissions_single' defined but not used
config.y:367: warning: `reset_permissions_single' defined but not used
config.lex.c:1432: warning: `_pc_yy_delete_buffer' defined but not used
config.lex.c:1549: warning: `_pc_yy_scan_string' defined but not used
config.lex.c:1227: warning: `yyunput' defined but not used
config.y:473: warning: `do_yyerror' defined but not used
//usr/lib/libglib.a(gstrfuncs.o)(.text+0x785): In function `g_strdown':
: undefined reference to `__ctype_tolower'
//usr/lib/libglib.a(gstrfuncs.o)(.text+0x825): In function `g_strup':
: undefined reference to `__ctype_toupper'
//usr/lib/libglib.a(gstrfuncs.o)(.text+0x1296): In function `g_strchug':
: undefined reference to `__ctype_b'
//usr/lib/libglib.a(gstrfuncs.o)(.text+0x137a): In function `g_strchomp':
: undefined reference to `__ctype_b'
//usr/lib/libglib.a(gstring.o)(.text+0x606): In function `g_string_down':
: undefined reference to `__ctype_tolower'
//usr/lib/libglib.a(gstring.o)(.text+0x6a6): In function `g_string_up':
: undefined reference to `__ctype_toupper'
collect2: ld returned 1 exit status
make[2]: *** [pam_console_apply] Error 1
make[2]: Leaving directory `/var/tmp/portage/pam-0.77-r4/work/Linux-PAM-0.77/modules/pam_console'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/var/tmp/portage/pam-0.77-r4/work/Linux-PAM-0.77/modules'
make: *** [modules] Error 2
Comment 5 Alexander Schreiber 2005-01-22 17:28:35 UTC
This happened to me after upgrading gcc from 2.95 to 3.x and upgrading glibc in the process. The following world rebuild (emerge -e world) failed at rebuilding pam. 
The fix: cancel the world rebuild, re-emerge pwdb (to ensure it is linked properly against the new glibc), restart world rebuild. After that, pam compiled without problems.
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2005-02-25 11:32:01 UTC
Is this still an issue with latest pam releases?
Comment 7 Markus Wernig 2005-02-27 15:59:51 UTC
pam-0.78 just compiled cleanly on my system.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2005-02-27 23:44:17 UTC
Ok, great to hear.  If anybody still have an issue, please reopen.