"rpmbuild courier-imap" broken pipe error

Discussion in 'HOWTO-Related Questions' started by JCinDE, Oct 8, 2009.

  1. JCinDE

    JCinDE New Member

    I'm following the "The Perfect Server - CentOS 5.3 x86_64 [ISPConfig 3]" instructions and I am encountering an error when trying to build the rpm for courier-imap (from page 4 of the HOWTO).

    The command I run is:

    Code:
    rpmbuild -ta courier-imap-4.6.0.tar.bz2
    The error is below:

    Code:
    INFO: LOGIN, user=confmdtest, ip=[127.0.0.1], port=[0], protocol=SMAP1
    INFO: LOGOUT, user=confmdtest, ip=[127.0.0.1], headers=0, body=0, rcvd=26, sent=610, time=0
    sort: fflush failed: standard output: Broken pipe
    sort: write error
    make[2]: *** [check-am] Error 1
    make[2]: Leaving directory `/home/compileuser/rpm/BUILD/courier-imap-4.6.0/imap'
    make[1]: *** [check] Error 2
    make[1]: Leaving directory `/home/compileuser/rpm/BUILD/courier-imap-4.6.0/imap'
    make: *** [check-recursive] Error 1
    error: Bad exit status from /var/tmp/rpm-tmp.85697 (%build)
    
    
    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.85697 (%build)
    
    Google is no help. I'd appreciate any assistance!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Hm... Is SELinux disabled?
     
  3. Mr.Paradigm

    Mr.Paradigm New Member

    Getting same error for CentOS 5.4

    Hello,

    Since this is basically the same issue, I didn't think that a new thread was necessary. I apologize in advance if this is wrong.

    I'm following The Perfect Server - CentOS 5.4 x86_64 [ISPConfig 3] and am getting the same error when I run

    Code:
    rpmbuild -ta courier-imap-4.6.0.tar.bz2
    the result is

    Code:
    sort: fflush failed: standard output: Broken pipe
    sort: write error
    make[2]: *** [check-am] Error 1
    make[2]: Leaving directory `/home/compileuser /rpm/BUILD/courier-imap-4.6.0/imap'
    make[1]: *** [check] Error 2
    make[1]: Leaving directory `/home/compileuser /rpm/BUILD/courier-imap-4.6.0/imap'
    make: *** [check-recursive] Error 1
    error: Bad exit status from /var/tmp/rpm-tmp.42891 (%build)
    
    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.42891 (%build)
    
    When I check in $HOME/rpm/RPMS/x86_64 the following is missing.

    Code:
    -rw-r--r-- 1 compileuser compileuser 400497 Oct 28 15:49 courier-imap-4.6.0-1.x86_64.rpm
    -rw-r--r-- 1 compileuser compileuser 941203 Oct 28 15:49 courier-imap-debuginfo-4.6.0-1.x86_64.rpm
    
    I check to see if SELinux is disabled and it is as shown below

    Code:
    cat /etc/selinux/config
    
    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    #       enforcing - SELinux security policy is enforced.
    #       permissive - SELinux prints warnings instead of enforcing.
    #       disabled - SELinux is fully disabled.
    SELINUX=disabled
    # SELINUXTYPE= type of policy in use. Possible values are:
    #       targeted - Only targeted network daemons are protected.
    #       strict - Full SELinux protection.
    SELINUXTYPE=targeted
    
    # SETLOCALDEFS= Check local definition changes
    SETLOCALDEFS=0
    
    Thanks in advance for a solution to this.

    Mr. Paradigm
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Maybe something is wrong with the downloaded files. I'd try to download these files again.
     
  5. jumbojjj

    jumbojjj New Member

    I get this error after attempting to build:

    --> courier-imap-4.4.1-1.i386.rpm

    I also tried other versions of that package.

    CentOS 5.4
     
  6. jumbojjj

    jumbojjj New Member

    When I tried 4.6 and 4.7, I also got these lines (same as the other folks):

     
  7. falko

    falko Super Moderator Howtoforge Staff

    I have no idea where this is coming from. Is SELinux disabled?
     
  8. Meph

    Meph New Member

    I am having the exact same problem, with the exact same error message.

    Code:
    make[2]: *** [check-am] Error 1
    make[2]: Leaving directory `/home/compileuser/rpm/BUILD/courier-imap-4.6.0/imap'
    make[1]: *** [check] Error 2
    make[1]: Leaving directory `/home/compileuser/rpm/BUILD/courier-imap-4.6.0/imap'
    make: *** [check-recursive] Error 1
    error: Bad exit status from /var/tmp/rpm-tmp.84854 (%build)
    
    I also went through and disabled SELinux according to the howto.
     
  9. Meph

    Meph New Member

    I've worked around this problem, and now understand what's going on. However, I have no idea how to do this with rpmbuild, so I had to configure, make and install from source.

    The first time I tried it, I got the same error after using "make check". So I extracted the source files into a folder in /tmp and used the following commands.

    ./configure --bindir=/usr/local/bin --mandir=/usr/local/man
    make
    make check
    sudo make install
    sudo make install-configure

    Then I created a script under /etc/init.d/courier-imap

    Code:
    #!/bin/sh
    
    # Akadia AG, Fichtenweg 10, CH-3672 Oberdiessbach
    # --------------------------------------------------------------------------
    # File:        courier-imapd
    #
    # Autor:       Martin Zahn, Akadia AG, 14.04.2007
    #
    # Purpose:     Startup script for the Courier IMAP Daemon
    #
    # Location:    /etc/init.d
    # --------------------------------------------------------------------------
    
    # chkconfig: 2345 66 34
    # description: Start / Stop Courier IMAP Daemon
    # processname: authdaemond
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Source networking configuration.
    . /etc/sysconfig/network
    
    # Check that networking is up.
    [ ${NETWORKING} = "no" ] && exit 0
    
    RETVAL=0
    
    start() {
    # Start daemons.
    echo -n "Starting Courier-IMAP: "
    /usr/lib/courier-imap/libexec/imapd.rc start 2>/dev/null 1>&2 && success || failure
    RETVAL=$?
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/courier-imapd
            echo
    return $RETVAL
    }
    
    stop() {
            # Stop daemons.
    echo -n "Shutting down Courier-IMAP: "
    /usr/lib/courier-imap/libexec/imapd.rc stop 2>/dev/null 1>&2 && success || failure
    RETVAL=$?
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/courier-imapd
    echo
    return $RETVAL
    }
    
    restart() {
    stop
    start
    }
    
    # See how we were called.
    case "$1" in
      start)
    start
    ;;
      stop)
    stop
    ;;
      restart)
    restart
    ;;
      *)
    echo "Usage: authdaemond {start|stop|restart}"
    exit 1
    esac
    
    exit $?
    then used:

    sudo chmod a+x /etc/init.d/courier-imap

    to make the script executable. It seems to be working fine now. Please let me know if I did this wrong and how to fix it if I did.
     

Share This Page