Friday, 2021-03-05

programmerjake[mlxo: 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 -j2401:27
programmerjake[mfails on `#include <pthread.h>` no such file or directory01:28
programmerjake[mon Ubuntu 18.0401:28
lxooh, that's in libgcc01:28
lxoyou need a sysroot with glibc headers and libs to build the target libs01:29
lxoyou might be able to build libgcc disabling pthreads or somesuch.  I haven't done such cross builds targeting GNU/Linux for quite a while01:29
programmerjake[mhmm, I thought installing the gcc 8 cross compiler would install the sysroot01:30
lxoit'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 libgcc01:30
lxothen use that to build glibc01:30
programmerjake[myou know of any easy ways to get a sysroot?01:31
lxothen install glibc in a sys-root, that you can then use to build the compiler proper01:31
lxoi.e., including other languages and target libs01:32
lxodownload the target .debs and install them in the sysroot, I suppose01:32
lxoI've done that with rpms in another life ;-)01:33
programmerjake[mdebootstrap to the rescue, then?01:33
programmerjake[mthx01:39
lxowell...  you just need libc-dev and kernel headers in the sysroot, but I suppose having more than that will just be ignored01:40
lxothen you'll want to configure --with-sysroot, pointing to the dir in which you installed it01:40
programmerjake[mok, sounds good!01:40
programmerjake[mdebootstrap could use some parallelism...01:41
lxothere'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 IIRC01:41
programmerjake[mis irclog working?03:35
programmerjake[mhmm, well apparently matrix's irc bridge or irclog or something broke...03:36
programmerjake[mresending...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[mlxo: resent message03:40
lxolooking03:59
lxo(the matrix->irc bridge turns long messages into a long-message link)04:00
lxohow can it be?  I don't see any configure option referencing the sysroot04:03
lxoI 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/include04:05
lxooh, and that configure command is for a native compiler, not a cross04:06
lxo^ programmerjake[m04:06
programmerjake[mThe 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-sysroot05:24
programmerjake[m^ lxo05:24
lxoprogrammerjake[m, I see05:57
lxoI don't get it, though05:58
programmerjake[mneither do I...05:58
lxowhat do you get with ...-gcc -print-sysroot-headers-suffix ?06:03
lxoalso, -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
lxoerr s/-unknown/, it's not canonicalized06:26
programmerjake[m(ppc64el)jacob@jacob-desktop:/$ gcc-8 -print-sysroot-headers-suffix06:27
programmerjake[mgcc-8: fatal error: not configured with sysroot headers suffix06:27
programmerjake[mcompilation terminated.06:27
programmerjake[m(ppc64el)jacob@jacob-desktop:/$ gcc-8 -print-multi-lib06:28
programmerjake[m.;06:28
programmerjake[mlxo ^06:29
lxomy suspicions are lost again06:44
lxoerr they are not confirmed, I'm lost again06:44
lxoI guess the symlink will have to do for now06:44
programmerjake[mk, but debian somehow got it to work w/o a symlink...06:46
lxomaybe 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-sysroot06:46
lxoto specify where it is during the build06:47
lxovery different gcc version06:47
programmerjake[mmaybe it's something to do with multiarch?06:48
lxoand 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 difference06:48
lxoyeah, I was thinking something along these lines, but I couldn't find out06:48
programmerjake[midk, I may try again on friday, but I have other things I'm busy with, so may have to wait till after saturday06:53
programmerjake[mlxo thx for trying to help me06:54
lxosure06:55
lxoyou're welcome06:55
lkclsigh the reboot that mythic-beasts did on monday stopped ibot.  i only noticed 2 days later.13:37
lkclsegher: thx13:38
lkcllxo: wow, just wow.  that person you put me in touch with is *seriously* judgemental.23:43
lkcli can understand very well how you also ran into difficulties with him23:44

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!