Need help compiling source code

gduncan

Registered
I'm not quite up to speed on the UNIX side of Mac OS X, but I'm trying to learn. Honestly, it often throws me for a loop! Here is my dilemma:

I'm trying to compile source code for programs that track earth-orbiting satellites. The software in question is Predict and gsat. Here is the link to the website where you can download the Predict/gsat packages and here is the link to the website that explains how to compile it for OS X.

When I try to execute the "./configure" command in the Terminal per the instructions I'm confronted with the following message:

Last login: Thu Feb 23 21:46:28 on ttyp3
Voyager:~ root# cd /users/gduncan/desktop/predict/
Voyager:/users/gduncan/desktop/predict root# ./configure
One moment please... ld: can't use -s with input files containg indirect symbols (output file must contain at least global symbols, for maximum stripping use -x)
Compilation failed. Are you sure you have a C compiler (gcc) installed?
Voyager:/users/gduncan/desktop/predict root#


I thought sure that I have a C compiler installed. I've certainly installed the Developer Tools.

Any ideas? Thanks...
 
The command:

which gcc

should show you if gcc is in your path.

I'm doubtful that this is the problem...

It looks like there is a problem with the configure script and ld. The output says that there is a problem with the flag -s so maybe you can look at the configure script and see where the -s comes from and remove it. A better approach would be to see if you can pass to the configure script options -- for instance you might be able to pass LDFLAG

./configure LDFLAG=-x

What can and can't be passed to configure will be in the documentation. Is there a README file that tells you about configure?
 
Does OS X come with the GNU linker? Some open source apps assume use of GNU build tools and that can cause problems on systems that don't have GNU build tools involved.

Peace...
 
Well, I must say thank you for all the advice. I've tried all the above suggestions, but nothing has worked so far.

I may end up re-formatting the hard drive and re-installing the system software. Perhaps I'll even run down to the Apple Store and buy 10.4 Tiger.
 
Hi -

Try removing the offending "-s" flag from the compile line in ./configure so the line now reads:

cc -Wall installer.c -lncurser -o installer

Admittedly I compiled this successfully without the change above on both 10.3.9 and 10.4.5 with no problems (a few warnings on the latter, but otherwise ok), but this might get you started.
 
Back
Top