[Info-vax] Compile error (Pthread on VMS)?
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Tue Feb 19 15:24:11 EST 2013
On 2013-02-19 19:51:46 +0000, sfloreslyon at gmail.com said:
> We’re trying to port an application to VMS that currently runs on an
> old version of Tru64. We’re currently doing the compiles on Alpha
> because that is our test system, ultimately (and soon) we’ll move the
> port to Itanium.
>
> We’re running OpenVMS 8.3, but when we compile modules that use pthread
> calls (e.g. pthread_kill) we take the following errors. I’ve had no
> luck figuring out what the VMS equivalent of compiling with “-pthread”
> is and I also can’t imagine why a VMS include file would include
> something that doesn’t exist.
>
> dsa124:[tcps] cc/define=_PTHREAD_ENV_UNIX tcps
>
> # error "Please compile the module including pthread.h with -pthread"
> ...^
> %CC-E-ERRORMESSAGE, #error "Please compile the module including
> pthread.h with -pthread"
> at line number 324 in module PTHREAD of text library
> SYS$COMMON:[SYSLIB]SYS$STARLET_C.TLB;1
>
> # include <standards.h>
> ..^
> %CC-F-NOINCLFILEF, Cannot find file <standards.h> specified in #include
> directive.
> at line number 329 in module PTHREAD of text library
> SYS$COMMON:[SYSLIB]SYS$STARLET_C.TLB;1
>
> Any help or pointers you have would be greatly appreciated!
>
> Thanks,
> Sherri LyonConnectivity Applications – Sabre/AAHP Enterprise
> ServicesTelephone +1 918.939.5362Email sherri.lyon at hp.com 4000 N.
> Mingo Rd., MD 375 / Tulsa, OK 74116
Try a compile with CC /REENTRANCY=MULTITHREAD and LINK /THREADS;
usually with /THREADS=(MULTIPLE_KERNEL_THREADS,UPCALLS) enabled.
Try removing that _PTHREAD_ENV_UNIX define or at least see what it's
enabling, too; that's not immediately familar with OpenVMS, and looks
to be specific to the Tru64 Unix implementation. (There's a lot of
common code here, and I'd suspect you're getting into the Unix code
path in the header files.)
The OpenVMS pthreads manual is here:
<http://h71000.www7.hp.com/doc/73final/6493/6101pro_contents.html>
Also see the discussion of reentrancy in the C RTL manual
<http://h71000.www7.hp.com/doc/83final/5763/5763pro_007.html>
Phillip has an example of a threaded TCP program at
<http://vouters.dyndns.org/tima/Unix-OpenVMS-pthreaded-signals-tcp-portable-example.html>
Do remember check with the folks at HP around the problems with the
documentation and errors here, too. :-)
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list