[C++-sig] Python Binding woes for BGL with Intel Compiler

Hi, I am unable to use python bindings for boost.graph. Python gives "undefined symbol" error signifying it cannot correctly load the shared libraries. I am clueless because the problem appears for intel compiler on linux but not with gcc compiler on linux. So in all likelihood I am not making rookie mistakes. So my larger question is Boost library supported for compilers other than gcc. I ask this question because few months back my concerns regarding intel compiler found no audience. Would appreciate some response. thanks, sandeep

On Aug 25, 2008, at 1:15 PM, Sandeep Gupta wrote:
Hi, I am unable to use python bindings for boost.graph. Python gives "undefined symbol" error signifying it cannot correctly load the shared libraries. I am clueless because the problem appears for intel compiler on linux but not with gcc compiler on linux. So in all likelihood I am not making rookie mistakes.
I have no idea what might be happening here :(
So my larger question is Boost library supported for compilers other than gcc. I ask this question because few months back my concerns regarding intel compiler found no audience.
The Intel compilers aren't as widely used by the Boost community as GCC, so there are likely to be more problems. That said, we do test with the Intel compilers and most problems get resolved eventually. - Doug

Thanks so much for the clarification, Doug. So my fear stand corrected. Intel compilers are marginalized. Not that there is anything wrong with that, but the documentation (especially bjam's) give the impression that boost can cover all major platforms. The reality however shows a different picture. If you have suggestion on how to approach this problem please do let me know. -Sandeep On Mon, Aug 25, 2008 at 10:35 AM, Doug Gregor <dgregor@osl.iu.edu> wrote:
On Aug 25, 2008, at 1:15 PM, Sandeep Gupta wrote:
Hi,
I am unable to use python bindings for boost.graph. Python gives "undefined symbol" error signifying it cannot correctly load the shared libraries. I am clueless because the problem appears for intel compiler on linux but not with gcc compiler on linux. So in all likelihood I am not making rookie mistakes.
I have no idea what might be happening here :(
So my larger question is Boost library supported for compilers other than gcc. I ask this question because few months back my concerns regarding intel compiler found no audience.
The Intel compilers aren't as widely used by the Boost community as GCC, so there are likely to be more problems. That said, we do test with the Intel compilers and most problems get resolved eventually.
- Doug _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Aug 25, 2008, at 1:53 PM, Sandeep Gupta wrote:
Thanks so much for the clarification, Doug.
So my fear stand corrected. Intel compilers are marginalized. Not that there is anything wrong with that, but the documentation (especially bjam's) give the impression that boost can cover all major platforms. The reality however shows a different picture.
If you have suggestion on how to approach this problem please do let me know.
Boost is an organization of volunteers. When many volunteers are interested in making Boost work well with a compiler or platform, it will work well there. Historically, there hasn't been all that much interest in Intel's compiler on Linux, and support for it has suffered. The way to improve the situation is to get more interest in this compiler, which may involving recruiting more volunteers and may involve submitting patches to fix problems as they come up. - Doug

on Mon Aug 25 2008, "Sandeep Gupta" <gupta.sandeep-AT-gmail.com> wrote:
Thanks so much for the clarification, Doug.
So my fear stand corrected. Intel compilers are marginalized. Not that there is anything wrong with that, but the documentation (especially bjam's) give the impression that boost can cover all major platforms. The reality however shows a different picture.
If you have suggestion on how to approach this problem please do let me know.
How about posting more detail about what you actually did and the error you actually got? Based on what you've told us so far, I wouldn't jump to the conclusion that it's an Intel compatibility problem. -- Dave Abrahams BoostPro Computing http://www.boostpro.com

Hi David, I hope its not a compatability issue. Here are the steps I followed 1. Downloaded python source and compiled with intel compiler. 2. Downloaded boost 1.36 and checkout bgl_python from svn repository of osl.iu.edu. 3. Followed the instructions for building/installing boost, boost.python, and bgl_python. 4. The tests under examples under libs/python/example/ pass. 5. Firedup python and issued command "import boost.graph as bgl". This line fails with error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "...../bgl-python/lib/python/boost/graph/__init__.py", line 16, in <module> from boost.graph._graph import * ImportError: "...../bgl-python/lib/python/boost/graph/_graph.so: undefined symbol: _ZN5boost5graph6python11basic_graphINS_11undirectedSEED1Ev" 5. Tried several permutation/combination of LD_LIBRARY_PATH and sys.path.append('.. ') but with no success. I also tried with bgl_python in the sandbox and the same issue shows up. Thanks sandeep On Mon, Aug 25, 2008 at 12:20 PM, David Abrahams <dave@boostpro.com> wrote:
on Mon Aug 25 2008, "Sandeep Gupta" <gupta.sandeep-AT-gmail.com> wrote:
Thanks so much for the clarification, Doug.
So my fear stand corrected. Intel compilers are marginalized. Not that there is anything wrong with that, but the documentation (especially bjam's) give the impression that boost can cover all major platforms. The reality however shows a different picture.
If you have suggestion on how to approach this problem please do let me know.
How about posting more detail about what you actually did and the error you actually got? Based on what you've told us so far, I wouldn't jump to the conclusion that it's an Intel compatibility problem.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

on Mon Aug 25 2008, "Sandeep Gupta" <gupta.sandeep-AT-gmail.com> wrote:
Hi David, I hope its not a compatability issue. Here are the steps I followed
1. Downloaded python source and compiled with intel compiler.
2. Downloaded boost 1.36 and checkout bgl_python from svn repository of osl.iu.edu.
3. Followed the instructions for building/installing boost, boost.python, and bgl_python.
4. The tests under examples under libs/python/example/ pass.
What about the bgl_python tests?
5. Firedup python and issued command "import boost.graph as bgl". This line fails with error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "...../bgl-python/lib/python/boost/graph/__init__.py", line 16, in <module> from boost.graph._graph import * ImportError: "...../bgl-python/lib/python/boost/graph/_graph.so: undefined symbol: _ZN5boost5graph6python11basic_graphINS_11undirectedSEED1Ev"
$ echo '_ZN5boost5graph6python11basic_graphINS_11undirectedSEED1Ev' | c++filt boost::graph::python::basic_graph<boost::undirectedS>::~basic_graph()
From what I can tell, it looks like Intel is failing to instantiate that destructor for some reason. You might try adding an explicit instantiation. In any case, it looks like a compiler bug to me.
5. Tried several permutation/combination of LD_LIBRARY_PATH and sys.path.append('.. ') but with no success.
I also tried with bgl_python in the sandbox and the same issue shows up.
Hmm, I dunno. Another thing worth doing: try it with g++ and see if it works. -- Dave Abrahams BoostPro Computing http://www.boostpro.com

Works fine with g++. I don't think bgl_python comes with test_suite. I followed your direction and added explicit destructor for basic_graph. The old error is now gone but python now complains about: boost::graph::python::basic_graph<boost::undirectedS>::remove_edge(boost::graph::python::basic_descriptor<boost::detail::edge_desc_impl<boost::undirected_tag, void*>, boost::undirectedS>) (thanks for the cool c++filt tip). I hope this helps to narrow down the problem. Should I go ahead and explicitly define all the missing routines? (* On slightly unrelated note: compiler complains when I add ~basic_graph<undirectedS>::~basic_graph() with error "function "boost::graph::python::basic_graph<DirectedS>::~basic_graph" has already been defined". However I find strange that Graph::~basic_graph() where Graph is typedefed as basic_graph<undirectedS> as acceptable.) On Mon, Aug 25, 2008 at 1:46 PM, David Abrahams <dave@boostpro.com> wrote:
on Mon Aug 25 2008, "Sandeep Gupta" <gupta.sandeep-AT-gmail.com> wrote:
Hi David, I hope its not a compatability issue. Here are the steps I followed
1. Downloaded python source and compiled with intel compiler.
2. Downloaded boost 1.36 and checkout bgl_python from svn repository of osl.iu.edu.
3. Followed the instructions for building/installing boost, boost.python, and bgl_python.
4. The tests under examples under libs/python/example/ pass.
What about the bgl_python tests?
5. Firedup python and issued command "import boost.graph as bgl". This line fails with error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "...../bgl-python/lib/python/boost/graph/__init__.py", line 16, in <module> from boost.graph._graph import * ImportError: "...../bgl-python/lib/python/boost/graph/_graph.so: undefined symbol: _ZN5boost5graph6python11basic_graphINS_11undirectedSEED1Ev"
$ echo '_ZN5boost5graph6python11basic_graphINS_11undirectedSEED1Ev' | c++filt boost::graph::python::basic_graph<boost::undirectedS>::~basic_graph()
From what I can tell, it looks like Intel is failing to instantiate that destructor for some reason. You might try adding an explicit instantiation. In any case, it looks like a compiler bug to me.
5. Tried several permutation/combination of LD_LIBRARY_PATH and sys.path.append('.. ') but with no success.
I also tried with bgl_python in the sandbox and the same issue shows up.
Hmm, I dunno. Another thing worth doing: try it with g++ and see if it works.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

David Abrahams wrote:
From what I can tell, it looks like Intel is failing to instantiate that destructor for some reason. You might try adding an explicit instantiation. In any case, it looks like a compiler bug to me.
If it does turn out to be a compiler bug, it will be very helpful for Sandeep to submit a bug report to Intel. The compiler folks there take bug reports regarding Boost libraries very seriously, and have someone assigned to follow up as needed. At least for their Windows compiler, the Intel folks are relatively speedy about getting out updates, too. --Beman
participants (4)
-
Beman Dawes
-
David Abrahams
-
Doug Gregor
-
Sandeep Gupta