Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building toolchain under Win10 WSL - Missing gmp, mpfr and mpc #2

Open
marcopoloFR opened this issue Dec 28, 2024 · 4 comments
Open

Comments

@marcopoloFR
Copy link

They are easy to install with ./sources/gcc-13.2.0/contrib/download_prerequisites
but you need to delete these options in linux-build-toolchain.sh
--with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local

PS:
I'd love to have a GDB stub for debugging

@marcopoloFR marcopoloFR changed the title Build toolchain under Win10 WSL - Missing gmp, mpfr and mpc Building toolchain under Win10 WSL - Missing gmp, mpfr and mpc Dec 28, 2024
@tomstorey
Copy link
Owner

I suppose I was working on the assumption that the user would figure out how to identify and install the missing dependencies.

But if you have an example of how this could be integrated into the install script, perhaps you could submit a pull request with those changes and I'll merge it in.

Thanks! :)

@marcopoloFR
Copy link
Author

OK, I'll do it.

@marcopoloFR
Copy link
Author

Sorry, no time to learn Git this morning.
I propose replacing line 49 in linux-build-toolchain.sh with :

if [ -e /proc/sys/fs/binfmt_misc/WSLInterop ];
then
echo "Windows Subsystem for Linux (WSL)"
(cd toolchain/sources/$GCC && contrib/download_prerequisites) || exit 1
(cd toolchain/build/gcc && ../../sources/$GCC/configure --target=$TARGET --disable-werror --prefix=$PREFIX-$GCCVER --enable-languages=c && make -j $CORES all-gcc all-target-libgcc && make install-gcc install-target-libgcc) || exit 1
else
(cd toolchain/build/gcc && ../../sources/$GCC/configure --target=$TARGET --disable-werror --prefix=$PREFIX-$GCCVER --enable-languages=c --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local && make -j $CORES all-gcc all-target-libgcc && make install-gcc install-target-libgcc) || exit 1
fi

@tomstorey
Copy link
Owner

Thanks. I'll give this a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants