1834789 Members
2624 Online
110070 Solutions
New Discussion

Re: Compiler error - gcc

 
Anand_30
Regular Advisor

Compiler error - gcc

Hi,

I was tring to compile MIME-Base64-3.05 in SUN Solaris box.

MIME uses "cc" for compilation. I don't have "cc" installed in my box. SO i changed the "cc" flag in the makefile to "gcc" and tried the compilation.

I received the following error:

gcc -c -xO3 -xdepend -DVERSION=\"3.05\" -DXS_VERSION=\"3.05\" -KPIC -I/uc
gcc: unrecognized option `-KPIC'
gcc: language depend not recognized
gcc: Base64.c: linker input file unused since linking not done
Running Mkbootstrap for MIME::Base64 ()
chmod 644 Base64.bs
LD_RUN_PATH="" gcc -o blib/arch/auto/MIME/Base64/Base64.so -G Base64.o
gcc: Base64.o: No such file or directory

I have understood from the error that the options -KPIC is not recognized by "gcc". I am not able to figure out what is the equivalent of "KPIC" in "gcc".

Can anyone please help me resolve this error.

Thanks,
Anand

2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: Compiler error - gcc

You're asking about Solaris in an HP-UX Forum? The gcc equivalent option to -KPIC is -pie (Position independent). Generally there is a "configure" script that will search your platform for the compiler and generate a makefile woith matching options. You are going to have to do a man gcc and match each option with it's equivalent for the Solaris cc compiler unless you can run configure again.
If it ain't broke, I can fix that.
Anand_30
Regular Advisor

Re: Compiler error - gcc

Thanks Clay,

I actually could not find any good forums for SUN Solaris. SO, I thought I will try in in HP_UX forum. I definitely knew that I will get some answer.

I successfully installed MIME. I had to use 'fKPIC' option and also change a few other parameters with the gcc compiler.

Thanks,
Anand