[Buildroot] CMAKE_SYSROOT issue [was: Re: [PATCH] toolchain-external: fix potential entire root filesystem removal]

Yann E. MORIN yann.morin.1998 at free.fr
Wed Sep 21 19:26:59 UTC 2016


Peter, All,

On 2016-09-16 10:52 +0200, Peter Korsgaard spake thusly:
> >>>>> "Arnout" == Arnout Vandecappelle <arnout at mind.be> writes:
> 
>  > On 15-09-16 23:21, Peter Korsgaard wrote:
>  >>>>>>> "Arnout" == Arnout Vandecappelle <arnout at mind.be> writes:
>  >> >> >  But nothing is really screaming that it should be included.
>  >> >> 
>  >> >> Ok. We should probably figure out if we need to revert the CMAKE_SYSROOT
>  >> >> addition (e8c3755676) and include that if needed.
>  >> 
>  >> >  Er, why would we need to revert it? Did I miss something?
>  >> 
>  >> I thought it had been discussed on the list, but apparently not. We got
>  >> a report on IRC (I unfortunately don't have logs) that builds of custom
>  >> packages using cmake were failing with 2016.08. It is apparently caused
>  >> by CMAKE_SYSROOT transforming -I$STAGING_DIR/usr/include into --sysroot
>  >> $STAGING_DIR -I /usr/include. In 2016.08 we now default
>  >> BR2_COMPILER_PARANOID_UNSAFE_PATH to y, so it complains about it.
> 
>  >  OK, I found it in my logs:
> 
> Thanks!
> 
>  >> [02/09 11:17:31] <smartin> cmake seems to split it like this:
>  >> '--sysroot <STAGING_DIR> -I/urs/include' , i guess cmake does it
>  >> because of/based on the CMAKE_SYSROOT.
>  >> [02/09 11:17:57] <smartin> ^^^ is to be confirm with cmake developers
>  >> [02/09 11:18:45] <smartin> but i wonder why it keep '-I/usr/include'
>  >> since it is a standard location that gcc will check anyway
>  >> [02/09 11:19:02] <smartin> ^^^ also, to be figured out with cmake developers
> 
> Samuel, did you hear back from the cmake devs?

>From what I recal, there was no issue with our cmake infra as it is now.

The problem lies in websocketpp's CMakeList.txt which is incorrect and
forcefully adds /usr/include.

I even sent a PR upstream to fix the issue:

    https://github.com/zaphoyd/websocketpp/pull/578

Unfortunately, it seems the websocketpp hasn't had any activity since
last February: no commit, no PR review, no comment on issues...

But there is now a patch that Pieter can use when he submits
websocketpp.

So, after discussing the issue on IRC with Samuel, I believe this is a
non-issue in our infra.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list