Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28712 Discussions

ifort error #10236 ___pthread_once on Ubuntu Lucid 64

rmanger
Beginner
790 Views
I am attempting to compile a sicentific computational code (not written by myself), but during the make process I keep getting the following error towards the end of the build:

ifort: error #10236: File not found: '___pthread_once'

The compiler works fine on all of the other files until this point in the make process. Does anyone have an idea of what should be done to amerliorate this error? Thanks

0 Kudos
2 Replies
mecej4
Honored Contributor III
790 Views
Look in your source files and makefile for "pthread_once".

The error is probably caused by an error in the makefile, which causes the compiler to hand over a presumed object file named "___pthread_once" to the linker, and the linker cannot find a file with that name.
0 Kudos
John4
Valued Contributor I
790 Views

It looks like a symbol decorations issue. The pthread library defines both pthread_once (with no leading underscore) and __pthread_once (with two leading underscores). The code you're trying to compile seems to require the latter (although, I guess it's intended for internal use only), and it's getting an extra underscore somehow.

As mecej4 suggests, check if the symbol is defined correctly ---in compiler directives or bind(C) attributes.

0 Kudos
Reply