Red Hat Bugzilla – Bug 67621
3.1p1-6 cannot be compiled on RHL 6.2 system
Last modified: 2007-04-18 12:43:44 EDT
From Bugzilla Helper: * privacy *
Description of problem:
The ISS patch introduces "__func__", which results in an compiler error on
rebuilding the SRPMS on a RHL 6.2 system
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. change spec file to enable RHL 6.2 build
2. rpm -bb modified spec file
Actual Results: make: Leaving directory
i386-redhat-linux-gcc -O2 -march=i386 -mcpu=i686 -Wall -Wpointer-arith
-Wno-uninitialized -I. -I. -DSSHDIR=\"/etc/ssh\"
-DSSH_RAND_HELPER=\"/usr/libexec/openssh/ssh-rand-helper\" -DHAVE_CONFIG_H -c
auth2-pam.c: In function `input_userauth_info_response_pam':
auth2-pam.c:146: `__func__' undeclared (first use in this function)
auth2-pam.c:146: (Each undeclared identifier is reported only once
auth2-pam.c:146: for each function it appears in.)
Expected Results: Clean compile
Problem is introduced by the openssh-adv.iss.patch
Created attachment 65825 [details]
openssh-3.1p1-fix-__func__.diff (fixes use of __func__ in auth2-pam.c)
I just finished a recompile of openssh-3.1p1-6 for my RH 6.2 system.
Attachment #65825 [details] is a patch to fix the use of __func__ in auth2-pam.c
so that it is in agreement with the ISO C99 standard. This patch
should only be used with older versions of gcc! You may read more
about __func__ and gcc here:
I also had to make other changes to the openssh.spec file to get it
compiled under RH 6.2, but I have a somewhat non-standard setup (due
to use of alien(1) to convert Debian packages to RPMs and rebuilding
other RH 7.x for use with RH 6.2):
- Changed BuildPreReq from db1-devel to db3-devel (RH 7.1 SRPM
rebuilt on 6.2).
- Changed BuildPreReq from openssl-devel to libssl-dev (Debian
package converted by alien(1)).
- Changed %define build6x from 0 to 1 (required for RH 6.2
- Rebuilt pam-0.75-19 SRPM from Red Hat 7.2 and installed. (I
needed the header files found in /usr/include/security/ from
- Added pam-devel to BuildPreReq for build6x.
- Added patch found in Attachment #65825 [details] to fix issue with use
of __func__ in auth2-pam.c.
I'm afraid this system confuses the heck out of up2date. :^)
Hope that helps!
Obviously, another way to fix this is to simply replace __func__
with the name of the functions in the two locations where it's
used. I simply tried to follow the ISO C99 spec.
Let's move forward to rawhide openssh-3.4p1, which is also working on RHL 6.2
I'll made some RHL 6.2 enhancements in the spec file for this version:
Mho: this issue can be closed now.
Yes, later versions are ok.