Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
this is my first post so I hope I'm doing it in the right forum but after checking the Programming forum I thought it's more about general programing questions.
Anyway, I'm new to Linux after programing on Visual Studio for years and I ran into quite some problems most of which I was able to solve but with this one I'm hitting a wall.
I installed Ubuntu13 64 recently and started to set up a development environment. Since I want to use it mostly for Ada I installed the GPS workbench from Ada core which comes with it's own version of the GCC toolset, I believe it is Mingw, at least on Windows it is, not sure if that's true on Linux as well.
Now my main interest is to develop console applications there, so I got the latest version of ncurses and did the usual ./configure make make install sequence and all went fine.
However now, when I make a simple hello world program in the GPS workbench (using the c++ compiler, no mixed language with Ada at all) I am getting this error message:
/usr/lib/libncurses.a: could not read symbols: File format not recognized
collect2: error: ld returned 1 exit status
So I guess that the compiler that comes with Adacore's GPS workbench is somehow not compatible with the standard gcc toolset that comes with Ubuntu?
Thanks for any help
PS I checked the compiler with gcc -v and it reports that it is the GNAT compiler so I guess there is no second toolset installed. I found some posts that pointed me in the direction of the archive manager ar and how to extract a file from it and test it with the file command and it turned out that the ncurses library is in 64 bit format, at least that's what I think, it says "ELF 64-bit, x86-64...". Perhaps that is the problem. But if it was compiled with the GCC that comes with Ada, why is it different when I make this library with make? When I check my test.o file that contains my hello world program it comes out as 32 bit. Is there a way to force the creation of a 32 bit library when I use make?
Last edited by DrVonBraun; 07-31-2013 at 08:57 AM.
Depends on the flags in the Makefile... gcc can create 32 bit or 64 bit code. Usually the compiler flags are listed with the name CFLAGS in the Makefile.
Frequently, the problem is running a 32 bit kernel on a 64 bit capable machine (sometimes picked by accident... to correct it usually requires a reinstallation as there are a LOT of other things that get limited).
It IS possible to run 32 bit binaries on a 64 bit linux (at least on Intel), it is not possible to run 64 bit binaries on a 32 bit linux (no 64 bit kernel calls for instance due to hardware limitations: no 64 bit hardware instructions available/registers..., 64 bit linux CAN support a 32 bit environment).
Well thanks for the help. I am trying various things and the "best" that happens is a missing or incompatible crt1.o and crti.o linker error.
At this point I think that the 64 bit Linux I have installed is just giving me trouble. Since I am new to this thing and I dont want to have to deal with 32 and 64 bit compatibility issues I think I will install the 32 bit version of ubuntu and of the Gnat compiler system and hope that this solves my problems