<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
The problem with cross compiling is not just getting it to look in the<br>
right place(s) but not to look in the WRONG places. If it leaks host<br>
headers or libraries into the target build, it can subtly break stuff.<br>
Getting gcc to _not_ hallucinate new paths to check is a serious<br>
challenge. (These days there's sysroot, which does a strncmp() on the<br>
start of the hardwired paths backed into the thing at build time and<br>
replaces the ones that match with what you fed to it in the --sysroot<br>
command line argument. No really, that's how they implemented it.)<br></blockquote><div><br></div><div>Tell me about it! I have been writing down notes and on the first page in big bold letters DO NOT USE SYSROOT!</div><div>I found shortly after getting GCC to mostly work that Sysroot did as you say and hardcoded links to the full path! I had to recreate the path/to/build/dir and link it to / as a temp fix. similiarly how i have done my current system to account for the "missing" headers. That however should be a easy fix i just need to check the documentation and find the libdir= and includedir= etc to properly place the directories/files when running ./configure.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br></span><span class=""><br>
> I am trying to dynamic link, i also have binutils 2.24 and i couldn't<br>
> find any other data on musl patching the headers which doesn't make sense<br>
> to me. why would linux headers version 3.16 need to be musl patched?<br>
> headers don't even deal with the libc do they?<br>
<br>
</span>Headers (/usr/include/*.h files) are compile time, libraries<br>
(/lib/blah.so and /usr/lib/blah.*.a and so on) are link time, and in<br>
some cases runtime. They're separate things.<br>
<br>
Musl produces its own headers. You can add kernel headers to the ones it<br>
provides (locally I use the attached script to build new versions for<br>
local testing with their supplied wrapper).<br></blockquote><div><br></div><div>I install the linux headers first and musl headers over (if any get replaced) the kernel headers. this wont be an issue for a all musl environment do you think?  The more i learn about linux the more i realize how little i know. This is a very good breakdown of the pages i was reading on the topic several days ago, thanks for helping establish a clear picture of how that works! </div><div> </div><div><span style="font-family:arial,sans-serif;font-size:13px">>I have a musl patch for the grep -e thing.</span><br style="font-family:arial,sans-serif;font-size:13px">><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">>The "rm -r dir" failure is currently being discussed on the toybox list.</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">>(Dalias insisted it's not a musl bug, and that the Linux man page is</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">>wrong. I told him to pull the other one, it's got bells on. That was on</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">>irc, discussion has now gone to the list...)</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">I'm on the toybox and musl lists as well. I've been seeing a bit of discussion about that. I'm not familiar with posix standards yet but do they have anything to say about the behavior of applications?</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Since you bring it up, I ran into this issue just yesterday with the rm -r dir bug. I'm using the static linked busybox and toybox binaries (toybox as the primary, busybox for everything else) in a chroot environment with musl libs and standard 3.16 kernel headers (with musl headers) if that helps you with the issue at all.  if there is anything i can do to narrow it down let me know.</span></div><div><br></div><div>Is the regex file the patch for grep -e? </div></div></div></div>