-
Notifications
You must be signed in to change notification settings - Fork 453
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
cups 1.7.2: build error on system without dnssd/avahi #4402
Comments
CUPS.org User: mike Investigating... |
CUPS.org User: appzer0 I can confirm this bug, even with --disable-dnssd --disable-avahi (avahi is intalled but I must disable it for 32-bit building on 64-bit system, just as Archlinux does), it tries to link to dnssd stuff:
|
CUPS.org User: fselles I too can confirm this bug, when trying to compile with --disable-dnssd --disable-avahi I think I can track this bug to Commit: ebd5991 [ebd5991] - (Subversion Revision: 11687), it defines at least 2 new functions: dnssdDeregisterAllPrinters() inside a #if block: #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) but are called on lines 262 and 244 from outside any #if block: I've attached a patch that should solve this problem by moving the functions outside the #if block, renaming them to deregister_all_printers() and surrounding code related to DNSSD and AVAHI inside #if blocks. |
CUPS.org User: mike Fixed in Subversion repository. |
"cups-str4402.patch": --- scheduler/dirsvc.c.str4402 2014-04-24 16:45:32.000000000 +0200 +static void deregister_all_printers(int from_callback); #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ifdef APPLE@@ -60,12 +63,10 @@ static cupsd_txt_t dnssdBuildTxtRecord(c ifdef HAVE_AVAHIstatic void dnssdClientCallback(AvahiClient _c, AvahiClientState state, void *userdata); endif /_ HAVE_AVAHI */-static void dnssdDeregisterAllPrinters(int from_callback); ifdef HAVE_DNSSDstatic void dnssdRegisterCallback(DNSServiceRef sdRef,
@@ -259,7 +260,7 @@ cupsdStopBrowsing(void)
/*
case AVAHI_CLIENT_FAILURE:
- */-static void
- cupsd_printer_t p; / Current printer */
- return;
@@ -819,27 +798,6 @@ dnssdFreeTxtRecord(cupsd_txt_t txt) / /*
- */-static void - cupsd_printer_t p; / Current printer */
- return;
@@ -1775,5 +1733,60 @@ update_smb(int onoff) /* I - 1 = turn /*
+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
CUPS.org User: dilfridge Care to update the git export, please? It would be great if we could backport the official fix. |
CUPS.org User: jue run into the exact same error with new cups 1.7.3 ... |
CUPS.org User: mike Please file a new bug and provide the new output from configure & make... |
CUPS.org User: jue Looks like you forgot to merge the commit |
Version: 1.7-current
CUPS.org User: jue
Got the following link error with 1.7.2 on a Linux system without dnssd or avahi installed, same configure works for me with 1.7.1:
...
Linking cupsd...
dirsvc.o: In function
cupsdStopBrowsing': dirsvc.c:(.text+0x595): undefined reference to
dnssdDeregisterAllPrinters'dirsvc.o: In function
cupsdStartBrowsing': dirsvc.c:(.text+0x539): undefined reference to
dnssdRegisterAllPrinters'dirsvc.c:(.text+0x568): undefined reference to `dnssdRegisterAllPrinters'
collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered: