# 02:04:06 |
Trel |
quits : Ping timeout: 245 seconds |
# 02:04:33 |
Trel |
joins #crosstool-ng |
# 20:03:58 |
milkylainen |
Trel: What are you doing that warrants the need for poking configure directly in crosstool-ng related packages? All the configuration abstraction is there to take care of that. |
# 20:06:30 |
milkylainen |
But to answer the question, the tuples are a very old style of descriptions of systems. Usually there is no need to poke that directly. |
# 20:07:13 |
Trel |
Then how exactly do you use crosstools? |
# 20:07:24 |
Trel |
That's what it say to do in the manual |
# 20:07:46 |
Trel |
https://crosstool-ng.github.io/docs/toolchain-usage/ |
# 20:08:01 |
Trel |
But I have no idea what those values should actually be |
# 20:08:34 |
milkylainen |
Trel: What build system are you using? |
# 20:08:40 |
Trel |
make |
# 20:08:45 |
Trel |
and configure |
# 20:09:05 |
milkylainen |
:) Sorry for the confusion. What "distribution" are you using? Assuming some Linux one here. |
# 20:09:14 |
Trel |
Arch Linux. |
# 20:09:30 |
milkylainen |
I think that documentation could use some work. |
# 20:09:38 |
Trel |
And when I just do the path thing and call the compiler it claims to be unable to find libraries. |
# 20:09:43 |
milkylainen |
You should be fine with just ./configure and nothing more. |
# 20:09:48 |
Trel |
nope |
# 20:09:53 |
Trel |
Library issue |
# 20:10:13 |
milkylainen |
Probably because you're missing something. |
# 20:10:29 |
Trel |
It's there if I use the toolchain outside crosstools |
# 20:10:31 |
zagura |
Are you building non-native architectrure? |
# 20:10:36 |
milkylainen |
crosstool-ng configure will try to detect all needed dependencies. |
# 20:10:38 |
Trel |
nope, native |
# 20:11:02 |
Trel |
I was trying to use it for an older glibc |
# 20:11:02 |
zagura |
So, you want build 3rd party software with built crosstool for your host? |
# 20:11:32 |
Trel |
Correct, the only thing I need different from my host is the glibc version |
# 20:11:48 |
zagura |
Afair standard linux tuple is x86_64-linux-pc |
# 20:12:20 |
milkylainen |
Why would you want to specify anything like that for the host? |
# 20:12:31 |
Trel |
Huh? |
# 20:13:19 |
Trel |
I'll be at the machine later today and can provide the output of configure with the envars set vs not. |
# 20:13:28 |
milkylainen |
It's entirely native? right? |
# 20:13:35 |
zagura |
Then probably for --build you should use crosstool-ng's configured tuple (default probably x86_64-unknown-linux-gnu). But setting proper CC/SYSROOT should be enough for ./configure to detect all needed things |
# 20:13:44 |
Trel |
I'm not sure how to answer that. |
# 20:14:20 |
Trel |
zagura: This is a "I know some of those words" scenario. |
# 20:14:28 |
zagura |
Trel ./configure --help for software you build would be helpful. |
# 20:16:54 |
milkylainen |
For native builds the build tuple is guessed if left out and host becomes the same. |
# 20:17:19 |
milkylainen |
I still don't see any need to set them for native builds. |
# 20:18:10 |
milkylainen |
I usually just do the bootstrap then configure with prefix and just fix any complaints configure has about missing local machine dependencies. |
# 20:24:50 |
zagura |
For native build tuple is usually empty. It's partially about where the to search proper library and headers. |
# 20:25:31 |
zagura |
For example, installing arm64 toolchain from Arch package, you will get aarch64-linux-gnu tuple for toolchain. |
# 20:25:52 |
zagura |
Then everything is available at /usr// subtree. |
# 20:27:38 |
Trel |
zagura: I'm not sure how --help on configure would assist here |
# 20:28:30 |
Trel |
And for tuples what would be the difference in name for x86_64 linux with glibc 2.38 and the same with glibc 2.37? |
# 20:28:56 |
Trel |
And I'll provide the output of calling config with each method in a few hours. |
# 20:36:29 |
Trel |
I'll do a configure with system ones, then I'll start fresh and call menuconfig, change the glibc version and nothing else, and do a configure with that set via CC and CXX |
# 20:42:20 |
Trel |
But I want to be sure I'm doing this right. What exactly should I be setting before or during calling configure to ensure I'm using the crosstools toolchain? Just setting the path as described in the docs will do nothing. |
# 20:51:33 |
Trel |
So far I've done menuconfig set it to Linux and set the glibc to 2.36, is that right so far? |
# 20:54:13 |
Trel |
It it normal that this is the name that it generated: alphaev4-unknown-linux-gnu ? |
# 20:54:24 |
Trel |
in $HOME/x-tools |
# 20:58:19 |
zagura |
No difference between tools for different glibc. |
# 20:59:27 |
Trel |
I don't know what that answers |
# 20:59:34 |
zagura |
Actually, probably only glibc is more of LD_LIBRARY_PATH than compiling/linking. Maybe you should read about how AppImage works. |
# 20:59:48 |
zagura |
The question: Trel> And for tuples what would be the difference in name for x86_64 linux with glibc 2.38 and the same with glibc 2.37? |
# 21:00:21 |
Trel |
No difference in tools? I don't understand, I thought every single one was different with the different versions. |
# 21:00:35 |
Trel |
and Appimage is why I need the older version |
# 21:01:01 |
zagura |
glibc is library as any other. |
# 21:01:29 |
Trel |
ok, so let me check here, the toolchain is built, what do I do next |
# 21:01:48 |
Trel |
normally, building this is two commands `./configure && make` |
# 21:02:14 |
zagura |
Where "this" is what software? |
# 21:02:20 |
Trel |
Retroarch |
# 21:02:33 |
Trel |
Does it matter to the correct way to use THIS tool? |
# 21:04:15 |
Trel |
I'm assuming step 1 is: export PATH="${PATH}:/home/master/x-tools/alphaev4-unknown-linux-gnu/bin" |
# 21:04:42 |
Trel |
Just doing that and ./configure doesn't make any difference, it uses the system gcc and g++ |
# 21:04:52 |
Trel |
Which I expected |
# 21:05:06 |
zagura |
Wait... |
# 21:05:32 |
zagura |
So you want build retroarch as software for alpaev4 architecture? |
# 21:06:19 |
Trel |
no |
# 21:06:34 |
Trel |
This is why I keep asking what I'm doing wrong here |
# 21:06:50 |
Trel |
I ran menuconfig and changed 3 options |
# 21:07:00 |
Trel |
Here, let me nuke everything and start over, can you walk me through this? |
# 21:07:32 |
zagura |
Trel: Start about what you actually try to get. |
# 21:07:43 |
Trel |
1. cg-nt menuconfig |
# 21:08:21 |
Trel |
2. Operating System -> Target OS -> Changed from bare metal to Linux |
# 21:08:25 |
zagura |
I feel XY problem, so tell us, what's your real objective. |
# 21:08:41 |
Trel |
I want to compile something using glibc 2.37 on a system with 2.38 |
# 21:09:12 |
Trel |
3. C-library -> Version of glibc, changed to 2.37 |
# 21:09:17 |
zagura |
You still telling more about how you would like to get things done. |
# 21:09:33 |
Trel |
I want to compile retroarch for a target system using glibc 2.37 |
# 21:09:41 |
Trel |
It's really not that complicated |
# 21:09:57 |
Trel |
I think you're assuming I'm trying to do something more complex |
# 21:10:03 |
zagura |
You make it more complicated than it is with your description. |
# 21:10:22 |
Trel |
Target machine has glibc 2.37, the machine I can use to compile has 2.38 |
# 21:10:36 |
Trel |
It doesn't work if I just compile it because of glibc |
# 21:10:48 |
zagura |
Because there is no valid use case to fix 1 minor below glibc on host building natively. |
# 21:11:02 |
Trel |
It doesn't run if I don't? |
# 21:11:06 |
Trel |
That's not a valid case? |
# 21:11:09 |
zagura |
Building natively means you would be using it on the same machine. |
# 21:11:46 |
zagura |
It doesn't work if I just compile it because of glibc <- Can you elaborate? |
# 21:12:13 |
Trel |
If I try to run what I compile, it doesn't work and says the version of glibc is wrong. |
# 21:12:14 |
zagura |
So. You want use retroarch on your machine? |
# 21:12:26 |
Trel |
I want to use a compiled version of Retroarch on a target machine |
# 21:12:36 |
zagura |
Which is? |
# 21:12:48 |
Trel |
a machine with glibc 2.37 |
# 21:12:54 |
Trel |
Arch based |
# 21:13:03 |
Trel |
I can make an appimage to include dependencies |
# 21:13:04 |
zagura |
Alpha EV4 machine? |
# 21:13:07 |
Trel |
no |
# 21:13:13 |
Trel |
x86_64 |
# 21:13:22 |
Trel |
just like the one I'm building on |
# 21:13:50 |
zagura |
Ok. So 1st thing should be clear. |
# 21:14:27 |
Trel |
menuconfig defaulted to that |
# 21:14:34 |
zagura |
then Both machines would be some variant of x86_64-x-linux-gnu and the tuples will be totally irrelevant in your problem. |
# 21:14:44 |
Trel |
I know |
# 21:15:04 |
Trel |
I fixed the arch |
# 21:15:20 |
Trel |
This is the name it's using now x86_64-unknown-linux-gnu |
# 21:15:38 |
Trel |
I selected the glibc version, and enabled c++ as well |
# 21:15:40 |
Trel |
now it's building |
# 21:15:41 |
zagura |
Ok. |
# 21:15:46 |
Trel |
Is that much right? |
# 21:15:58 |
zagura |
For now, I think yes. |
# 21:16:40 |
zagura |
Let me get back to problem of not runnig software? What was the real error, you expirienced on target machine? |
# 21:16:48 |
Trel |
Once it builds, what do I do next. CC=/home/master/x-tools/x86_64-unknown-linux-gnu/bin/ and CXX=/home/master/x-tools/x86_64-unknown-linux-gnu/bin/ |
# 21:17:51 |
zagura |
And SYSROOT=/home/master/x-tools/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot |
# 21:18:28 |
zagura |
AppImage retroarch binary didn't worked as well, right? |
# 21:18:44 |
Trel |
This is not me, but this is pretty much the error I'd get (for various libraries) if I try to run the compiled stuff (including the appimage) on the older glibc that was built on the newer |
# 21:18:46 |
Trel |
https://askubuntu.com/questions/421642/libc-so-6-version-glibc-2-14-not-found |
# 21:19:13 |
Trel |
I know the error and the cause. |
# 21:19:44 |
zagura |
This error means that glibc was built with not enough symbol compatibility. |
# 21:20:05 |
zagura |
There is option in glibc configuration within menuconfig for that. |
# 21:20:48 |
zagura |
Part "Oldest supported ABI". |
# 21:21:34 |
Trel |
It's a known issue with trying to run on an older glibc something that was built against a newer one. |
# 21:21:45 |
Trel |
Especially with appimage |
# 21:22:03 |
Trel |
Compiling against an older one works, I did this in a docker image |
# 21:22:09 |
Trel |
(successfully) |
# 21:22:17 |
Trel |
Now I'm trying to use this tool for the future. |
# 21:22:23 |
zagura |
Trel: Basically, for that kind of build the easiest way would be just getting docker image with older os and build on it. |
# 21:22:47 |
Trel |
zagura: It was in #docker that it was suggested I use this tool instead |
# 21:22:50 |
Trel |
go figure |
# 21:23:14 |
Trel |
The docker route was what I went for first |
# 21:23:14 |
zagura |
The target machine would keep not updated? |
# 21:23:37 |
zagura |
I guess, it should also have glibc 2.38 if is up-to-date. |
# 21:23:38 |
Trel |
It probably will be updated, but not in line with my machine I can build on |
# 21:24:01 |
Trel |
The actual hardware is the steam deck which is why I'm going for appimage. |
# 21:24:25 |
Trel |
(and yes I'm aware of other sources of retroarch, this is just the first thing I'm trying to get compiled for it) |
# 21:24:46 |
Trel |
ls |
# 21:25:05 |
Trel |
oops |
# 21:25:34 |
Trel |
The build finished, this is the line I'm going to run now |
# 21:26:12 |
Trel |
export CC=/home/master/x-tools/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc CXX=/home/master/x-tools/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-g++ SYSROOT=/home/master/x-tools/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot |
# 21:26:15 |
Trel |
Does that look right? |
# 21:26:40 |
zagura |
I think yes. ./configure should give the answer :) |
# 21:27:45 |
Trel |
It got further than it did when I tried before |
# 21:27:51 |
Trel |
I think the sysroot part may be the difference |
# 21:30:03 |
Trel |
I'm going to run the same configure command (same options) with and without those envars and I'll share the output |
# 21:30:38 |
Trel |
This is the configure command I'm running: https://termbin.com/2u3a |
# 21:32:00 |
Trel |
Ok, it failed the same way |
# 21:32:41 |
Trel |
The configure command without the envars: https://termbin.com/brov |
# 21:32:55 |
Trel |
The configure command WITH the envars: https://termbin.com/qqcu |
# 21:34:19 |
zagura |
Well, you need all the libraries (ffmpeg, qt, vulkan, lua) available in sysroot. It won't be that easy. |
# 21:34:59 |
Trel |
That's what I was told I wouldn't need to do and why I should use this over docker. |
# 21:35:37 |
zagura |
crosstools build only part related to compiler, which can be used for basic applications or whole linux from scratch. |
# 21:36:18 |
Trel |
Is there a way to tell it to check the system libraries if it doesn't find it in the crosstools locations? |
# 21:36:39 |
Trel |
*host |
# 21:37:35 |
Trel |
like a system root priority with multiple options? |
# 21:37:57 |
zagura |
That would kind of miss the point of getting different setup in crosstools. All of host libraries/binaries could have similar problem you had with the retroarch copied from host to target. |
# 21:39:34 |
zagura |
Sometimes you could override sysroot, but this would mean that libc is always with other libraries. |
# 21:39:42 |
Trel |
So I'd have to compile all the supporting libraries myself? |
# 21:40:22 |
zagura |
Yes. Do complete setup. |
# 21:40:39 |
zagura |
So, for one shot with common dependencies, docker is easier. |
# 21:41:04 |
Trel |
*sigh* that's where I started T_T |
# 21:41:29 |
zagura |
Well.. |
# 21:41:42 |
Trel |
Thanks, I knew something felt off like it was too easy to just pop in like that |
# 21:42:15 |
zagura |
If there is continous development of some application, which is more popular case, then yes, crosstools is recommended way of doing thigs. |
# 21:42:52 |
zagura |
Gives more options to customize and make better permanent development environment. |
# 21:52:25 |
Trel |
Makes sense in that context. |