- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm attempting to follow the procedure belowin order to build shared libraries with statically-linked Intel libraries:
All of the shared libraries are being built and most of them (seem to) function correctly. A few of them, however, produce this message when the code is executed and they're linked in:
symbol lookup error: ./code_name:undefined symbol: for__pthread_mutex_lock_ptr
Any thoughts on what may cause this?
All of the shared libraries are being built and most of them (seem to) function correctly. A few of them, however, produce this message when the code is executed and they're linked in:
symbol lookup error: ./code_name:undefined symbol: for__pthread_mutex_lock_ptr
Any thoughts on what may cause this?
Thanks,
Greg
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The usual way to link in pthreads is by giving ifort an option which implies it (-openmp or -parallel), or by appending -lpthreads to the link options. So the thought would be that you chose some less usual method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here are my linker flags. Do any of these look out of whack?
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crti.o \
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtbeginS.o \
--eh-frame-hdr \
-shared \
-L/tools/intel/fce/11.1.046/lib/intel64 \
-L/usr/lib64/gcc/x86_64-suse-linux/4.1.2 \
-L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64 \
-L/lib/../lib64 \
-L/usr/lib/../lib64 \
-L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib \
-L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../.. \
-L/lib64 \
-L/lib \
-L/usr/lib64 \
-L/usr/lib \
-Bstatic \
-lifport \
-lifcore_pic \
-limf \
-lsvml \
-Bdynamic \
-lm \
-Bstatic \
-lipgo \
-lirc \
-u \
__pthread_once \
-Bdynamic \
-lpthread \
-lc \
-lgcc_s \
-Bstatic \
-lirc_s \
-Bdynamic \
-ldl \
-lc \
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtendS.o \
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crtn.o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hmmm, interesting. In newer compilers this symbol is indeed in libifcore_pic.a BUT it's not in your old 11.1 version library for libifcore_pic.a
I am assuming you have -openmp or -parallel in your build, yes?
There were some restrictions in the past regarding using the OpenMP runtime and static builds - to the effect that you could NOT build statically with OpenMP. I'll check with our OpenMP experts.
ron
I am assuming you have -openmp or -parallel in your build, yes?
There were some restrictions in the past regarding using the OpenMP runtime and static builds - to the effect that you could NOT build statically with OpenMP. I'll check with our OpenMP experts.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it would help to see your compiler options.
-i-static will NOT link in the static OpenMP runtime library. You need '-openmp-link static' to achieve that.
ron
-i-static will NOT link in the static OpenMP runtime library. You need '-openmp-link static' to achieve that.
ron

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page