Re: [Clamav-devel] Problem compiling with libxml2 and Xcode 9
Quick followup on this one in case anyone else needs it. It turns out you need to use -isysroot if you want to specify an explicit SDK, and use -iwithsysroot to specify a header search path within the SDK. Easiest way to do that is add the following to your CFLAGS and CXXFLAGS prior to running the configure script. -isysroot $SDKRoot -iwithsysroot $SDKRoot where $SDKRoot can be determined with the following: xcrun --sdk macosx --show-sdk-path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk Mark > On 11 Oct 2017, at 11:11 am, Mark Allan wrote: > > Thanks. I've reported the issue and will see what comes of it... > > Mark > >> On 10 Oct 2017, at 6:05 pm, Steven Morgan wrote: >> >> Yes, I see it fail in the libxml2 test in looking for >> /usr/lib/system/libsystem_darwin.dylib for x64. >> >> Steve >> >> On Tue, Oct 10, 2017 at 12:02 PM, Mark Allan wrote: >> >>> 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 >>> >>> >> ___ >> 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
Re: [Clamav-devel] Problem compiling with libxml2 and Xcode 9
Thanks. I've reported the issue and will see what comes of it... Mark > On 10 Oct 2017, at 6:05 pm, Steven Morgan wrote: > > Yes, I see it fail in the libxml2 test in looking for > /usr/lib/system/libsystem_darwin.dylib for x64. > > Steve > > On Tue, Oct 10, 2017 at 12:02 PM, Mark Allan wrote: > >> 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 >> >> > ___ > 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
Re: [Clamav-devel] Problem compiling with libxml2 and Xcode 9
Yes, I see it fail in the libxml2 test in looking for /usr/lib/system/libsystem_darwin.dylib for x64. Steve On Tue, Oct 10, 2017 at 12:02 PM, Mark Allan wrote: > 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 > > ___ 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
Re: [Clamav-devel] Problem compiling with libxml2 and Xcode 9
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 config.log Description: Binary data > On 10 Oct 2017, at 4:46 pm, Steven Morgan 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 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
Re: [Clamav-devel] Problem compiling with libxml2 and Xcode 9
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 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
[Clamav-devel] Problem compiling with libxml2 and Xcode 9
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