ImportError when compiling debug version

Bug #1234682 reported by Reza Housseini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Undecided
Unassigned

Bug Description

When compiling with the DEBUG=ON flag, I get the following error when launching yade:

File "./yade-2013-10-01.git-e7840c4", line 121, in <module>
    import yade
  File "/home/jaeg/code/yade/install/debug/lib/x86_64-linux-gnu/yade-2013-10-01.git-e7840c4/py/yade/__init__.py", line 65, in <module>
    import boot
ImportError: /home/jaeg/code/yade/install/debug/lib/x86_64-linux-gnu/yade-2013-10-01.git-e7840c4/libyade.so: undefined symbol: omp_get_max_threads

I explicitly added the -fopenmp flag and enabled OpenMP.

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1234682] [NEW] ImportError when compiling debug version

2013/10/3 Reza Housseini <email address hidden>:
> ImportError: /home/jaeg/code/yade/install/debug/lib/x86_64-linux-gnu/yade-2013-10-01.git-e7840c4/libyade.so: undefined symbol: omp_get_max_threads
>
> I explicitly added the -fopenmp flag and enabled OpenMP.

What you mean here?

If your compiler supports OpenMP, all necessary flags should be added
"automatically" through OpenMP_CXX_FLAGS variable [1]. You do not
need to add -fopenmp explicitly.

Need to look at the cmake-output from configuration-step. It should
definitely say you, what is missed.

[1] https://github.com/yade/trunk/blob/master/CMakeLists.txt#L126

Revision history for this message
Reza Housseini (reza-housseini-3) wrote :

That is the strange thing. My cmake output says it's there:

-- Found Qt4: /usr/bin/qmake (found version "4.8.1")
-- Version is set to 2013-10-01.git-e7840c4
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Boost_VERSION: 104601
-- Boost_LIB_VERSION: 1_46_1
-- Boost_INCLUDE_DIRS: /usr/include
-- Boost_LIBRARIES: /usr/lib/libboost_python.so/usr/lib/libboost_thread-mt.so/usr/lib/libboost_date_time-mt.so/usr/lib/libboost_filesystem-mt.so/usr/lib/libboost_iostreams-mt.so/usr/lib/libboost_regex-mt.so/usr/lib/libboost_serialization-mt.so
-- Found Eigen3
-- Found VTK
-- Found OpenMP
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Found GTS
-- Found Qt4: /usr/bin/qmake (found version "4.8.1")
-- Found QGLViewer: /usr/lib/x86_64-linux-gnu/libqglviewer-qt4.so
-- Found GUI-LIBS
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found CGAL
-- Found Cholmod
-- Found OpenBlas
-- Found Metis
-- Found GL2PS
Yade will be installed to /home/jaeg/code/yade/install/debug
-- Suffix is set to -2013-10-01.git-e7840c4
-- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu
-- runtimePREFIX is set to /home/jaeg/code/yade/install/debug
-- Use system gts version
-- Use system minieigen version
-- ===========================================================
-- Yade configured with following features: Eigen3 VTK OpenMP GTS GUI CGAL PFVflow LinSolv GL2PS
-- Disabled features:
-- Debug build
-- ===========================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jaeg/code/yade/build/debug

Building the release version with openmp is no problem.

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1234682] Re: ImportError when compiling debug version

What operating system do you use? What do you type düring "cmake-step"?
Please, attach CmakaCache.txt, which is in your build-directory.

Anton

2013/10/4 Reza Housseini <email address hidden>:
> That is the strange thing. My cmake output says it's there:
>
> -- Found Qt4: /usr/bin/qmake (found version "4.8.1")
> -- Version is set to 2013-10-01.git-e7840c4
> -- GTS using gts-config /usr/bin/gts-config
> -- Using GTS from /usr
> -- Boost_VERSION: 104601
> -- Boost_LIB_VERSION: 1_46_1
> -- Boost_INCLUDE_DIRS: /usr/include
> -- Boost_LIBRARIES: /usr/lib/libboost_python.so/usr/lib/libboost_thread-mt.so/usr/lib/libboost_date_time-mt.so/usr/lib/libboost_filesystem-mt.so/usr/lib/libboost_iostreams-mt.so/usr/lib/libboost_regex-mt.so/usr/lib/libboost_serialization-mt.so
> -- Found Eigen3
> -- Found VTK
> -- Found OpenMP
> -- GTS using gts-config /usr/bin/gts-config
> -- Using GTS from /usr
> -- Found GTS
> -- Found Qt4: /usr/bin/qmake (found version "4.8.1")
> -- Found QGLViewer: /usr/lib/x86_64-linux-gnu/libqglviewer-qt4.so
> -- Found GUI-LIBS
> -- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
> -- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
> -- Found CGAL
> -- Found Cholmod
> -- Found OpenBlas
> -- Found Metis
> -- Found GL2PS
> Yade will be installed to /home/jaeg/code/yade/install/debug
> -- Suffix is set to -2013-10-01.git-e7840c4
> -- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu
> -- runtimePREFIX is set to /home/jaeg/code/yade/install/debug
> -- Use system gts version
> -- Use system minieigen version
> -- ===========================================================
> -- Yade configured with following features: Eigen3 VTK OpenMP GTS GUI CGAL PFVflow LinSolv GL2PS
> -- Disabled features:
> -- Debug build
> -- ===========================================================
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/jaeg/code/yade/build/debug
>
> Building the release version with openmp is no problem.
>
> --
> You received this bug notification because you are subscribed to Yade.
> https://bugs.launchpad.net/bugs/1234682
>
> Title:
> ImportError when compiling debug version
>
> Status in Yet Another Dynamic Engine:
> New
>
> Bug description:
> When compiling with the DEBUG=ON flag, I get the following error when
> launching yade:
>
> File "./yade-2013-10-01.git-e7840c4", line 121, in <module>
> import yade
> File "/home/jaeg/code/yade/install/debug/lib/x86_64-linux-gnu/yade-2013-10-01.git-e7840c4/py/yade/__init__.py", line 65, in <module>
> import boot
> ImportError: /home/jaeg/code/yade/install/debug/lib/x86_64-linux-gnu/yade-2013-10-01.git-e7840c4/libyade.so: undefined symbol: omp_get_max_threads
>
> I explicitly added the -fopenmp flag and enabled OpenMP.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/yade/+bug/1234682/+subscriptions

Revision history for this message
Reza Housseini (reza-housseini-3) wrote :

I'm on Ubuntu. What do you mean with cmake-step?
Attached is my CMakeCache.txt

Reza

Revision history for this message
Reza Housseini (reza-housseini-3) wrote :

With a new checkout the problem didn't persist, therefore it's probably gone.

Changed in yade:
status: New → Fix Committed
Changed in yade:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.