Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

Cannot recompile C language

Super Advisor

Cannot recompile C language

Hi all,
I have a program which could be compiled on PA platform successfully.
Now we need to upgrade the platform and run the program on Itanium platform.
So when I compile it on Itanium it reports the errors that it can't find the library file.
But the library files are actually there and I point the correct directory.
I found that in PA the library files are named like *.sl while in Itanium like *.so
So should I change the source code?
Any advice?
10 REPLIES
Acclaimed Contributor Acclaimed Contributor

Re: Cannot recompile C language

While using .sl will still work on IPF, you should change your makefiles to the standard .so suffix.

You also should make sure your have recompiled your shared library for IPF. What does "file lib" show? (You can't use a PA lib.)
Valued Contributor Valued Contributor

Re: Cannot recompile C language

>Now we need to upgrade the platform and run >the program on Itanium platform.So when I compile it on Itanium it reports >the errors that it can't find the library file.
abandon all hope, ye who enter here..
Valued Contributor Valued Contributor

Re: Cannot recompile C language

>Now we need to upgrade the platform and run the program on Itanium platform.So when I compile it on Itanium it reports the errors that it can't find the library file.

If some performance impact is acceptable you can try running the program under aries.
There is no need to compile for native IA.
abandon all hope, ye who enter here..
Honored Contributor Honored Contributor

Re: Cannot recompile C language

> So should I change the source code?

We can't see "the source code". Perhaps a
psychic would be more helpful.

> Any advice?

Show some actual failing commands, and
provide enough context to reveal what's
happening? (Just a thought.)
Super Advisor

Re: Cannot recompile C language

Hi all

Here is the information in detail. Pls check it out for me.It's compiled based on DB2

************************************
cc -Ae -o MClmCScan cclm_main.o -L/opt/IBM/db2/V8.1/lib64 -lm -L/app/ade/lib/moia -lmoiaap i -ldboper -ldb2 -lC
ld: Can't find library or mismatched ABI for -ldb2 Fatal error.
*** Error exit code 1
************************************



Should I add some option to "cc" command?
Tks in advance
Frequent Advisor Frequent Advisor

Re: Cannot recompile C language

ok lets just include on the compile line the option to give the path to your libdb2.so library with a syntax as
-L/the/path/to/my/library
Super Advisor

Re: Cannot recompile C language

Hi Fabien
/opt/IBM/db2/V8.1/lib64 is actually where db2 library files reside.
What should I do?
Tks in advance
Acclaimed Contributor Acclaimed Contributor

Re: Cannot recompile C language

>cc -Ae -L/opt/IBM/db2/V8.1/lib64 -lm -L/app/ade/lib/moia -lmoiaap i -ldboper -ldb2 -lC

Why do you have a -lC? If you meant -lc, remove it.

>ld: Can't find library or mismatched ABI for -ldb2
>Should I add some option to "cc" command?

Where should libdb2.* be found? You need a -L path as Fabien said.

>/opt/IBM/db2/V8.1/lib64 is actually where db2 library files reside.

What does this show:
file /opt/IBM/db2/V8.1/lib64/libdb2* cclm_main.o

Both files must be the same, either 32 or 64 bit.
Super Advisor

Re: Cannot recompile C language

Hi all
It seams like cclm_main.o is not a 64 bit file
So I recompiled it and ran "cc" again it worked !
Thank you guys,especially Dennis. You enlightened my mind
Highlighted
Acclaimed Contributor Acclaimed Contributor

Re: Cannot recompile C language

Any reason you are only assigning 1 point to each answer? If you got an answer that solves your problem, you should use a number from 8 to 10.

You can reopen the thread to assign more points:
http://forums.itrc.hp.com/service/forums/helptips.do?#41
http://forums.itrc.hp.com/service/forums/helptips.do?#34