programmerjake[m | lxo: my build method: apt install g++-8-powerpc64le-linux-gnu; git clone .../gcc.git; mkdir build; cd build; ../configure --host=x86_64-linux-gnu --target=powerpc64le-linux-gnu; make -j24 | 01:27 |
---|---|---|
programmerjake[m | fails on `#include <pthread.h>` no such file or directory | 01:28 |
programmerjake[m | on Ubuntu 18.04 | 01:28 |
lxo | oh, that's in libgcc | 01:28 |
lxo | you need a sysroot with glibc headers and libs to build the target libs | 01:29 |
lxo | you might be able to build libgcc disabling pthreads or somesuch. I haven't done such cross builds targeting GNU/Linux for quite a while | 01:29 |
programmerjake[m | hmm, I thought installing the gcc 8 cross compiler would install the sysroot | 01:30 |
lxo | it's possible to build it all from scratch, but it's somewhat arcane. you have to first build a C only cross compiler, disabling threads and whatnot, to build libgcc | 01:30 |
lxo | then use that to build glibc | 01:30 |
programmerjake[m | you know of any easy ways to get a sysroot? | 01:31 |
lxo | then install glibc in a sys-root, that you can then use to build the compiler proper | 01:31 |
lxo | i.e., including other languages and target libs | 01:32 |
lxo | download the target .debs and install them in the sysroot, I suppose | 01:32 |
lxo | I've done that with rpms in another life ;-) | 01:33 |
programmerjake[m | debootstrap to the rescue, then? | 01:33 |
programmerjake[m | thx | 01:39 |
lxo | well... you just need libc-dev and kernel headers in the sysroot, but I suppose having more than that will just be ignored | 01:40 |
lxo | then you'll want to configure --with-sysroot, pointing to the dir in which you installed it | 01:40 |
programmerjake[m | ok, sounds good! | 01:40 |
programmerjake[m | debootstrap could use some parallelism... | 01:41 |
lxo | there's a free software community that maintains a script named crossgcc or crosscompiler or somesuch that goes through the bootstrapping of a cross GNU/Linux toolchain IIRC | 01:41 |
programmerjake[m | is irclog working? | 03:35 |
programmerjake[m | hmm, well apparently matrix's irc bridge or irclog or something broke... | 03:36 |
programmerjake[m | resending...hopefully it'll work this time. | 03:38 |
* programmerjake[m sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/ZDTtBilRJlZymWRmqmHoqlYp/message.txt > | 03:39 | |
programmerjake[m | lxo: resent message | 03:40 |
lxo | looking | 03:59 |
lxo | (the matrix->irc bridge turns long messages into a long-message link) | 04:00 |
lxo | how can it be? I don't see any configure option referencing the sysroot | 04:03 |
lxo | I suppose it may be relying on some default that's not ready for this layout, and looks for headers in sysroot/usr/include/<target> rather than sysroot/usr/include | 04:05 |
lxo | oh, and that configure command is for a native compiler, not a cross | 04:06 |
lxo | ^ programmerjake[m | 04:06 |
programmerjake[m | The configure command above is the one used by the debian gcc-8, I posted it since I thought it might be a useful reference. The one I used is: | 05:23 |
programmerjake[m | ../configure --host=x86_64-linux-gnu --target=powerpc64le-linux-gnu --with-sysroot=/opt/powerpc64le-sysroot | 05:24 |
programmerjake[m | ^ lxo | 05:24 |
lxo | programmerjake[m, I see | 05:57 |
lxo | I don't get it, though | 05:58 |
programmerjake[m | neither do I... | 05:58 |
lxo | what do you get with ...-gcc -print-sysroot-headers-suffix ? | 06:03 |
lxo | also, -print-multi-lib. I wonder if --disable-multilib might help avoid that. meanwhile, maybe symlink /opt/powerpc64le-sysroot/usr/include/powerpc64le-unknown-linux-gnu to . | 06:26 |
lxo | err s/-unknown/, it's not canonicalized | 06:26 |
programmerjake[m | (ppc64el)jacob@jacob-desktop:/$ gcc-8 -print-sysroot-headers-suffix | 06:27 |
programmerjake[m | gcc-8: fatal error: not configured with sysroot headers suffix | 06:27 |
programmerjake[m | compilation terminated. | 06:27 |
programmerjake[m | (ppc64el)jacob@jacob-desktop:/$ gcc-8 -print-multi-lib | 06:28 |
programmerjake[m | .; | 06:28 |
programmerjake[m | lxo ^ | 06:29 |
lxo | my suspicions are lost again | 06:44 |
lxo | err they are not confirmed, I'm lost again | 06:44 |
lxo | I guess the symlink will have to do for now | 06:44 |
programmerjake[m | k, but debian somehow got it to work w/o a symlink... | 06:46 |
lxo | maybe something else to try would be --with-sysroot without an argument, and let it pick up the default for when sysroot is enabled. then symlink this default to the chosen location. or use --with-build-sysroot | 06:46 |
lxo | to specify where it is during the build | 06:47 |
lxo | very different gcc version | 06:47 |
programmerjake[m | maybe it's something to do with multiarch? | 06:48 |
lxo | and if you mean the configure command you posted before, that was for a native. no sysroot configuration to be seen. that makes a lot of difference | 06:48 |
lxo | yeah, I was thinking something along these lines, but I couldn't find out | 06:48 |
programmerjake[m | idk, I may try again on friday, but I have other things I'm busy with, so may have to wait till after saturday | 06:53 |
programmerjake[m | lxo thx for trying to help me | 06:54 |
lxo | sure | 06:55 |
lxo | you're welcome | 06:55 |
lkcl | sigh the reboot that mythic-beasts did on monday stopped ibot. i only noticed 2 days later. | 13:37 |
lkcl | segher: thx | 13:38 |
lkcl | lxo: wow, just wow. that person you put me in touch with is *seriously* judgemental. | 23:43 |
lkcl | i can understand very well how you also ran into difficulties with him | 23:44 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!