Operating System - HP-UX
1752812 Members
5969 Online
108789 Solutions
New Discussion юеВ

Re: How to provide +check=all option to linker

 
Rangaraaj Rajagopalan
Occasional Advisor

How to provide +check=all optin to linker

Hi,
I am trying to build my source tree with +check=all option to the cc64 compiler. I am getting following error during my build:

= Generating fsck
ld: Unsatisfied symbol "_rtc_init_check" in file aggr.o
ld: Unsatisfied symbol "_rtc_check_bounds_with_index" in file aggr.o
ld: Unsatisfied symbol "_rtc_check_guards_" in file aggr.o
3 errors.
gmake: *** [fsck] Error 1
*** Error exit code 2


As per the compiler documentation, the +check options are also need to be provided to linker, hence, I provided it with -Wl,+check=all as a compiler argument but still I am getting the same error.

Please suggest.

Regards,
Pritam
6 REPLIES 6
Dennis Handly
Acclaimed Contributor

Re: How to provide +check=all option to linker

(What cc64 compiler? There is no such thing, only aCC, cc, c89 or c99. There is a +DD64 option.)

>As per the compiler documentation, the +check= options are also need to be provided to linker

That is NOT what it says. It means you have to provide the same +check= options at compile and link time to the cc driver.

https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-c01947473

[Moderator edit: Updated the broken link.]

Rangaraaj Rajagopalan
Occasional Advisor

Re: How to provide +check=all optin to linker

cc64 is a ecom compiler:

tmp]# /ux/vbe/em/nck-wrap/cc64 -V sample.c
cc: HP C/aC++ B3910B A.06.11 [Oct 17 2006]
ld: 92453-07 linker ld HP Itanium(R) B.12.38 IPF/IPF
tmp]#

how do I provide the option to cc driver?
I provided the +check=options to linker with -Wl,+check=all directly at compile time.

Dennis Handly
Acclaimed Contributor

Re: How to provide +check=all option to linker

>cc64 is a ecom compiler:

No, cc64 is a wrapper around the driver that invokes ecom.

>how do I provide the option to cc driver?

The same as always: +check=options

>I provided the +check=options to linker with -Wl,+check=all directly at compile time.

This is NOT a linker option. This is a compile AND link time driver option.
(And -Wl passes the option to ld AT linktime.)

Rangaraaj Rajagopalan
Occasional Advisor

Re: How to provide +check=all optin to linker

Thanks a lot for the useful information.
After digging out I found out that +check=all option requires librtc library which was missing in my build evironment.

I could build my tree successfully after adding the library to the path.

Thanks for your support.

Pritam
Rangaraaj Rajagopalan
Occasional Advisor

Re: How to provide +check=all optin to linker

hi,
Going ahead I am getting following compiler warnings due to which my build is failing.



= Generating pgntest
ld: (Warning) Symbol "_rtc_check_guards_" is not exported but is imported by a shared library
1 warnings.

Please suggest.

Regards,
Pritam
Dennis Handly
Acclaimed Contributor

Re: How to provide +check=all option to linker

>I found out that +check=all option requires librtc library which was missing in my build environment.

I suspected that might be your next problem.

>ld: (Warning) Symbol "_rtc_check_guards_" is not exported but is imported by a shared library

Again, you forgot to add +check=all to the link step, when you built that shlib.