[CMake] Finding libxml2 when building llvm/clang

Edward Diener eldlistmailingz at tropicsoft.com
Wed Jun 15 09:40:07 EDT 2016


On 6/15/2016 9:15 AM, Chuck Atkins wrote:
> You could try to force libxml to be ignored by CMake so it will think it
> wasn't found and use the fallback configuration:
>
> cmake ... -DLIBXML2_LIBRARIES=IGNORE ...

I will try that, thanks !

But shouldn't CMake be able to distinguish between a 32-bit and a 64-bit 
version of a library when 'find_package(some_library)' is specified ?

>
> - Chuck
>
> On Tue, Jun 14, 2016 at 8:28 PM, Edward Diener
> <eldlistmailingz at tropicsoft.com
> <mailto:eldlistmailingz at tropicsoft.com>> wrote:
>
>     Building llvm/clang from source involves using CMake. I am building
>     llvm/clang from source on Windows using CMake 3.5.2. I am not a
>     clang developer, just a clang user. Similarly I just use CMake
>     rather than understand or write CMakeLists.txt files.
>
>     I reported a problem to clang where building a 32-bit version of
>     clang succeeds but building a 64-bit version of clang fails with xml
>     link errors. I have A 32-bit libxml2 binary in my path from
>     gnuwin32, but not a 64-bit binary of libxml2 in my path.
>
>     I was told by clang developers that one of the tools which clang
>     builds uses xml and libxml2 if it is available, otherwise uses some
>     other technology for the tool. The suggestion was that the problem I
>     am encountering is that of CMake; that CMake does not recognize that
>     the libxml2 which I have is the 32-bit version and instead thinks
>     that it is the 64-bit version and therefore attempts erroneously to
>     use it in the 64-bit build of clang.
>
>     Does anybody know what might be happening here ? I do not create the
>     CMakeLists.txt files used by llvm/clang so I do not know how the use
>     of libxml2 can be optionally specified in them.




More information about the CMake mailing list