Re: Problem compiling with libxml2 and Xcode 9
Mark Allan <[email protected]>
| Newsgroups | gmane.comp.security.virus.clamav.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Steve, Attached are the extracted lines from the config.log of the non-working version. The one which works just gives the following output: > configure:17809: checking for xmlTextReaderRead in -lxml2 > configure:17834: gcc -o conftest -O2 -g -D_FILE_OFFSET_BITS=64 -mmacosx-version-min=10.6 -arch x86_64 -w -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm conftest.c -lxml2 -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm >&5 > configure:17834: $? = 0 > configure:17843: result: yes From a quick glance, I suspect that means there's a problem with the 10.13 SDK and I'll need to get in touch with Apple. Can you confirm that I'm right? Thanks Mark > On 10 Oct 2017, at 4:46 pm, Steven Morgan <[email protected]> wrote: > > Mark, > > The file config.log should contain the details of the configure test > performed for -lxml2. > > Can you tell what are the relevant differences in those files? > > Thanks, > Steve > > On Tue, Oct 10, 2017 at 7:48 AM, Mark Allan <[email protected]> wrote: > >> Hi all, >> >> I just updated Xcode (Apple's developer tools for macOS) to version 9 and >> I'm no longer able to compile ClamAV 0.99.2 with libxml2 support. >> >> Here's the relevant output from the configure script: >> >>> ... >>> checking for libxml2 installation... /usr >>> checking xml2-config version... 2.9.4 >>> checking for xmlreader.h in /usr... found >>> checking for xmlTextReaderRead in -lxml2... no >>> configure: ****** libxml2 support unavailable >>> ... >>> configure: Summary of engine detection features >>> bzip2 : ok >>> zlib : /usr >>> unrar : yes >>> pcre : /usr/local/clamXav >>> libxml2 : no >>> yara : yes >> >> I'm aware that things tend to break when updating Xcode, so I did this >> test in a virtual machine, which means I can say with certainty that the >> devtools are the only things to have changed. If I revert to the snapshot >> with Xcode 8.3, the configure script finds everything it needs to within >> /usr: >> >>> ... >>> checking for libxml2 installation... /usr >>> checking xml2-config version... 2.9.4 >>> checking for xmlreader.h in /usr... found >>> checking for xmlTextReaderRead in -lxml2... yes >>> configure: Compiling and linking with libxml2 from /usr >>> ... >>> configure: Summary of engine detection features >>> bzip2 : ok >>> zlib : /usr >>> unrar : yes >>> pcre : /usr/local/clamXav >>> libxml2 : yes, from /usr >>> yara : yes >> >> If I update again (or go back to the snapshot with Xcode 9) it fails. >> >> I've compared the checksums of the libraries in /usr/lib/libxml2.* and >> they're identical before and after the upgrade. Similarly, diffing the >> contents of /usr/include/libxml2/libxml shows they're exactly the same too, >> so I'm not quite sure what's going on. >> >> Can anyone help shed some light on the matter please? >> >> Many thanks >> Mark >> >> _______________________________________________ >> http://lurker.clamav.net/list/clamav-devel.html >> Please submit your patches to our Bugzilla: http://bugs.clamav.net >> >> http://www.clamav.net/contact.html#ml >> > _______________________________________________ > http://lurker.clamav.net/list/clamav-devel.html > Please submit your patches to our Bugzilla: http://bugs.clamav.net > > http://www.clamav.net/contact.html#ml _______________________________________________ http://lurker.clamav.net/list/clamav-devel.html Please submit your patches to our Bugzilla: http://bugs.clamav.net http://www.clamav.net/contact.html#ml
config.log
(application/octet-stream, 4.4 KB)
configure:17735: checking for libxml2 installation
configure:17762: result: /usr
configure:17778: checking xml2-config version
configure:17782: result: 2.9.4
configure:17794: checking for xmlreader.h in /usr
configure:17801: result: found
configure:17809: checking for xmlTextReaderRead in -lxml2
configure:17834: gcc -o conftest -O2 -g -D_FILE_OFFSET_BITS=64 -mmacosx-version-min=10.6 -arch x86_64 -w -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2 -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm conftest.c -lxml2 -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm >&5
ld: file not found: /usr/lib/system/libsystem_darwin.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:17834: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "ClamAV"
| #define PACKAGE_TARNAME "clamav"
| #define PACKAGE_VERSION "0.99.2"
| #define PACKAGE_STRING "ClamAV 0.99.2"
| #define PACKAGE_BUGREPORT "http://bugs.clamav.net/"
| #define PACKAGE_URL "http://www.clamav.net/"
| #define PACKAGE PACKAGE_NAME
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define LIBCLAMAV_FULLVER "7.1.1"
| #define LIBCLAMAV_MAJORVER 7
| #define VERSION "0.99.2"
| #define VERSION_SUFFIX ""
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define LT_MODULE_EXT ".so"
| #define LT_SHARED_EXT ".dylib"
| #define LT_MODULE_PATH_VAR "DYLD_LIBRARY_PATH"
| #define LT_DLSEARCH_PATH "/usr/local/lib:/lib:/usr/lib"
| #define HAVE_LIBDL 1
| #define HAVE_DLERROR 1
| #define HAVE_LIBDLLOADER 1
| #define error_t int
| #define __error_t_defined 1
| #define HAVE_PRELOADED_SYMBOLS 1
| #define HAVE_UNISTD_H 1
| #define HAVE_MACH_O_DYLD_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_CLOSEDIR 1
| #define HAVE_OPENDIR 1
| #define HAVE_READDIR 1
| #define HAVE_STRLCAT 1
| #define HAVE_STRLCPY 1
| #define LT_LIBEXT "a"
| #define LT_LIBPREFIX "lib"
| #define YYTEXT_POINTER 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_SYS_TIMES_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_POLL_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_SYS_FILIO_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_STDBOOL_H 1
| #define HAVE_PWD_H 1
| #define HAVE_GRP_H 1
| #define HAVE_SYS_QUEUE_H 1
| #define HAVE_SYS_CDEFS_H 1
| #define USE_SYSLOG 1
| #define HAVE_PTHREAD_H 1
| #define SCANBUFF 131072
| #define FILEBUFF 8192
| #define restrict __restrict
| #define SIZEOF_SHORT 2
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 8
| #define SIZEOF_LONG_LONG 8
| #define SIZEOF_VOID_P 8
| #define HAVE_UNAME_SYSCALL 1
| #define HAVE_POLL 1
| #define HAVE_SETSID 1
| #define HAVE_MEMCPY 1
| #define HAVE_SNPRINTF 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_STRERROR_R 1
| #define HAVE_STRLCPY 1
| #define HAVE_STRLCAT 1
| #define HAVE_STRCASESTR 1
| #define HAVE_INET_NTOP 1
| #define HAVE_SETGROUPS 1
| #define HAVE_INITGROUPS 1
| #define HAVE_CTIME_R 1
| #define HAVE_MKSTEMP 1
| #define HAVE_MADVISE 1
| #define HAVE_GETNAMEINFO 1
| #define HAVE_FSEEKO 1
| #define HAVE_MMAP 1
| #define HAVE_SYSCONF_SC_PAGESIZE 1
| #define HAVE_GETPAGESIZE 1
| #define ANONYMOUS_MAP MAP_ANONYMOUS
| #define HAVE_TIMEGM 1
| #define HAVE_SYSCTLBYNAME 1
| #define USE_MPOOL 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char xmlTextReaderRead ();
| int
| main ()
| {
| return xmlTextReaderRead ();
| ;
| return 0;
| }
configure:17843: result: no
configure:17871: ****** libxml2 support unavailable