RPM build error - unknown users

62 views
Skip to first unread message

jason404

unread,
Nov 23, 2018, 1:42:01 PM11/23/18
to niceeditor

I can't compile on CentOS from the latest source rpm as it involved unknown users:

RPM build errors: user vigna does not exist - using root group prof does not exist - using root user vigna does not exist - using root group prof does not exist - using root Bad exit status from /var/tmp/rpm-tmp.zikQ0c (%build)

Cheers

jason404

unread,
Nov 23, 2018, 1:43:58 PM11/23/18
to niceeditor
Can I just use the source from GitHub, or are there any specific changes for RHEL/CentOS?

Thanks.

rfs...@gmail.com

unread,
Nov 23, 2018, 9:42:03 PM11/23/18
to niceeditor
Either method can be used. The source RPM contains the same source code as v3.1.2, nothing special really for RHEL/CentOS. Of course, using RPM packages is nice since they are easy to update/remove.

I just tried building the source from github, using just "make build", and it worked fine for me.

I also tried the source rpm. This produces some warnings as you mentioned:
$ rpmbuild --rebuild ne-3.1.2-1.src.rpm
Installing ne-3.1.2-1.src.rpm
warning: user vigna does not exist - using root
warning: group prof does not exist - using root
warning: user vigna does not exist - using root
warning: group prof does not exist - using root
error: Failed build dependencies:
        perl is needed by ne-3.1.2-1.x86_64


The ones about user/group not existing can be safely ignored, they are just warnings.

The error about perl would seem to be the culprit. Since i have perl installed (via RPM), I just added "--nodeps" to the rpmbuild command. This seemed to do the trick, and it happily compiled and built a binary RPM package.

Hopefully one of those works for you.

rfs...@gmail.com

unread,
Nov 23, 2018, 9:52:08 PM11/23/18
to niceeditor
On Friday, November 23, 2018 at 9:42:03 PM UTC-5, rfs...@gmail.com wrote:

The error about perl would seem to be the culprit. Since i have perl installed (via RPM), I just added "--nodeps" to the rpmbuild command. This seemed to do the trick, and it happily compiled and built a binary RPM package.
 
Found the answer to that as well. The command /usr/bin/perl comes from the RPM package called "perl-interpreter". In theory that's all you need to run perl scripts.

The source rpm for ne is asking for package "perl", which is actually a much larger collection including "perl-interpreter" and a large number of other perl modules as well.

Cheers!

jason404

unread,
Nov 24, 2018, 3:06:45 PM11/24/18
to niceeditor
Hi.  Thanks for your reply.

Perl seems to be installed on my CentOS server, so it wasn't that.  But the errors seemed to not just be warnings, as the installation stopped.  I can't remember exactly, as I am trying to do something else now.

I've made a small change to the keys.c file in the source.  I've done this many times on Debian based distros, but I'm new to rpmbuild.  I've set everything up according to instructions, made the patch, but when I try to rebuild I get this error:

# rpmbuild -ba SPECS/ne.spec

<lots of similar errors skipped>

actions.c:1690:15: error: redefinition of 'i'
   for(int64_t i = 0; i < c && !(error = capitalize(b)) && !stop; i++);
               ^
actions.c:1681:15: note: previous definition of 'i' was here
   for(int64_t i = 0; i < c && !(error = to_lower(b)) && !stop; i++);
               ^
actions.c:1690:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for(int64_t i = 0; i < c && !(error = capitalize(b)) && !stop; i++);
   ^
actions.c:1700:15: error: redefinition of 'i'
   for(int64_t i = 0; i < c && !(error = center(b)) && !stop; i++) {
               ^
actions.c:1690:15: note: previous definition of 'i' was here
   for(int64_t i = 0; i < c && !(error = capitalize(b)) && !stop; i++);
               ^
actions.c:1700:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for(int64_t i = 0; i < c && !(error = center(b)) && !stop; i++) {
   ^
actions.c:1715:15: error: redefinition of 'i'
   for(int64_t i = 0; i < c && !(error = paragraph(b)) && !stop; i++);
               ^
actions.c:1700:15: note: previous definition of 'i' was here
   for(int64_t i = 0; i < c && !(error = center(b)) && !stop; i++) {
               ^
actions.c:1715:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for(int64_t i = 0; i < c && !(error = paragraph(b)) && !stop; i++);
   ^
actions.c:1781:15: error: redefinition of 'i'
   for(int64_t i = 0; i < c && !(error = undo(b)) && !stop; i++);
               ^
actions.c:1715:15: note: previous definition of 'i' was here
   for(int64_t i = 0; i < c && !(error = paragraph(b)) && !stop; i++);
               ^
actions.c:1781:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for(int64_t i = 0; i < c && !(error = undo(b)) && !stop; i++);
   ^
actions.c:1794:15: error: redefinition of 'i'
   for(int64_t i = 0; i < c && !(error = redo(b)) && !stop; i++);
               ^
actions.c:1781:15: note: previous definition of 'i' was here
   for(int64_t i = 0; i < c && !(error = undo(b)) && !stop; i++);
               ^
actions.c:1794:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for(int64_t i = 0; i < c && !(error = redo(b)) && !stop; i++);
   ^
make: *** [actions.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.MUlx94 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.MUlx94 (%build)

Do I ignore all these previous errors?  The last one stops the whole rebuild. 


# cat /var/tmp/rpm-tmp.MUlx94
#!/bin/sh

  RPM_SOURCE_DIR="/root/rpmbuild/SOURCES"
  RPM_BUILD_DIR="/root/rpmbuild/BUILD"
  RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic"
  RPM_LD_FLAGS="-Wl,-z,relro "
  RPM_ARCH="x86_64"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="ne"
  RPM_PACKAGE_VERSION="3.1.2"
  RPM_PACKAGE_RELEASE="1"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  LANG=C
  export LANG
  unset CDPATH DISPLAY ||:
  RPM_BUILD_ROOT="/root/rpmbuild/BUILDROOT/ne-3.1.2-1.x86_64"
  export RPM_BUILD_ROOT

  PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/lib64/pkgconfig:/usr/share/pkgconfig"
  export PKG_CONFIG_PATH

  set -x
  umask 022
  cd "/root/rpmbuild/BUILD"
cd 'ne-3.1.2'

cd src; make NE_GLOBAL_DIR=/usr/share/ne LIBS=-lncurses; strip ne


exit 0


What is the problem here?

Thanks.

R S

unread,
Nov 24, 2018, 9:48:13 PM11/24/18
to nicee...@googlegroups.com
Hi there,

The problem is that the C compiler in Centos 7 is gcc 4.8.5, and this uses an older dialect (C89) by default. Later versions of the C compiler default to the newer C99 standard (or even the newer still C11 standard). There are certain features which are only available in C99 or later, and ne uses some of them.

On Centos 7, the solution is to add the argument "-std=c99" when calling the C compiler. This can be done either in the makefile, or the ne.spec file used by rpmbuild. I also tried the following trick and it worked:

    export CC="gcc -std=c99"
    rpmbuild --rebuild ne-3.1.2-1.src.rpm

Hopefully that does the trick for you as well.

jason404

unread,
Nov 26, 2018, 11:42:06 AM11/26/18
to niceeditor
Great, finally got this sorted out.  Thank you both for your help.

Cheers
Reply all
Reply to author
Forward
0 new messages