Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpmbuild of CUPS2.0b1 fails #4459

Closed
michaelrsweet opened this issue Jul 31, 2014 · 3 comments
Closed

rpmbuild of CUPS2.0b1 fails #4459

michaelrsweet opened this issue Jul 31, 2014 · 3 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 2.0-current
CUPS.org User: pconklin

on CentOS 5.10 x86_64 using following command

rpmbuild -ta cups-2.0b1-source.tar.gz --without libusb1 --without systemd

Making all in cups...
Compiling adminutil.c...
cc1: error: unrecognized command line option "-Wsign-conversion"
make[1]: *** [adminutil.o] Error 1
make: *** [all] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.51326 (%build)

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

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: pconklin

Other relevant info

rpm -qa | grep gcc

libgcc-4.1.2-54.el5
libgcc-4.1.2-54.el5
gcc-4.1.2-54.el5
gcc-c++-4.1.2-54.el5

I also just tried removing the -Wsign-conversion and get the following error

Compiling tls.c...
In file included from tls.c:46:
tls-gnutls.c: In function �_httpTLSStart�:
tls-gnutls.c:1189: warning: implicit declaration of function �gnutls_transport_set_pull_timeout_function�
tls-gnutls.c:1189: error: �gnutls_pull_timeout_func� undeclared (first use in this function)
tls-gnutls.c:1189: error: (Each undeclared identifier is reported only once
tls-gnutls.c:1189: error: for each function it appears in.)
tls-gnutls.c:1189: error: expected �)� before �httpWait�
make[1]: *** [tls.o] Error 1
make: *** [all] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.21232 (%build)

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

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

OK, needed a configure check for the GNU TLS function (new in 3.0), and added a configure check for -Wsign-conversion (although that warning has been around for a LONG time...)

Source changes attached.

@michaelrsweet
Copy link
Collaborator Author

"str4459.patch":

Index: config-scripts/cups-compiler.m4

--- config-scripts/cups-compiler.m4 (revision 12121)
+++ config-scripts/cups-compiler.m4 (working copy)
@@ -110,7 +110,7 @@
# The -fstack-protector option is available with some versions of
# GCC and adds "stack canaries" which detect when the return address
# has been overwritten, preventing many types of exploit attacks.

  • AC_MSG_CHECKING(if GCC supports -fstack-protector)

  • AC_MSG_CHECKING(whether compiler supports -fstack-protector)
    OLDCFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -fstack-protector"
    AC_TRY_LINK(,,
    @@ -130,7 +130,7 @@

    exploits that depend on a fixed address for common functions.

    Not available to LSB binaries...

  •   AC_MSG_CHECKING(if GCC supports -fPIE)
    
  •   AC_MSG_CHECKING(whether compiler supports -fPIE)
    OLDCFLAGS="$CFLAGS"
    case "$uname" in
        Darwin*)
    

    @@ -154,10 +154,19 @@

    if test "x$with_optim" = x; then
    # Add useful warning options for tracking down problems...

  •   OPTIM="-Wall -Wno-format-y2k -Wsign-conversion -Wunused $OPTIM"
    
  •   OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
    
  •   AC_MSG_CHECKING(if GCC supports -Wno-tautological-compare)
    
  •   AC_MSG_CHECKING(whether compiler supports -Wsign-conversion)
    OLDCFLAGS="$CFLAGS"
    
  •   CFLAGS="$CFLAGS -Werror -Wsign-conversion"
    
  •   AC_TRY_COMPILE(,,
    
  •       [OPTIM="$OPTIM -Wsign-conversion"
    
  •       AC_MSG_RESULT(yes)],
    
  •       AC_MSG_RESULT(no))
    
  •   CFLAGS="$OLDCFLAGS"
    
  •   AC_MSG_CHECKING(whether compiler supports -Wno-tautological-compare)
    
  •   OLDCFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
    AC_TRY_COMPILE(,,
        [OPTIM="$OPTIM -Wno-tautological-compare"
    

    @@ -211,7 +220,7 @@
    # should contribute the necessary options to
    # [email protected]...
    echo "Building CUPS with default compiler optimizations; contact"

  •       echo "[email protected] with uname and compiler options needed"
    
  •       echo "[email protected] with uname and compiler options needed"
        echo "for your platform, or set the CFLAGS and LDFLAGS environment"
        echo "variables before running configure."
        ;;
    

    Index: config-scripts/cups-ssl.m4

    --- config-scripts/cups-ssl.m4 (revision 12121)
    +++ config-scripts/cups-ssl.m4 (working copy)
    @@ -78,6 +78,11 @@
    if test $have_ssl = 1; then
    CUPS_SERVERCERT="ssl/server.crt"
    CUPS_SERVERKEY="ssl/server.key"
    +

  •   SAVELIBS="$LIBS"
    
  •   LIBS="$LIBS $SSLLIBS"
    
  •   AC_CHECK_FUNC(gnutls_transport_set_pull_timeout_function, AC_DEFINE(HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION))
    
  •   LIBS="$SAVELIBS"
    

    fi
    fi
    fi

    Index: config.h.in

    --- config.h.in (revision 12121)
    +++ config.h.in (working copy)
    @@ -301,6 +301,13 @@

    /*

  • * Do we have the gnutls_transport_set_pull_timeout_function function?

  • /
    +
    +#undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION
    +
    +
    +/

    • What Security framework headers do we have?
      */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant