Quote:
Originally Posted by business_kid
Does the source code even have a configure script? You never told us what you're building either, so we don't know! You downloaded SOME source code, I presume.Tell us what it is, first of all. Change into the source top directory. Then post the output of
|
Hello! Thanks for your response.
I was trying to build nano-7.2.
But at the time of writing this, the problem is resolved. I fixed it.
Turns out there were two libraries that, unlike I thought weren't compiled for a generic x86-64 processor. GMP and libffi. After noticing this, I recompiled (inside my VM) GMP using the following command:
Code:
./configure --prefix=/usr \
--enable-cxx \
--disable-static \
--docdir=/usr/share/doc/gmp-6.3.0 \
--host=none-linux-gnu
and recompiled libffi with:
Code:
./configure --prefix=/usr \
--disable-static \
--with-gcc-arch=x86-64
But this didn't work. After further research on this problem, I tried to compile GMP again. The same configuration but this time with -O0, instead of the default -O2. For good measure, I also recompiled libmpc and libmpfr (both use libgmp). I don't think this was necessary, since all libraries are shared, so if libmpc and mpfr depend on libgmp, they should be fine even when I don't recompile them, right?
anyway...
This did work, and the configure script that came with nano-7.2 started working. It produced a Makefile that I was able to run using `make` and finally, I was able to run the nano executable. But now I wonder... if setting the `--host=none-linux-gnu` for libmpfr didn't work and I had to set -O0, isn't that a ducktape solution? I don't really know where all of this came from.
So as far as I understand, this is what happened.
When I was first building my LFS I was doing it on my PC with Intel i5-6400. All packages were built with no platform specific optimisations but I overlooked two libraries (libgmp and libffi). Those libraries use the `native` setting of GCC by default if none are provided. So now, when I moved to the laptop (Dual Core T3200), everything else was working fine, since it was compiled for a generic 64-bit CPU.
I noticed my mistake, recompiled those libraries with but it didn't work. I also had to set -O0 in libgmp