That's a known issue, see: https://go.dev/issue/53813 https://go.dev/issue/54197
- sean On Wed, Aug 31, 2022, 21:35 Shane <skullrat...@gmail.com> wrote: > I was finally able to compile the bootstrap on Linux (I had to install the > missing libc). > > However, after copying the .tbz file onto my Solaris 11u4 AMD64 machine to > build the final Go tools, building fails: > > $ GOROOT_BOOTSTRAP=/tmp/bootstap-goroot CGO_ENABLED=1 ./all.bash > Building Go cmd/dist using /tmp/bootstap-goroot. (go1.19 solaris/amd64) > dist: Cannot find /lib64/ld-linux-x86-64.so.2 > > Why does the bootstrap go expect /lib64/ld-linux-x86-64.so.2? Shouldn't it > only be looking for Solaris libs? > On Saturday, August 27, 2022 at 3:18:42 PM UTC-4 Ian Lance Taylor wrote: > >> On Sat, Aug 27, 2022 at 12:15 PM Shane <skull...@gmail.com> wrote: >> > >> > My understanding then is that cmd/dist first builds for the host here >> (in my case, for Linux) and then builds for the target starting here. Since >> there is always a build for the host first, then since my host OS is Linux, >> the linux_syscall.c is always part of the compilation (since I do not >> disable cgo). If anything is incorrect with my understanding, please >> correct me. >> > >> > I believe then I need to have both Linux system headers and Solaris >> system headers available on my build machine for the cross-compile, if I >> want to build Go for Solaris with cgo support. >> > >> > Is it possible for there to be two header files with the same name but >> different OS have the same #include path in the cgo source code? If so, >> could the C compiler get the correct header for the target of the cgo? For >> example, how could the C compiler know to use the Linux unistd.h header for >> the Linux build, and later use the Solaris unistd.h header for the Solaris >> build? >> >> I'm not sure whether this answers your question, but normally a system >> will have a native compiler that will look for header files in >> /usr/include. It can also have a cross-compiler that looks for header >> files in some other location. A cross-compiler should never look in >> /usr/include, it should only look at the cross-compilation header >> files. >> >> Ian >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/6dd9a30f-d4be-45ff-a80c-499a71933259n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/6dd9a30f-d4be-45ff-a80c-499a71933259n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGabyPpx9AQ7Bsr56_zkt0pv3hsxJw9kqLe-4Pk_vSzj9kSCAQ%40mail.gmail.com.