gcc-mips and ncurses and Gnu Scientific Library

Delbert Franz ddf at sonic.net
Mon Dec 20 16:37:59 EST 2010

I have been experimenting with gcc-mips on the Ben.  I have 
encountered several problems, some of which I have been able to "fix" 
or work around but others not.  

First, when I tried some examples from the Gnu Scientific Library, I 
found the none of the header files where included in the *.ipk files.  
Thus the compile fails.  I then searched in my image build directory, 
found the include files and transferred them to /usr/include.  

Second, the compile when through now, but the link step failed.  The 
linker could not find any of the modules in the shared libraries.  The 
shared libraries all seemed to be there.  So I went back to my image 
build directory and transferred over all the static libraries and then 
use -static with gcc and I had success.  

Third, downloaded the "NCURSES Programming HOWTO" from 


and tried to compile the demo programs.  Again none of the header 
files were on the Ben even though all the shared libraries were.  
Transferred them to the Ben as above and got through the compile step 
but the link step failed and could not find any of the modules in the 
library.  Transferred the static libraries from my image build dir, 
added -static to the options list for gcc, and all of the demos did 
compile and link.  I tried a few of them and they worked.  One problem 
was that the borders of windows are drawn with the wrong characters.  
The horizontal lines are drawn with what looks like an "A" 
with a tilde on top.  The vertical lines are drawn with what looks 
like a digit 3 but is not quite that shape.  Some key code table is 
incorrect somewhere:) The corners are wrong also but my font is too 
small for me to identify what is appearing:) 

Fourth, I tried using an explicit -shared option with gcc in place of 
-static.  I only tried a few demos and the ones that appeared to 
compile and link, seg faulted when tried.  The hanoi.c demo failed in 
the link step with a series of undefined references to: 


I did check on the configure options used for the image build for 
gcc-mips.  There was one that appeared to me to request a build of 
gcc-mips that supported shared libraries.  


Part of my problem is that I'm just learning to use gcc for the first 
time so perhaps I have missed some flag--there are enough of them 
available that missing one is really easy:)  However, the following 
changes would get things working more smoothly: 

1.  The header files need to be included with at least these two 
libraries and perhaps more that I have not tested.  They should go 
into a _dev package for the library.  That is what Debian does.  

2.  I have not been able to get any shared library to work with 
gcc-mips on the Ben.  I don't know enough about gcc usage to do much 

3.  The static libraries are not packaged.  It appears they should be 
until we can get shared libraries working on the Ben.  Maybe they 
should always be included.  



More information about the discussion mailing list