This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OpenMP and shared libraries


This is bad. I had a similar problem a while ago. I made a python
extension in c++ and I wrapped it with swig. When I wanted to compile
my extension with profiling support, (for profile guided
optimization), the python interpreter gave me a similar error, ie
undefined symbols in the shared library.

Any fixes?

On Wed, Jun 17, 2009 at 5:43 AM, Bob Deblier<bob.deblier@telenet.be> wrote:
> Dear,
>
> I'm experimenting with OpenMP support in the BeeCrypt crypto library, and have encountered a problem.
>
> When I build a shared library with OpenMP support, and this library is loaded from Python, I get the following error (undefined symbols from the GOMP library):
>
> bob@orion ~/beecrypt/python $ make check
> Making check in test
> make[1]: Entering directory `/home/bob/beecrypt/python/test'
> PYTHONPATH="..:../.libs/" python test_all.py verbose
> Traceback (most recent call last):
> ?File "test_all.py", line 58, in <module>
> ? ?print_versions()
> ?File "test_all.py", line 19, in print_versions
> ? ?from _bc import mpw
> ImportError: /home/bob/beecrypt/.libs/libbeecrypt.so.7: undefined symbol: GOMP_parallel_sections_start
> make[1]: *** [check] Error 1
> make[1]: Leaving directory `/home/bob/beecrypt/python/test'
> make: *** [check-recursive] Error 1
>
> I guess this means that it's not possible to use a shared library with OpenMP support in an application (i.e. python) that wasn't linked with -fopenmp?
>
> I'm using gcc 4.3.3, by the way.
>
> Sincerely,
>
> Bob Deblier
>
>
>



-- 
Rohit Garg

http://rpg-314.blogspot.com/

Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]