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
[SOLVED] Attempting to compile ncurses, config script ha...
[SOLVED] Attempting to compile ncurses, config script ha...
Last edited by Viperidae on Sun Jan 29, 2017 11:02 am, edited 1 time in total.
- dchapiesky
- Member
- Posts: 204
- Joined: Sun Dec 25, 2016 1:54 am
- Libera.chat IRC: dchapiesky
Re: Attempting to compile ncurses, configure script hanging
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
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
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
In anycase, your --host=i686-pc-blabla is probably causing configure to look for i686-pc-blabla-gcc somewhere in your path....
type
Code: Select all
i686-pc-blabla-gcc -v
and see if something happens... if not then you need to put i686-pc-blabla-gcc in your PATH
cheers
Plagiarize. Plagiarize. Let not one line escape thine eyes...
Re: Attempting to compile ncurses, configure script hanging
yeah, that's my sysroot and I verified its in my path..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
where perhaps /home/blablabla/install is your sysroot? Am I correct?Code: Select all
./ncurses-5.9/configure --prefix=/home/blablabla/install --host=i686-pc-blabla --without-tests
In anycase, your --host=i686-pc-blabla is probably causing configure to look for i686-pc-blabla-gcc somewhere in your path....
typeCode: Select all
i686-pc-blabla-gcc -v
and see if something happens... if not then you need to put i686-pc-blabla-gcc in your PATH
cheers
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)
- dchapiesky
- Member
- Posts: 204
- Joined: Sun Dec 25, 2016 1:54 am
- Libera.chat IRC: dchapiesky
Re: Attempting to compile ncurses, configure script hanging
try...
Works for my cross compile test
good luck
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
good luck
Plagiarize. Plagiarize. Let not one line escape thine eyes...
Re: Attempting to compile ncurses, configure script hanging
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.