Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 2019 21:38:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 236581] /usr/lib/libomp.so underlinking
Message-ID:  <bug-236581-29464-TSxM4VZWMJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-236581-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-236581-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236581

Jan Beich <jbeich@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-fopenmp underlinking       |/usr/lib/libomp.so
                   |                            |underlinking

--- Comment #1 from Jan Beich <jbeich@FreeBSD.org> ---
Looks like a common mistake due to bug 236141.

$ cc -fopenmp -fuse-ld=3Dbfd omp_hello.c
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to `scalbnl'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to `scalbnf'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to
`pthread_attr_getstack'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to `scalbn'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to
`pthread_getthreadid_np'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to `logbl'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to `fmaxl'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to
`pthread_attr_get_np'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to
`pthread_create'
/usr/local/bin/ld.bfd: /usr/lib/libomp.so: undefined reference to
`pthread_condattr_init'
cc: error: linker command failed with exit code 1 (use -v to see invocation)

$ nm -D /usr/lib/libomp.so | fgrep pthread
                 U pthread_atfork
                 U pthread_attr_destroy
                 U pthread_attr_get_np
                 U pthread_attr_getstack
                 U pthread_attr_init
                 U pthread_attr_setdetachstate
                 U pthread_attr_setstacksize
                 U pthread_cond_destroy
                 U pthread_cond_init
                 U pthread_cond_signal
                 U pthread_cond_wait
                 U pthread_condattr_init
                 U pthread_create
                 U pthread_getspecific
                 U pthread_getthreadid_np
                 U pthread_join
                 U pthread_key_create
                 U pthread_key_delete
                 U pthread_mutex_destroy
                 U pthread_mutex_init
                 U pthread_mutex_lock
                 U pthread_mutex_unlock
                 w pthread_mutexattr_destroy
                 U pthread_mutexattr_init
                 w pthread_mutexattr_settype
                 U pthread_self
                 U pthread_setcancelstate
                 U pthread_setcanceltype
                 U pthread_setspecific

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236581-29464-TSxM4VZWMJ>