OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 1:51 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [SOLVED] Attempting to compile ncurses, config script ha...
PostPosted: Wed Jan 25, 2017 2:19 pm 
Offline

Joined: Sun Sep 02, 2012 7:00 pm
Posts: 10
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


Last edited by Viperidae on Sun Jan 29, 2017 11:02 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Attempting to compile ncurses, configure script hanging
PostPosted: Wed Jan 25, 2017 10:44 pm 
Offline
Member
Member
User avatar

Joined: Sun Dec 25, 2016 1:54 am
Posts: 204
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:
./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
Code:
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...


Top
 Profile  
 
 Post subject: Re: Attempting to compile ncurses, configure script hanging
PostPosted: Thu Jan 26, 2017 8:22 am 
Offline

Joined: Sun Sep 02, 2012 7:00 pm
Posts: 10
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:
./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
Code:
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


yeah, that's my sysroot and I verified its in my path..
Code:
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).


Top
 Profile  
 
 Post subject: Re: Attempting to compile ncurses, configure script hanging
PostPosted: Thu Jan 26, 2017 9:35 pm 
Offline
Member
Member
User avatar

Joined: Sun Dec 25, 2016 1:54 am
Posts: 204
try...

Code:
./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

_________________
Plagiarize. Plagiarize. Let not one line escape thine eyes...


Top
 Profile  
 
 Post subject: Re: Attempting to compile ncurses, configure script hanging
PostPosted: Sat Jan 28, 2017 9:45 am 
Offline

Joined: Sun Sep 02, 2012 7:00 pm
Posts: 10
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot] and 179 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group