Bug 421 - compile error on Debian slink
Summary: compile error on Debian slink
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: ix86 Linux
: P2 critical
Assignee: OpenSSH Bugzilla mailing list
URL: http://pigtail.net/compile/error.txt
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-25 13:21 AEST by Nicholas Fong
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Fong 2002-10-25 13:21:32 AEST
Platform to compile is a Debian Slink with openssl 0.9.6g installed.
Platform compiles 100% successfully with openssh 3.4p1
Using indentical platform,
compile error when trying to compile 3.5p1 Openssh,
see http://pigtail.net/compile/error.txt for more details.

Thanks
Nicholas Fong
Comment 1 Ben Lindstrom 2002-10-25 14:03:55 AEST
[.. Important part from URL..]
gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.. -I. -I./.. -
I/usr/local/ssl/include
  -DHAVE_CONFIG_H -c bsd-getpeereid.c
bsd-getpeereid.c: In function `getpeereid':
bsd-getpeereid.c:35: storage size of `cred' isn't known
bsd-getpeereid.c:35: warning: unused variable `cred'
make[1]: *** [bsd-getpeereid.o] Error 1

I dealt with this recently on an old Redhat 6.2 Alpha box.  Your glibc is out 
of date.  You more than likely have 2.0.  Which does not include the correct 
headers from kernel space (back when /usr/includes/linux/ was linked 
to /usr/src/linux/include/).

The hack is to just do a #undef SO_PEERCRED at the top of the bsd-getpeereid.c 
file.

As for a better solution.  I'm not sure.  I don't want to include <linux/*> 
stuff.  That I think is the wrong solution.
Comment 2 Nicholas Fong 2002-10-25 16:06:29 AEST
Due to old glibc in Debian slink.
Work around tips from anonymous guru:
  add
#undef SO_PEERCRED at the top of the bsd-getpeereid.c 
Comment 3 Ben Lindstrom 2002-10-25 23:15:30 AEST
This bug still exists in the source.  Don't close it until a final decision is 
made about how it iwll be handled in the CVS tree.
Comment 4 Carl Hage 2003-01-10 05:38:58 AEDT
I noticed the same problem with a compile error where ucred is undefined in
SUSE Linux 6.1. The problem is the test for SO_PEERCRED-- the feature is not
available even though the define is present. In my linux/socket.h there is
a "#define SCM_CREDENTIALS" next to the ucred definition, so the change from

#if defined(SO_PEERCRED)

to

#if defined(SO_PEERCRED) && defined(SCM_CREDENTIALS)

solves the compile problem, but I don't know which other distributions have the
same. It may be SCM_CREDS or SCM_RIGHTS.

Perhaps the only good way to check is with a new autoconfigure variable.
Comment 5 Nicholas Fong 2003-01-10 13:57:09 AEDT
#if defined(SO_PEERCRED) && defined(SCM_CREDENTIALS)
also works with Debian Slink.
Comment 6 Darren Tucker 2003-05-04 10:05:16 AEST
Is this still broken for anyone?  I built the current CVS tree on a Debian/slink 
test box today and it complied OK and ran a complete regression test (including 
privsep).
Comment 7 Darren Tucker 2003-05-10 20:54:58 AEST
With the closure of bug #536, I think this is now fully fixed.  It certainly 
works for me.  Please re-open if this problem re-occurs or a new bug if there's 
other problems on this platform.
Comment 8 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED