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

Error compiling 1.5b2 on Fedora #3849

Closed
michaelrsweet opened this issue May 26, 2011 · 5 comments
Closed

Error compiling 1.5b2 on Fedora #3849

michaelrsweet opened this issue May 26, 2011 · 5 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.5b2
CUPS.org User: jpopelka

client.c: In function �encrypt_client�:
client.c:3223:3: error: too few arguments to function �gnutls_init�

Would it be possible to install also files from desktop directory (because of cups.conf) ?

Seems that the -Wno-tautological-compare is passed to the compiler even if it doesn't know it, because I see (gcc 4.5.1)
cc1: warning: unrecognized command line option "-Wno-tautological-compare"

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

WRT #1 and #2, your proposed patch is acceptable.

For #3, I'll change the configure test to look for Clang.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: jpopelka

For #3:

With gcc-4.6.0 it's ok
checking if GCC supports -Wno-tautological-compare... yes

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"cups-1.5b-workaround.patch":

diff -up cups-1.5b2/config-scripts/cups-common.m4.15b-workaround cups-1.5b2/config-scripts/cups-common.m4
--- cups-1.5b2/config-scripts/cups-common.m4.15b-workaround 2011-05-26 14:39:11.000000000 +0200
+++ cups-1.5b2/config-scripts/cups-common.m4 2011-05-26 15:19:35.000000000 +0200
@@ -406,7 +406,7 @@ AC_ARG_WITH(components, [ --with-compon

case "$COMPONENTS" in
all)

  •   BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data locale man doc examples templates"
    
  •   BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data locale man doc examples templates desktop"
    ;;
    

    core)
    diff -up cups-1.5b2/scheduler/client.c.15b-workaround cups-1.5b2/scheduler/client.c
    --- cups-1.5b2/scheduler/client.c.15b-workaround 2011-05-20 05:49:49.000000000 +0200
    +++ cups-1.5b2/scheduler/client.c 2011-05-26 15:17:34.000000000 +0200
    @@ -3220,7 +3220,7 @@ encrypt_client(cupsd_client_t con) / I
    gnutls_certificate_set_x509_key_file(*credentials, ServerCertificate,
    ServerKey, GNUTLS_X509_FMT_PEM);

  • gnutls_init(&con->http.tls), GNUTLS_SERVER);

  • gnutls_init(&con->http.tls, GNUTLS_SERVER);
    gnutls_set_default_priority(con->http.tls);
    gnutls_credentials_set(con->http.tls, GNUTLS_CRD_CERTIFICATE, *credentials);
    gnutls_transport_set_ptr(con->http.tls, (gnutls_transport_ptr)HTTP(con));

@michaelrsweet
Copy link
Collaborator Author

"str3849.patch":

Index: config-scripts/cups-common.m4

--- config-scripts/cups-common.m4 (revision 9816)
+++ config-scripts/cups-common.m4 (working copy)
@@ -406,7 +406,7 @@

case "$COMPONENTS" in
all)

  •   BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data locale man doc examples templates"
    
  •   BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
    ;;
    

    core)

    Index: config-scripts/cups-compiler.m4

    --- config-scripts/cups-compiler.m4 (revision 9816)
    +++ config-scripts/cups-compiler.m4 (working copy)
    @@ -162,7 +162,7 @@
    else
    AC_MSG_CHECKING(if GCC supports -Wno-tautological-compare)
    OLDCFLAGS="$CFLAGS"

  •       CFLAGS="$CFLAGS -Wno-tautological-compare"
    
  •       CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
        AC_TRY_COMPILE(,,
            [OPTIM="$OPTIM -Wno-tautological-compare"
            AC_MSG_RESULT(yes)],
    

    Index: scheduler/client.c

    --- scheduler/client.c (revision 9816)
    +++ scheduler/client.c (working copy)
    @@ -3220,7 +3220,7 @@
    gnutls_certificate_set_x509_key_file(*credentials, ServerCertificate,
    ServerKey, GNUTLS_X509_FMT_PEM);

  • gnutls_init(&con->http.tls), GNUTLS_SERVER);

  • gnutls_init(&con->http.tls, GNUTLS_SERVER);
    gnutls_set_default_priority(con->http.tls);
    gnutls_credentials_set(con->http.tls, GNUTLS_CRD_CERTIFICATE, *credentials);
    gnutls_transport_set_ptr(con->http.tls, (gnutls_transport_ptr)HTTP(con));

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