From: Steven Correll on
On Apr 14, 2:14 am, elijah <mily...(a)gmail.com> wrote:
> hi guys,
>
> here is the script for Code-2 without "-static"
>
> /usr/local/intel_fc_81/bin/ifort -openmp -fpp2 -o myexec
> dynm.o dyn21.o dyn21b.o adummy_graph.o orderByMetis.o lcfunc.o
> adummy_msc.o mscapi.o libdyna.a libbcsext4.a liblsda.a liblssecurity.a
> libdmf.a libmetis.a liblcpack.a libspooles.a libcparse.a liblsm.a
> liblscrypt.a ia32_81_libansys.a -lsvml -lpthread -ldl /usr/local/
> mkl_8.0/lib/32/libmkl_lapack.a /usr/local/mkl_8.0/lib/32/libmkl_ia32.a
>
> and the output is
>
> liblcpack.a(IIRVmgr_init.o): In function `IIRVmgr_initOutOfCore':
> init.c:(.text+0x717): warning: the use of `tmpnam' is dangerous,
> better use `mkstemp'
>
> with "-static"
>
> /usr/local/intel_fc_81/bin/ifort -openmp -fpp2 -o myexec
> dynm.o dyn21.o dyn21b.o adummy_graph.o orderByMetis.o lcfunc.o
> adummy_msc.o mscapi.o libdyna.a libbcsext4.a liblsda.a liblssecurity.a
> libdmf.a libmetis.a liblcpack.a libspooles.a libcparse.a liblsm.a
> liblscrypt.a ia32_81_libansys.a -static -lsvml -lpthread -ldl /usr/
> local/mkl_8.0/lib/32/libmkl_lapack.a /usr/local/mkl_8.0/lib/32/
> libmkl_ia32.a
>
> output is
>
> ld: cannot find -lpthread
>
> operating system is mandrake linux 32bit, on intel xeon 32bit double
> processor machine
>
> kind regards
> MI

Hmm. Unfortunately, after looking at the command and the error message
I still can't say what's wrong. Did you try any of the experiments
suggested earlier? Here's another experiment to try: replace "-
lpthread" with the absolute path to the "libpthread.a" file which you
think the linker ought to be using (e.g. "/usr/lib/libpthread.a".) If
you get an error message saying the libpthread.a file is unacceptable,
then the linker is ignoring it for that reason. If instead your
problem goes away, then there's an installation problem for either
Mandrake or ifort: the linker isn't searching the directory in which
that file appears.
From: elijah on
well i was able to locate "libpthread.a" and now after issuing this
command:

/usr/local/intel_fc_80/bin/ifort -openmp -fpp2 -o ls971 dynm.o
dyn21.o dyn21b.o adummy_graph.o orderByMetis.o lcfunc.o adummy_msc.o
mscapi.o libdyna.a libbcsext4.a liblsda.a liblssecurity.a libdmf.a
libmetis.a liblcpack.a libspooles.a libcparse.a liblsm.a liblscrypt.a
ia32_81_libansys.a -static -lsvml -lpthread -ldl /usr/local/mkl_8.0/
lib/32/libmkl_lapack.a /usr/local/mkl_8.0/lib/32/libmkl_ia32.a

I get these messages

liblcpack.a(IIRVmgr_init.o)(.text+0x717): In function
`IIRVmgr_initOutOfCore':
: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/libpthread.a(ptw-write.o)(.text+0x25): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-write.o)(.text+0x55): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-read.o)(.text+0x25): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-read.o)(.text+0x55): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-close.o)(.text+0x1f): In function `close':
: undefined reference to `__syscall_error'
/usr/lib/libpthread.a(ptw-close.o)(.text+0x4a): more undefined
references to `__syscall_error' follow
/usr/lib/libpthread.a(pthread.o)(.text+0x6d4): In function
`__pthread_reset_main_thread':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.text+0x6de): In function
`__pthread_reset_main_thread':
: undefined reference to `_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0x6e8): In function
`__pthread_reset_main_thread':
: undefined reference to `_h_errno'
/usr/lib/libpthread.a(pthread.o)(.text+0xad4): In function
`pthread_initialize':
: undefined reference to `_res'
/usr/lib/libpthread.a(pthread.o)(.data+0x1b8): undefined reference to
`_errno'
/usr/lib/libpthread.a(pthread.o)(.data+0x1c0): undefined reference to
`_h_errno'
/usr/lib/libpthread.a(pthread.o)(.data+0x1c8): undefined reference to
`_res'

regards
MI