Mailing List Archive

[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS
http://bugzilla.mindrot.org/show_bug.cgi?id=1001

Summary: Error on MAKE while compiling SRPMS and tar.gz but not
while installing RPMS
Product: Portable OpenSSH
Version: 3.7.1p2
Platform: All
OS/Version: Linux
Status: NEW
Severity: critical
Priority: P2
Component: ssh
AssignedTo: openssh-bugs@mindrot.org
ReportedBy: praveenmm@hotmail.com


I am running Red Hat Linux release 7.2 (Enigma) with custom kernel version:
2.4.21 and openSSH version: 3.7.1p2-1.

When I install openSSH version (any) RPM it gets installed after resolving
dependencies but it fails at MAKE when I try to install using tar.gz or source
RPMS. The error displayed is:

---------- ERROR MESSAGE -----

checking if your system defines WTMPX_FILE... no
configure: creating ./config.status
./configure: uniq: command not found
config.status: creating Makefile
config.status: creating openbsd-compat/Makefile
config.status: creating scard/Makefile
config.status: creating ssh_prng_cmds
config.status: creating config.h

OpenSSH has been configured with the following options:
User binaries: /usr/local/bin
System binaries: /usr/local/sbin
Configuration files: /usr/local/etc
Askpass program: /usr/local/libexec/ssh-askpass
Manual pages: /usr/local/man/manX
PID file: /var/run
Privilege separation chroot path: /var/empty
sshd default user
PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Manpage format: doc
DNS support: no
PAM support: no
KerberosV support: no
Smartcard support: no
S/KEY support: no
TCP Wrappers support: no
MD5 password support: no
IP address in $DISPLAY hack: no
Translate v4 in v6 hack: yes
BSD Auth support: no
Random number source: OpenSSL internal ONLY

Host: i686-pc-linux-gnu
Compiler: gcc
Compiler flags: -g -O2 -Wall -Wpointer-arith -Wno-uninitialized
Preprocessor flags:
Linker flags:
Libraries: -lutil -lz -lnsl -lcrypto -lcrypt

bash-2.05# make
(cd openbsd-compat && make)
make[1]: Entering directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/openbsd-
compat'
gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.. -I. -I./.. -
DHAVE_CONFIG_H -c bsd-arc4random.c
In file included from ../includes.h:170,
from bsd-arc4random.c:25:
../defines.h:146:4: #error "8 bit int type not found."
../defines.h:158:5: #error "16 bit int type not found."
../defines.h:167:5: #error "32 bit int type not found."
../defines.h:183:5: #error "8 bit int type not found."
../defines.h:195:6: #error "16 bit int type not found."
../defines.h:204:6: #error "32 bit int type not found."
make[1]: *** [bsd-arc4random.o] Error 1
make[1]: Leaving directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/openbsd-
compat'
make: *** [openbsd-compat/libopenbsd-compat.a] Error 2

----- ERROR MESSAGE -------

------ ENVIRONMENT/VERSION DETAILS ---------
bash-2.05# rpm -qa | grep openssh
openssh-askpass-3.7.1p2-1
openssh-3.7.1p2-1
openssh-clients-3.7.1p2-1
openssh-server-3.7.1p2-1

bash-2.05# rpm -qa | grep openssl
openssl-devel-0.9.6b-8
openssl-0.9.6b-8

bash-2.05# rpm -qa | grep zlib
zlib-devel-1.1.4-8.7x
zlib-1.1.4-8.7x

bash-2.05# rpm -qa | grep glibc
glibc-2.2.4-13
glibc-common-2.2.4-13
glibc-devel-2.2.4-13

bash-2.05# rpm -qa | grep kernel
kernel-source-2.4.7-10
kernel-smp-2.4.7-10
kernel-pcmcia-cs-3.1.27-10
kernel-enterprise-2.4.7-10
kernel-headers-2.4.7-10
kernel-2.4.7-10

------ ENVIRONMENT/VERSION DETAILS ---------



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-16 10:21 -------
(In reply to comment #0)
> ./configure: uniq: command not found

This is probably the cause. On my FC3 box, uniq is provided by the "coreutils"
package, try installing it for your box and retesting.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-16 10:53 -------
Created an attachment (id=856)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=856&action=view)
Add coreutils to BuildPreReq

If I rename /usr/bin/uniq I get the same errors as you report, so I'm almost
certain that's the source of your problem.

This patch adds coreutils as a build prereq which will catch this.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001


dtucker@zip.com.au changed:

What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |994
nThis| |
Severity|critical |minor
Status|NEW |ASSIGNED
Component|ssh |Build system
Keywords| |patch
Version|3.7.1p2 |-current




------- Additional Comments From dtucker@zip.com.au 2005-03-16 10:57 -------
A build problem in a contrib file does not warrant "critical" severity.

Please try the attached patch and see if it complains about coreutils being
missing. (I can't remove it to test on my box because many things depend on it).



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-16 11:14 -------
(From update of attachment 856)
I've just looked at what's actually *in* coreutils (ls, rm, mv and many other
things that are likely to be missed) so I find it difficult to believe that
it's not installed.

>+BuildPreReq: perl, openssl-devel, tcp_wrappers, coreutils

Perhaps uniq is provided be some other RPM on your platform, in which case the
BuildPreReq should be "/usr/bin/uniq".




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From praveenmm@hotmail.com 2005-03-17 03:37 -------
I tried to patch (patch file is in /usr/src/redhat/SOURCES/openssh-3.7.1p2/)and
displays following:


bash-2.05# pwd
/usr/src/redhat/SOURCES/openssh-3.7.1p2

bash-2.05# patch < openssh-rpm-coreutils.patch
can't find file to patch at input line 8
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: contrib/redhat/openssh.spec
|===================================================================
|RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/contrib/redhat/openss
h.spec,v
|retrieving revision 1.133
|diff -u -p -r1.133 openssh.spec
|--- contrib/redhat/openssh.spec 9 Mar 2005 00:02:42 -0000 1.133
|+++ contrib/redhat/openssh.spec 15 Mar 2005 23:46:24 -0000
--------------------------
File to patch:




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-17 06:52 -------
(In reply to comment #5)
> bash-2.05# patch < openssh-rpm-coreutils.patch

Try giving patch the "-p0" option.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From praveenmm@hotmail.com 2005-03-17 08:11 -------
It still gives the same error. See output below:

bash-2.05# patch < openssh-rpm-coreutils.patch -p0
patching file contrib/redhat/openssh.spec
Hunk #1 succeeded at 79 (offset -5 lines).


bash-2.05# ./configure --with-md5-password
....
....
....
checking if the systems has expire shadow information... yes
checking for "/etc/default/login"... no
Adding /usr/local/bin to USER_PATH so scp will work
checking if we need to convert IPv4 in IPv6-mapped addresses... yes (default)
checking if your system defines LASTLOG_FILE... no
checking if your system defines _PATH_LASTLOG... yes
checking if your system defines UTMP_FILE... yes
checking if your system defines WTMP_FILE... yes
checking if your system defines UTMPX_FILE... no
checking if your system defines WTMPX_FILE... no
configure: creating ./config.status
./configure: uniq: command not found
config.status: creating Makefile
config.status: creating openbsd-compat/Makefile
config.status: creating scard/Makefile
config.status: creating ssh_prng_cmds
config.status: creating config.h
config.status: config.h is unchanged

OpenSSH has been configured with the following options:
User binaries: /usr/local/bin
System binaries: /usr/local/sbin
Configuration files: /usr/local/etc
Askpass program: /usr/local/libexec/ssh-askpass
Manual pages: /usr/local/man/manX
PID file: /var/run
Privilege separation chroot path: /var/empty
sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Manpage format: doc
DNS support: no
PAM support: no
KerberosV support: no
Smartcard support: no
S/KEY support: no
TCP Wrappers support: no
MD5 password support: no
IP address in $DISPLAY hack: no
Translate v4 in v6 hack: yes
BSD Auth support: no
Random number source: OpenSSL internal ONLY

Host: i686-pc-linux-gnu
Compiler: gcc
Compiler flags: -g -O2 -Wall -Wpointer-arith -Wno-uninitialized
Preprocessor flags:
Linker flags:
Libraries: -lutil -lz -lnsl -lcrypto -lcrypt

bash-2.05# make
....
....
....
(cd openbsd-compat && make)
make[1]: Entering directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/openbsd-
compat'
gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.. -I. -I./.. -
DHAVE_CONFIG_H -c bsd-arc4random.c
In file included from ../includes.h:170,
from bsd-arc4random.c:25:
../defines.h:146:4: #error "8 bit int type not found."
../defines.h:158:5: #error "16 bit int type not found."
../defines.h:167:5: #error "32 bit int type not found."
../defines.h:183:5: #error "8 bit int type not found."
../defines.h:195:6: #error "16 bit int type not found."
../defines.h:204:6: #error "32 bit int type not found."
make[1]: *** [bsd-arc4random.o] Error 1
make[1]: Leaving directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/openbsd-
compat'
make: *** [openbsd-compat/libopenbsd-compat.a] Error 2





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-17 08:35 -------
OK, please try editting the spec file and changing this line:
BuildPreReq: perl, openssl-devel, tcp_wrappers, coreutils

to

BuildPreReq: perl, openssl-devel, tcp_wrappers, /usr/bin/uniq

then retest.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From praveenmm@hotmail.com 2005-03-17 09:56 -------
Still produces same error.

Block 1: openssh.specs extract which contains BuildPreReq line
Block 2: error output

---- BLOCK 1 (openssh.spec) -------
License: BSD
Group: Applications/Internet
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Obsoletes: ssh
%if %{build6x}
PreReq: initscripts >= 5.00
%else
PreReq: initscripts >= 5.20
%endif
BuildPreReq: perl, openssl-devel, tcp_wrappers, /usr/bin/uniq
BuildPreReq: /bin/login
%if ! %{build6x}
BuildPreReq: glibc-devel, pam
%else
BuildPreReq: /usr/include/security/pam_appl.h
---- BLOCK 1 -------

---- BLOCK 2 -------
bash-2.05# ./configure
....
....
....
./configure: uniq: command not found
config.status: creating Makefile
config.status: creating openbsd-compat/Makefile
config.status: creating scard/Makefile
config.status: creating ssh_prng_cmds
config.status: creating config.h

OpenSSH has been configured with the following options:
User binaries: /usr/local/bin
System binaries: /usr/local/sbin
Configuration files: /usr/local/etc
Askpass program: /usr/local/libexec/ssh-askpass
Manual pages: /usr/local/man/manX
PID file: /var/run
Privilege separation chroot path: /var/empty
sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Manpage format: doc
DNS support: no
PAM support: no
KerberosV support: no
Smartcard support: no
S/KEY support: no
TCP Wrappers support: no
MD5 password support: no
IP address in $DISPLAY hack: no
Translate v4 in v6 hack: yes
BSD Auth support: no
Random number source: OpenSSL internal ONLY

Host: i686-pc-linux-gnu
Compiler: gcc
Compiler flags: -g -O2 -Wall -Wpointer-arith -Wno-uninitialized
Preprocessor flags:
Linker flags:
Libraries: -lutil -lz -lnsl -lcrypto -lcrypt

bash-2.05# make clean
bash-2.05# make
....
....
....
(cd openbsd-compat && make)
make[1]: Entering directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/openbsd-
compat'
gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.. -I. -I./.. -
DHAVE_CONFIG_H -c bsd-arc4random.c
In file included from ../includes.h:170,
from bsd-arc4random.c:25:
../defines.h:146:4: #error "8 bit int type not found."
../defines.h:158:5: #error "16 bit int type not found."
../defines.h:167:5: #error "32 bit int type not found."
../defines.h:183:5: #error "8 bit int type not found."
../defines.h:195:6: #error "16 bit int type not found."
../defines.h:204:6: #error "32 bit int type not found."
make[1]: *** [bsd-arc4random.o] Error 1
make[1]: Leaving directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/openbsd-
compat'
make: *** [openbsd-compat/libopenbsd-compat.a] Error 2

---- BLOCK 2 -------



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-17 10:56 -------
I don't know why the buildprereq doesn't work. My only guess is that uniq is in
the rpm database but has been deleted from /usr/bin.

Does /usr/bin/uniq exist? Does rpm know about it ("rpm -qfi /usr/bin/uniq")?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From praveenmm@hotmail.com 2005-03-17 12:55 -------
/usr/bin/uniq does not exist.

bash-2.05# rpm -qfi /usr/bin/uniq
error: file /usr/bin/uniq: No such file or directory




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-18 10:51 -------
(In reply to comment #11)
> /usr/bin/uniq does not exist.

Well, that's the source of your problem. It may be in some other RPM on your
version of redhat (maybe fileutils?), I suggest you find it and install it.

I don't understand why the /usr/bin/uniq BuildPreReq doesn't cause it to
complain, though.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From praveenmm@hotmail.com 2005-03-22 05:08 -------
Thanks, Darren. With TextUtils was able to execute MAKE.

On MAKE INSTALL, I get this below message on permissions. I stopped the SSHD
service (/usr/local/sbin) and tried MAKE INSTALL but still gives same message.

The permissions I have on SSHD is:
bash-2.05# ls -alp
total 644
drwxr-xr-x 2 root root 4096 Feb 6 1996 ./
drwxr-sr-x 15 root root 4096 Mar 18 18:18 ../
-rwsr-sr-x 1 root root 645854 Oct 14 2003 sshd
--------------------


bash-2.05# make install
if test ! -z ""; then \
/usr/bin/perl ./fixprogs ssh_prng_cmds ; \
fi
(cd openbsd-compat && make)
make[1]: Entering directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/openbsd-com
pat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/openbsd-comp
at'
(cd scard && make DESTDIR= install)
make[1]: Entering directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/scard'
../mkinstalldirs /usr/local/share
/usr/bin/install -c -m 0644 ./Ssh.bin /usr/local/share/Ssh.bin
make[1]: Leaving directory `/usr/src/redhat/SOURCES/openssh-3.7.1p2/scard'
./mkinstalldirs /usr/local/bin
./mkinstalldirs /usr/local/sbin
./mkinstalldirs /usr/local/man
./mkinstalldirs /usr/local/share
./mkinstalldirs /usr/local/man/man1
./mkinstalldirs /usr/local/man/man5
./mkinstalldirs /usr/local/man/man8
./mkinstalldirs /usr/local/libexec
(umask 022 ; ./mkinstalldirs /var/empty)
/usr/bin/install -c -m 0755 -s ssh /usr/local/bin/ssh
/usr/bin/install -c -m 0755 -s scp /usr/local/bin/scp
/usr/bin/install -c -m 0755 -s ssh-add /usr/local/bin/ssh-add
/usr/bin/install -c -m 0755 -s ssh-agent /usr/local/bin/ssh-agent
/usr/bin/install -c -m 0755 -s ssh-keygen /usr/local/bin/ssh-keygen
/usr/bin/install -c -m 0755 -s ssh-keyscan /usr/local/bin/ssh-keyscan
/usr/bin/install -c -m 0755 -s sshd /usr/local/sbin/sshd
/usr/bin/install: cannot remove `/usr/local/sbin/sshd': Operation not permitted
make: *** [install-files] Error 1

Thanks!




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-22 11:22 -------
(In reply to comment #13)
> -rwsr-sr-x 1 root root 645854 Oct 14 2003 sshd

That looks badly wrong (and very suspect). sshd should not be setuid (or setgid).

> /usr/bin/install -c -m 0755 -s sshd /usr/local/sbin/sshd
> /usr/bin/install: cannot remove `/usr/local/sbin/sshd': Operation not permitted

Assuming that's running as root, maybe it's flagged immutable? Try "lsattr sshd".



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From praveenmm@hotmail.com 2005-03-22 13:06 -------
It is running as root. Result of lsattr sshd
bash-2.05# lsattr sshd
-u--a-------- sshd




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001





------- Additional Comments From dtucker@zip.com.au 2005-03-22 13:40 -------
(In reply to comment #15)
> It is running as root. Result of lsattr sshd
> bash-2.05# lsattr sshd
> -u--a-------- sshd

Yep, that's it (AFAIK there's no good reason for doing this and I would consider
it pretty suspicious).

From the chattr(1) man page:

A file with the 'a' attribute set can only be open in append mode for
writing. Only the superuser or a process possessing the
CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

So you need to "chattr -ua sshd". Anyway, this is a local configuration problem
not an OpenSSH problem so please close this bug.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001


praveenmm@hotmail.com changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED




------- Additional Comments From praveenmm@hotmail.com 2005-03-27 02:34 -------
Thanks so much, Darren!



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 1001] Error on MAKE while compiling SRPMS and tar.gz but not while installing RPMS [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=1001


praveenmm@hotmail.com changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.