Page 1 of 1
[SOLVED] Attempting to compile ncurses, config script ha...
Posted: Wed Jan 25, 2017 2:19 pm
by Viperidae
So I've been working on the userland for the OS I started working on last month and all has been going well, well, until I tried to compile ncurses. So, the problem I'm running into is that the configure script for ncurses seems to hang at "Checking to see if the compiler works". Unfortunately, there is nothing abnormal in the config.log. Just for testing purposes to see if I could a more useful error I edited the configure script and commented out this test. I got another hang at "Checking for ANSI headers". Again, nothing useful in the config.log. So, right now I'm trying to identify what exactly the problem is but its hard when you don't have anything to really go on. I'm assuming this has something to do with either my toolchain or a header file used in the configure tests, or... possibly automake (I kind of doubt that though, but its given me a lot of trouble in the past). So anyways, does anyone have any tips on what I should do to hopefully get a better understanding of what exactly is causing this test to hang?
Also, I know I probably didn't give enough information as my problem is rather vague, but I don't know what information would actually give information to what the problem at hand is, hence why I'm posting here. Thanks!
EDIT: Configure arguments ./ncurses-5.9/configure --prefix=/home/blablabla/install --host=i686-pc-blabla --without-tests
EDIT: So I solved the problem, I didn't realize that the configure script was not aware I was cross compiling. Running it with ./ncurses-5.9/configure --prefix=/home/blablabla/install --host=i686-pc-blabla --without-tests --build=x86_64-unknown-linux fixed my problem
Re: Attempting to compile ncurses, configure script hanging
Posted: Wed Jan 25, 2017 10:44 pm
by dchapiesky
A bit helpful information would be:
1) Are you cross compiling ncurses to your userland from your host?
or
2) Are you natively compiling ncurses from within the userland of your OS?
I presume it is #1 as you have
Code: Select all
./ncurses-5.9/configure --prefix=/home/blablabla/install --host=i686-pc-blabla --without-tests
where perhaps /home/blablabla/install is your sysroot? Am I correct?
In anycase, your --host=i686-pc-blabla is probably causing configure to look for i686-pc-blabla-gcc somewhere in your path....
type
and see if something happens... if not then you need to put i686-pc-blabla-gcc in your PATH
cheers
Re: Attempting to compile ncurses, configure script hanging
Posted: Thu Jan 26, 2017 8:22 am
by Viperidae
dchapiesky wrote:A bit helpful information would be:
1) Are you cross compiling ncurses to your userland from your host?
or
2) Are you natively compiling ncurses from within the userland of your OS?
I presume it is #1 as you have
Code: Select all
./ncurses-5.9/configure --prefix=/home/blablabla/install --host=i686-pc-blabla --without-tests
where perhaps /home/blablabla/install is your sysroot? Am I correct?
In anycase, your --host=i686-pc-blabla is probably causing configure to look for i686-pc-blabla-gcc somewhere in your path....
type
and see if something happens... if not then you need to put i686-pc-blabla-gcc in your PATH
cheers
yeah, that's my sysroot and I verified its in my path..
Code: Select all
Using built-in specs.
COLLECT_GCC=i686-pc-blablaos-gcc
COLLECT_LTO_WRAPPER=/home/blabla/blablaos/kernel/toolchain/install/libexec/gcc/i686-pc-blablaos/6.1.0/lto-wrapper
Target: i686-pc-blablaos
Configured with: ../gcc-6.1.0/configure --target=i686-pc-blablaos --prefix=/home/blabla/blablaos/kernel/toolchain/install --with-sysroot=/home/blabla/blablaos/kernel/toolchain/install --disable-nls --enable-languages=c,c++ --disable-libssp
Thread model: single
gcc version 6.1.0 (GCC)
It can find the compiler just fine (That test in the configure script passes).
Re: Attempting to compile ncurses, configure script hanging
Posted: Thu Jan 26, 2017 9:35 pm
by dchapiesky
try...
Code: Select all
./configure CC=/path/to/your/cross/gcc CXX=/path/to/your/cross/g++ AR=/path/to/your/cross/ar RANLIB=/path/to/your/cross/ranlib --host=i686-pc-blabla --build=your_build_system_triplet_presumably_x86_64-linux-gnu --with-build-cc=cc --prefix=/your/sysroot ----and-if-you-don't-want-cxx-bindings---- --without-cxx-binding
Works for my cross compile test
good luck
Re: Attempting to compile ncurses, configure script hanging
Posted: Sat Jan 28, 2017 9:45 am
by Viperidae
Ha, that had nothing to do with it. I figured it out and apparently the configure script didn't know I was cross compiling and thought I was compiling on my OS. So it created an executable with my compiler and attempted to run it on linux, which apparently just hung. (I think I made my CRT0 do a JMP $ after calling the sysexit syscall). Running the ncurses configure with --build=x86_64-none-linux fixed it.