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

Cannot build current Git source on OSX 10.10.5 #4695

Closed
michaelrsweet opened this issue Aug 25, 2015 · 2 comments
Closed

Cannot build current Git source on OSX 10.10.5 #4695

michaelrsweet opened this issue Aug 25, 2015 · 2 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 2.1rc1
CUPS.org User: pipitas

This is an OSX Yosemite 10.10.5 system. I used this configure command lines:

autoconf
./configure --with-ipp-port=8631 --with-log-level=info --prefix=/usr/local2 \
            --enable-webif --with-archflags="-arch i386 -arch x86_64"

When running "make", I get these errors:

Using ARCHFLAGS=-arch i386 -arch x86_64
Using ALL_CFLAGS=-I.. -D_CUPS_SOURCE -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include  -DDBUS_API_SUBJECT_TO_CHANGE -D_FORTIFY_SOURCE=2 -D_REENTRANT -I/opt/local/include   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT  
Using ALL_CXXFLAGS=-I.. -D_CUPS_SOURCE   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT  
Using CC=clang
Using CXX=clang
Using DSOFLAGS=-L../cups  -dynamiclib -single_module -lc
Using LDFLAGS=-L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler -arch i386 -arch x86_64 -fPIE -Wl,-pie -Wall -Wno-format-y2k -Wunused -fPIC -Os -g -fstack-protector -Wno-unused-result -Wsign-conversion -Wno-tautological-compare
Using LIBS=-lcups -weak_framework Kerberos -weak_framework GSS -L/opt/local/lib -lavahi-common -lavahi-client  -lz -lpthread -lresolv -framework SystemConfiguration -framework CoreFoundation -framework Security  -liconv  -lz
[....]
a - usersys.o
a - util.o
ranlib: for architecture: i386 file: libcups.a(getifaddrs.o) has no symbols
ranlib: for architecture: i386 file: libcups.a(snprintf.o) has no symbols
ranlib: for architecture: x86_64 file: libcups.a(getifaddrs.o) has no symbols
ranlib: for architecture: x86_64 file: libcups.a(snprintf.o) has no symbols
Creating export list for libcups.2.dylib...
Linking libcups.2.dylib...
ld: warning: ignoring file /opt/local/lib/libavahi-common.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libavahi-common.dylib
ld: warning: ignoring file /opt/local/lib/libavahi-client.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libavahi-client.dylib
ld: warning: ignoring file /opt/local/lib/libiconv.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libiconv.dylib
Undefined symbols for architecture i386:
  "_avahi_client_free", referenced from:
      _cupsEnumDests in dest.o
      __httpResolveURI in http-support.o
  "_avahi_client_new", referenced from:
      _cupsEnumDests in dest.o
      __httpResolveURI in http-support.o
  "_avahi_record_browser_free", referenced from:
      _cups_dnssd_free_device in dest.o
      _cups_dnssd_browse_cb in dest.o
  "_avahi_record_browser_new", referenced from:
      _cupsEnumDests in dest.o
  "_avahi_service_browser_free", referenced from:
      _cupsEnumDests in dest.o
  "_avahi_service_browser_new", referenced from:
      _cupsEnumDests in dest.o
  "_avahi_service_name_join", referenced from:
      _cups_dnssd_browse_cb in dest.o
  "_avahi_service_resolver_free", referenced from:
      _http_resolve_cb in http-support.o
  "_avahi_service_resolver_new", referenced from:
      __httpResolveURI in http-support.o
  "_avahi_simple_poll_free", referenced from:
      _cupsEnumDests in dest.o
      __httpResolveURI in http-support.o
  "_avahi_simple_poll_get", referenced from:
      _cupsEnumDests in dest.o
      __httpResolveURI in http-support.o
  "_avahi_simple_poll_iterate", referenced from:
      _cupsEnumDests in dest.o
      __httpResolveURI in http-support.o
  "_avahi_simple_poll_new", referenced from:
      _cupsEnumDests in dest.o
      __httpResolveURI in http-support.o
  "_avahi_simple_poll_quit", referenced from:
      _cups_dnssd_client_cb in dest.o
      _cups_dnssd_browse_cb in dest.o
      _http_client_cb in http-support.o
      _http_resolve_cb in http-support.o
  "_avahi_simple_poll_set_func", referenced from:
      _cupsEnumDests in dest.o
      __httpResolveURI in http-support.o
  "_avahi_string_list_find", referenced from:
      _http_resolve_cb in http-support.o
  "_avahi_string_list_get_pair", referenced from:
      _http_resolve_cb in http-support.o
  "_libiconv", referenced from:
      _cupsCharsetToUTF8 in transcode.o
      _cupsUTF8ToCharset in transcode.o
  "_libiconv_close", referenced from:
      __cupsCharmapFlush in transcode.o
  "_libiconv_open", referenced from:
      _cupsCharsetToUTF8 in transcode.o
      _cupsUTF8ToCharset in transcode.o
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libcups.2.dylib] Error 1
make: *** [all] Error 1

If I skip the --with-archflags from the command line, the build process gets further along:

Using ARCHFLAGS=
Using ALL_CFLAGS=-I.. -D_CUPS_SOURCE -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include  -DDBUS_API_SUBJECT_TO_CHANGE -D_FORTIFY_SOURCE=2 -D_REENTRANT -I/opt/local/include   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT  
Using ALL_CXXFLAGS=-I.. -D_CUPS_SOURCE   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT  
Using CC=clang
Using CXX=clang
Using DSOFLAGS=-L../cups  -dynamiclib -single_module -lc
Using LDFLAGS=-L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler -fPIE -Wl,-pie -Wall -Wno-format-y2k -Wunused -fPIC -Os -g -fstack-protector -Wno-unused-result -Wsign-conversion -Wno-tautological-compare
Using LIBS=-lcups -weak_framework Kerberos -weak_framework GSS -L/opt/local/lib -lavahi-common -lavahi-client  -lz -lpthread -lresolv -framework SystemConfiguration -framework CoreFoundation -framework Security  -liconv  -lz
[....]
Compiling colorman.c...
Compiling conf.c...
Compiling dirsvc.c...
dirsvc.c:1353:3: error: use of undeclared identifier 'SCDynamicStoreRef'
  SCDynamicStoreRef sc;                 /* Context for dynamic store */
  ^
dirsvc.c:1395:3: error: use of undeclared identifier 'sc'
  sc = SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("cupsd"), NULL, NULL);
  ^
dirsvc.c:1395:8: warning: implicit declaration of function 'SCDynamicStoreCreate' is invalid in C99 [-Wimplicit-function-declaration]
  sc = SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("cupsd"), NULL, NULL);
       ^
dirsvc.c:1397:7: error: use of undeclared identifier 'sc'
  if (sc)
      ^
dirsvc.c:1405:20: warning: implicit declaration of function 'SCDynamicStoreCopyComputerName' is invalid in C99 [-Wimplicit-function-declaration]
    if ((nameRef = SCDynamicStoreCopyComputerName(sc, &nameEncoding)) != NULL)
                   ^
dirsvc.c:1405:51: error: use of undeclared identifier 'sc'
    if ((nameRef = SCDynamicStoreCopyComputerName(sc, &nameEncoding)) != NULL)
                                                  ^
dirsvc.c:1435:20: warning: implicit declaration of function 'SCDynamicStoreCopyLocalHostName' is invalid in C99 [-Wimplicit-function-declaration]
    if ((nameRef = SCDynamicStoreCopyLocalHostName(sc)) != NULL)
                   ^
dirsvc.c:1435:52: error: use of undeclared identifier 'sc'
    if ((nameRef = SCDynamicStoreCopyLocalHostName(sc)) != NULL)
                                                   ^
dirsvc.c:1466:12: warning: implicit declaration of function 'SCDynamicStoreCopyValue' is invalid in C99 [-Wimplicit-function-declaration]
    btmm = SCDynamicStoreCopyValue(sc, CFSTR("Setup:/Network/BackToMyMac"));
           ^
dirsvc.c:1466:36: error: use of undeclared identifier 'sc'
    btmm = SCDynamicStoreCopyValue(sc, CFSTR("Setup:/Network/BackToMyMac"));
                                   ^
dirsvc.c:1482:15: error: use of undeclared identifier 'sc'
    CFRelease(sc);
              ^
4 warnings and 7 errors generated.
make[1]: *** [dirsvc.o] Error 1
make: *** [all] Error 1

My compiler info is this:

clang --version
   Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
   Target: x86_64-apple-darwin14.5.0
   Thread model: posix
@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

You can't build on OS X with Avahi...

I've added a check in the configure script to not use Avahi; in the meantime use "--disable-avahi"...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: pipitas

Oh... I had assumed this would have been taken care of by the configure step which would discover that it runs on OS X.

When I saw avahi being used I then thought that's how it ought to be. Stupid /me.

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016
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