From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/6] package/llvm: install target binary/debug tools
Date: Wed, 21 Nov 2018 22:18:56 +0100 [thread overview]
Message-ID: <ae5caeb6-f258-4d00-bbb4-12726fa5d4f3@gmail.com> (raw)
In-Reply-To: <CANQCQpbmLGK955=w74NOM5A67k_rJtUF3domF_+==zpTaHVOvw@mail.gmail.com>
Hi Matt,
Le 21/11/2018 ? 04:12, Matthew Weber a ?crit?:
> On Tue, Nov 20, 2018 at 4:37 PM Romain Naour <romain.naour@gmail.com> wrote:
>>
>> Hi Matt,
>>
>> Le 19/11/2018 ? 14:04, Matthew Weber a ?crit :
>>> Romain,
>>>
>>> On Mon, Nov 19, 2018 at 2:10 AM Romain Naour <romain.naour@gmail.com> wrote:
>>>>
>>>> Hi Matt,
>>>>
>>>> Le lun. 19 nov. 2018 ? 02:48, Matthew Weber <matthew.weber@rockwellcollins.com> a ?crit :
>>>>>
>>>>> Romain,
>>>>>
>>>>> On Sun, Nov 18, 2018 at 1:14 PM Romain Naour <romain.naour@smile.fr> wrote:
>>>>>>
>>>>>> Hi Matt,
>>>>>>
>>>>>> Le 17/11/2018 ? 04:56, Matt Weber a ?crit :
>>>>>>> The compiler-rt fuzzer and address sanitizer tools require additional
>>>>>>> LLVM binary tools installed to allow stack trace decoding actively during
>>>>>>> executable analysis.
>>>>>>>
>>>>>>> https://github.com/google/sanitizers/wiki/AddressSanitizerCallStack
>>>>>>>
>>>>>>> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
>>>>>>> Reviewed-by: Romain Naour <romain.naour@smile.fr>
>>>>>>
>>>>>> For some reason I get an error while building llvm package tools.
>>>>>>
>>>>>> x86_64-linux-g++: WARNING: unsafe header/library path used in cross-compilation:
>>>>>> '-I/usr/include/libxml2'
>>>>>>
>>>>>> Can you have a look?
>>>>>
>>>>> I went back and checked my logs on the clang compiler-rt run-test
>>>>> build for that warning and didn't find it. I then checked and my
>>>>> config and it has the unsafe header/library as error. Was your build
>>>>> test just applying my patches and doing an explicit 'make llvm'?
>>>>
>>>>
>>>> Indeed,
>>>> Some tools use libxml2, so you have to add target libxml2 package as build dependency.
>>>>
>>>
>>> Would you mind sharing your verbose output and equivalent of cmake
>>> config guess/status?
>>>
>>
>> I need to rebuild from scratch since I've fixed the build locally.
>> I'll restart a new one next week-end.
>>
>
> Something like the following added to package/llvm/llvm.mk? (Still
> haven't see this on my end. I messed with my host system a bit to get
> libxml2 support and headers in place, no luck.)
>
> # LLVM requires libxml2
> HOST_LLVM_CONF_OPTS += \
> -DLIBXML2_LIBRARIES=$(HOST_DIR)/lib \
> -DLIBXML2_INCLUDE_DIR=$(HOST_DIR)/include/libxml2
> HOST_LLVM_DEPENDENCIES += host-libxml2
> LLVM_CONF_OPTS += \
> -DLIBXML2_LIBRARIES=$(STAGING_DIR)/usr/lib \
> -DLIBXML2_INCLUDE_DIR=$(STAGING_DIR)/usr/include/libxml2
> LLVM_DEPENDENCIES += libxml2
I reproduced the issue: https://pastebin.com/s8PZvuGt
The CMakeCache.txt content seems interesting:
//Path to a file.
LIBXML2_INCLUDE_DIR:PATH=LIBXML2_INCLUDE_DIR-NOTFOUND
//Path to a library.
LIBXML2_LIBRARY:FILEPATH=LIBXML2_LIBRARY-NOTFOUND
//Path to a program.
LIBXML2_XMLLINT_EXECUTABLE:FILEPATH=/usr/bin/xmllint
//Use libxml2 if available. Can be ON, OFF, or FORCE_ON
LLVM_ENABLE_LIBXML2:STRING=ON
LLVM_ENABLE_LIBXML2 allow to define LLVM_LIBXML2_ENABLED
$ grep -r LLVM_LIBXML2_ENABLED in the build directory:
cmake/modules/CMakeFiles/LLVMConfig.cmake:set(LLVM_LIBXML2_ENABLED 0)
NATIVE/cmake/modules/CMakeFiles/LLVMConfig.cmake:set(LLVM_LIBXML2_ENABLED 1)
NATIVE/lib/cmake/llvm/LLVMConfig.cmake:set(LLVM_LIBXML2_ENABLED 1)
NATIVE/include/llvm/Config/config.h:#define LLVM_LIBXML2_ENABLED 1
lib/cmake/llvm/LLVMConfig.cmake:set(LLVM_LIBXML2_ENABLED 0)
include/llvm/Config/config.h:/* #undef LLVM_LIBXML2_ENABLED */
It seems that llvm try to build something for the host (NATIVE) while building
target llvm package. Sadly it use the cross-compiler to build them and that is
why we hit the paranoid wrapper.
>
> The interesting thing is that it looks like just a windows manifest
> manager source file uses the libxml2. Unsure of it's role....
Then we can just add -DLLVM_ENABLE_LIBXML2=OFF for host-llvm and llvm.
Best regards,
Romain
>
>
> Matt
>
next prev parent reply other threads:[~2018-11-21 21:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-17 3:56 [Buildroot] [PATCH v2 1/6] package/compiler-rt: new package Matt Weber
2018-11-17 3:56 ` [Buildroot] [PATCH v2 2/6] package/llvm: install target binary/debug tools Matt Weber
2018-11-18 19:14 ` Romain Naour
2018-11-19 1:48 ` Matthew Weber
2018-11-19 8:09 ` Romain Naour
2018-11-19 13:04 ` Matthew Weber
2018-11-20 22:36 ` Romain Naour
2018-11-20 22:44 ` Matthew Weber
2018-11-21 3:12 ` Matthew Weber
2018-11-21 21:18 ` Romain Naour [this message]
2018-11-22 3:14 ` Matthew Weber
2018-11-22 4:05 ` Matthew Weber
2018-11-17 3:56 ` [Buildroot] [PATCH v2 3/6] testing/infra/builder: build with target and environment Matt Weber
2018-11-18 21:35 ` Ricardo Martincoski
2018-11-17 3:56 ` [Buildroot] [PATCH v2 4/6] testing/infra/basetest: support br2-external Matt Weber
2018-11-18 21:41 ` Ricardo Martincoski
2018-11-17 3:56 ` [Buildroot] [PATCH v2 5/6] testing/tests: CLANG compiler-rt runtime test Matt Weber
2018-11-18 21:50 ` Ricardo Martincoski
2018-11-17 3:56 ` [Buildroot] [PATCH v2 6/6] llvm/clang: add note about version bumping together Matt Weber
2018-11-18 21:53 ` Ricardo Martincoski
2018-11-18 21:32 ` [Buildroot] [PATCH v2 1/6] package/compiler-rt: new package Ricardo Martincoski
2018-11-18 22:28 ` Romain Naour
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae5caeb6-f258-4d00-bbb4-12726fa5d4f3@gmail.com \
--to=romain.naour@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox