[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compiling



Hi, again.


> It worked! Now the file is 610 kb large. What does it do? The ld is
> started and the lib*.a for static linking somehow converted to the lib
> for dynamic linking?

Yes. Here's the breakdown of the more intereting option.

-shared   create a shared lib.
-whole-archive use *all" objects in the following archive.
-no-whole-archive the opposite to the above.

The reason for the "whole-archive" thing is to use *ALL* functions ( objects ), that are in
libcpml_ev6.a, but only those needed in libots.

The -soname switch tells the linker, to set the SONAME field in the shared lib to the specified
name. That way, you can use -lcpml and have the link libcpml.so point to the real thing - which
is libcpml_ev6.so, in our case.

> The libcpml*.so is now labelled as executable should this be changed?

Oh yes, adjust that. Also, don't forget to run the obvious ldconfig(8) after creating the new
shared lib. You may strip(1) it first, for space-saving.

> The complaint about a truncated lcpml does not show up anymore, but now
> the compilation stops with this error message:
> 
> ld: cannot find -lgcc
> make: *** [mb] Error 1

That'a a support lib needed by GCC and friends. This looks like, you have not setup
you CCC config-file correctly. Check the following file:

/usr/lib/compaq/ccc-"your_version"alpha-linux/bin/comp.config

The path's in there should reflect your system. You can create this file, after you edited
the script create-comp-config.sh to reflect your system. It's also in the above directory.
This script is the setup-script for the Compaq compiler ( and typically run at rpm postinst, IIRC ).

If you have trouble setting up the compiler, let me know. It's a bit lengthly, but I can
provide the setup for you.
 

> Greetings from Cologne (Alaaf),

Helau ;-)
 
> regards,
> 
> Kerstin 


regards,
Thomas Weyergraf




Reply to: