Re: [Rdkit-devel] seg faults running tests on a mac

2015-05-16 Thread Greg Landrum
Hi Cyrus,

I'm glad you were able to find something that works. If I had to guess, I
would say that the root cause of all of this was the homebrew version of
python confusing things.

-greg

On Sat, May 16, 2015 at 7:27 PM, Cyrus Harmon  wrote:

> Ok, I think I've solved (or at least worked around) my python woes. The
> following seems to do the trick:
>
> export RDBASE=/Users/sly/projects/rdkit
> export PYTHONPATH=/usr/local/:${RDBASE}:
> export
> DYLD_LIBRARY_PATH=/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources:${RDBASE}/lib:/usr/local/lib:
>
> # running cmake:
> cmake \
>   -D PYTHON_EXECUTABLE=/usr/local/bin/python \
>   -D
> PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Headers
> \
>   -D
> PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
> \
>   ..
>
> # build it
> make -j4
>
> # install
> make install
>
> # test
> ctest
>
>
>
> Now onto the next problem...
>
>
> On Sat, May 16, 2015 at 3:20 PM, Cyrus Harmon 
> wrote:
>
>> Following up on my own message...
>>
>> I noticed that the python executable and python libraries found by cmake
>> don't match. cmake finds the homebrew installed python binary, but the
>> system installed libraries.
>>
>> If I remove the homebrew python I can at least get the tests to pass (but
>> run into problems with various other missing python packages).  A step in
>> the right direction.
>>
>> On Sat, May 16, 2015 at 10:11 AM, Cyrus Harmon 
>> wrote:
>>
>>> Hi Greg,
>>>
>>> Sorry it's been a while since I first reported my troubles on a Mac. I
>>> continue to have problems on my MacBook Pro, but things seem to work fine
>>> on linux for me.
>>>
>>> The problem is that many of the tests fail with a segfault and there
>>> doesn't seem to much information in any of the log files about the problem.
>>> In an effort to figure out what's going on here, I've been trying to run
>>> things under gdb.
>>>
>>> If I run the testBV.py test under gdb I see the following:
>>>
>>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>>> Reason: KERN_INVALID_ADDRESS at address: 0x
>>> 0x0001029e7cb9 in PyInt_FromLong ()
>>> (gdb) bt
>>> #0  0x0001029e7cb9 in PyInt_FromLong ()
>>> #1  0x000102844908 in
>>> boost::python::detail::keywords<1ul>::operator= ()
>>> #2  0x00010284277a in init_module_rdBase ()
>>> #3  0x000102b2f391 in boost::python::handle_exception_impl ()
>>> #4  0x000102b303b9 in boost::python::detail::init_module ()
>>> #5  0x0001000a04ea in _PyImport_LoadDynamicModule ()
>>> #6  0x0001000a01d2 in import_submodule ()
>>> #7  0x00010009fd9c in load_next ()
>>> #8  0x00010009df99 in PyImport_ImportModuleLevel ()
>>> #9  0x000100083459 in builtin___import__ ()
>>> #10 0x0001e3b6 in PyObject_Call ()
>>> #11 0x00010008dd9b in PyEval_CallObjectWithKeywords ()
>>> #12 0x00010008a0b7 in PyEval_EvalFrameEx ()
>>> #13 0x000100087df9 in PyEval_EvalCodeEx ()
>>> #14 0x00010008786f in PyEval_EvalCode ()
>>> #15 0x00010009ca46 in PyImport_ExecCodeModuleEx ()
>>> #16 0x00010009f731 in load_source_module ()
>>> #17 0x00010009f9f2 in load_package ()
>>> #18 0x0001000a01d2 in import_submodule ()
>>> #19 0x00010009fd9c in load_next ()
>>> #20 0x00010009df99 in PyImport_ImportModuleLevel ()
>>> #21 0x000100083459 in builtin___import__ ()
>>> #22 0x0001e3b6 in PyObject_Call ()
>>> #23 0x00010008dd9b in PyEval_CallObjectWithKeywords ()
>>> #24 0x00010008a0b7 in PyEval_EvalFrameEx ()
>>> #25 0x000100087df9 in PyEval_EvalCodeEx ()
>>> #26 0x00010008786f in PyEval_EvalCode ()
>>> #27 0x0001000a7a2a in run_mod ()
>>> #28 0x0001000a7acd in PyRun_FileExFlags ()
>>> #29 0x0001000a766a in PyRun_SimpleFileExFlags ()
>>> #30 0x0001000b8d6f in Py_Main ()
>>> #31 0x7fff947ec5c9 in start ()
>>>
>>> So it looks to me like things are sort of working for a while, but that
>>> somewhere along the line I'm getting a segfault, which may in turn be
>>> triggered by a problem loading a dylib.
>>>
>>> I'm guessing that part of the problem is that there are a lot of moving
>>> parts here:
>>>
>>> 1. RDKIT -- I'm using the latest git head as of today
>>> 2. Python
>>>  a. version 2 or version 3?
>>>- I'm trying to get things working with python2, but python3 would be
>>> nice at some point
>>>  b. system installed, hombrew, or self-installed?
>>>- I'm trying to use the homebrew-installed python2. Perhaps this is a
>>> mistake.
>>> 3. Python libraries (installed via pip)
>>> 4. Homebrew libraries
>>> 5. System libraries
>>> 6. Environment variables
>>> 7. etc...
>>>
>>> What a mess...
>>>
>>> speaking of environment variables, one thing that might be problematic
>>> for me is that I am trying to use the following environment variables:
>>>
>>> export PYTHONPATH=/Users/sly/projects/rdkit/
>>> export RDBASE=/Users/sly/projects/rdkit/
>>> expor

Re: [Rdkit-devel] seg faults running tests on a mac

2015-05-16 Thread Cyrus Harmon
Ok, I think I've solved (or at least worked around) my python woes. The
following seems to do the trick:

export RDBASE=/Users/sly/projects/rdkit
export PYTHONPATH=/usr/local/:${RDBASE}:
export
DYLD_LIBRARY_PATH=/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources:${RDBASE}/lib:/usr/local/lib:

# running cmake:
cmake \
  -D PYTHON_EXECUTABLE=/usr/local/bin/python \
  -D
PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Headers
\
  -D
PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
\
  ..

# build it
make -j4

# install
make install

# test
ctest



Now onto the next problem...


On Sat, May 16, 2015 at 3:20 PM, Cyrus Harmon  wrote:

> Following up on my own message...
>
> I noticed that the python executable and python libraries found by cmake
> don't match. cmake finds the homebrew installed python binary, but the
> system installed libraries.
>
> If I remove the homebrew python I can at least get the tests to pass (but
> run into problems with various other missing python packages).  A step in
> the right direction.
>
> On Sat, May 16, 2015 at 10:11 AM, Cyrus Harmon 
> wrote:
>
>> Hi Greg,
>>
>> Sorry it's been a while since I first reported my troubles on a Mac. I
>> continue to have problems on my MacBook Pro, but things seem to work fine
>> on linux for me.
>>
>> The problem is that many of the tests fail with a segfault and there
>> doesn't seem to much information in any of the log files about the problem.
>> In an effort to figure out what's going on here, I've been trying to run
>> things under gdb.
>>
>> If I run the testBV.py test under gdb I see the following:
>>
>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>> Reason: KERN_INVALID_ADDRESS at address: 0x
>> 0x0001029e7cb9 in PyInt_FromLong ()
>> (gdb) bt
>> #0  0x0001029e7cb9 in PyInt_FromLong ()
>> #1  0x000102844908 in
>> boost::python::detail::keywords<1ul>::operator= ()
>> #2  0x00010284277a in init_module_rdBase ()
>> #3  0x000102b2f391 in boost::python::handle_exception_impl ()
>> #4  0x000102b303b9 in boost::python::detail::init_module ()
>> #5  0x0001000a04ea in _PyImport_LoadDynamicModule ()
>> #6  0x0001000a01d2 in import_submodule ()
>> #7  0x00010009fd9c in load_next ()
>> #8  0x00010009df99 in PyImport_ImportModuleLevel ()
>> #9  0x000100083459 in builtin___import__ ()
>> #10 0x0001e3b6 in PyObject_Call ()
>> #11 0x00010008dd9b in PyEval_CallObjectWithKeywords ()
>> #12 0x00010008a0b7 in PyEval_EvalFrameEx ()
>> #13 0x000100087df9 in PyEval_EvalCodeEx ()
>> #14 0x00010008786f in PyEval_EvalCode ()
>> #15 0x00010009ca46 in PyImport_ExecCodeModuleEx ()
>> #16 0x00010009f731 in load_source_module ()
>> #17 0x00010009f9f2 in load_package ()
>> #18 0x0001000a01d2 in import_submodule ()
>> #19 0x00010009fd9c in load_next ()
>> #20 0x00010009df99 in PyImport_ImportModuleLevel ()
>> #21 0x000100083459 in builtin___import__ ()
>> #22 0x0001e3b6 in PyObject_Call ()
>> #23 0x00010008dd9b in PyEval_CallObjectWithKeywords ()
>> #24 0x00010008a0b7 in PyEval_EvalFrameEx ()
>> #25 0x000100087df9 in PyEval_EvalCodeEx ()
>> #26 0x00010008786f in PyEval_EvalCode ()
>> #27 0x0001000a7a2a in run_mod ()
>> #28 0x0001000a7acd in PyRun_FileExFlags ()
>> #29 0x0001000a766a in PyRun_SimpleFileExFlags ()
>> #30 0x0001000b8d6f in Py_Main ()
>> #31 0x7fff947ec5c9 in start ()
>>
>> So it looks to me like things are sort of working for a while, but that
>> somewhere along the line I'm getting a segfault, which may in turn be
>> triggered by a problem loading a dylib.
>>
>> I'm guessing that part of the problem is that there are a lot of moving
>> parts here:
>>
>> 1. RDKIT -- I'm using the latest git head as of today
>> 2. Python
>>  a. version 2 or version 3?
>>- I'm trying to get things working with python2, but python3 would be
>> nice at some point
>>  b. system installed, hombrew, or self-installed?
>>- I'm trying to use the homebrew-installed python2. Perhaps this is a
>> mistake.
>> 3. Python libraries (installed via pip)
>> 4. Homebrew libraries
>> 5. System libraries
>> 6. Environment variables
>> 7. etc...
>>
>> What a mess...
>>
>> speaking of environment variables, one thing that might be problematic
>> for me is that I am trying to use the following environment variables:
>>
>> export PYTHONPATH=/Users/sly/projects/rdkit/
>> export RDBASE=/Users/sly/projects/rdkit/
>> export
>> DYLD_LIBRARY_PATH=/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources:/Users/sly/projects/rdkit/lib:/usr/local/lib:
>>
>> If I don't add the system ImageIO path, cmake fails with:
>>
>> dyld: Symbol not found: __cg_png_create_info_struct
>>   Referenced from:
>> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
>>   Expected in: /usr/local/lib/libPng.dylib
>>  in /

Re: [Rdkit-devel] seg faults running tests on a mac

2015-05-16 Thread Cyrus Harmon
Following up on my own message...

I noticed that the python executable and python libraries found by cmake
don't match. cmake finds the homebrew installed python binary, but the
system installed libraries.

If I remove the homebrew python I can at least get the tests to pass (but
run into problems with various other missing python packages).  A step in
the right direction.

On Sat, May 16, 2015 at 10:11 AM, Cyrus Harmon 
wrote:

> Hi Greg,
>
> Sorry it's been a while since I first reported my troubles on a Mac. I
> continue to have problems on my MacBook Pro, but things seem to work fine
> on linux for me.
>
> The problem is that many of the tests fail with a segfault and there
> doesn't seem to much information in any of the log files about the problem.
> In an effort to figure out what's going on here, I've been trying to run
> things under gdb.
>
> If I run the testBV.py test under gdb I see the following:
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x
> 0x0001029e7cb9 in PyInt_FromLong ()
> (gdb) bt
> #0  0x0001029e7cb9 in PyInt_FromLong ()
> #1  0x000102844908 in
> boost::python::detail::keywords<1ul>::operator= ()
> #2  0x00010284277a in init_module_rdBase ()
> #3  0x000102b2f391 in boost::python::handle_exception_impl ()
> #4  0x000102b303b9 in boost::python::detail::init_module ()
> #5  0x0001000a04ea in _PyImport_LoadDynamicModule ()
> #6  0x0001000a01d2 in import_submodule ()
> #7  0x00010009fd9c in load_next ()
> #8  0x00010009df99 in PyImport_ImportModuleLevel ()
> #9  0x000100083459 in builtin___import__ ()
> #10 0x0001e3b6 in PyObject_Call ()
> #11 0x00010008dd9b in PyEval_CallObjectWithKeywords ()
> #12 0x00010008a0b7 in PyEval_EvalFrameEx ()
> #13 0x000100087df9 in PyEval_EvalCodeEx ()
> #14 0x00010008786f in PyEval_EvalCode ()
> #15 0x00010009ca46 in PyImport_ExecCodeModuleEx ()
> #16 0x00010009f731 in load_source_module ()
> #17 0x00010009f9f2 in load_package ()
> #18 0x0001000a01d2 in import_submodule ()
> #19 0x00010009fd9c in load_next ()
> #20 0x00010009df99 in PyImport_ImportModuleLevel ()
> #21 0x000100083459 in builtin___import__ ()
> #22 0x0001e3b6 in PyObject_Call ()
> #23 0x00010008dd9b in PyEval_CallObjectWithKeywords ()
> #24 0x00010008a0b7 in PyEval_EvalFrameEx ()
> #25 0x000100087df9 in PyEval_EvalCodeEx ()
> #26 0x00010008786f in PyEval_EvalCode ()
> #27 0x0001000a7a2a in run_mod ()
> #28 0x0001000a7acd in PyRun_FileExFlags ()
> #29 0x0001000a766a in PyRun_SimpleFileExFlags ()
> #30 0x0001000b8d6f in Py_Main ()
> #31 0x7fff947ec5c9 in start ()
>
> So it looks to me like things are sort of working for a while, but that
> somewhere along the line I'm getting a segfault, which may in turn be
> triggered by a problem loading a dylib.
>
> I'm guessing that part of the problem is that there are a lot of moving
> parts here:
>
> 1. RDKIT -- I'm using the latest git head as of today
> 2. Python
>  a. version 2 or version 3?
>- I'm trying to get things working with python2, but python3 would be
> nice at some point
>  b. system installed, hombrew, or self-installed?
>- I'm trying to use the homebrew-installed python2. Perhaps this is a
> mistake.
> 3. Python libraries (installed via pip)
> 4. Homebrew libraries
> 5. System libraries
> 6. Environment variables
> 7. etc...
>
> What a mess...
>
> speaking of environment variables, one thing that might be problematic for
> me is that I am trying to use the following environment variables:
>
> export PYTHONPATH=/Users/sly/projects/rdkit/
> export RDBASE=/Users/sly/projects/rdkit/
> export
> DYLD_LIBRARY_PATH=/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources:/Users/sly/projects/rdkit/lib:/usr/local/lib:
>
> If I don't add the system ImageIO path, cmake fails with:
>
> dyld: Symbol not found: __cg_png_create_info_struct
>   Referenced from:
> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
>   Expected in: /usr/local/lib/libPng.dylib
>  in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
>
> Adding that to DYLD_LIBRARY_PATH at least gets things to build and has
> some tests running.
>
> Happy to provide more info if that will help figure out what's going on
> here.
>
> thanks,
>
> Cyrus
>
> p.s. sorry about the duplicate subscription and sending this from
> not-my-normal-email account, but I'm having travel-based connectivity
> issues.
>
>
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y

[Rdkit-devel] seg faults running tests on a mac

2015-05-16 Thread Cyrus Harmon
Hi Greg,

Sorry it's been a while since I first reported my troubles on a Mac. I
continue to have problems on my MacBook Pro, but things seem to work fine
on linux for me.

The problem is that many of the tests fail with a segfault and there
doesn't seem to much information in any of the log files about the problem.
In an effort to figure out what's going on here, I've been trying to run
things under gdb.

If I run the testBV.py test under gdb I see the following:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x
0x0001029e7cb9 in PyInt_FromLong ()
(gdb) bt
#0  0x0001029e7cb9 in PyInt_FromLong ()
#1  0x000102844908 in
boost::python::detail::keywords<1ul>::operator= ()
#2  0x00010284277a in init_module_rdBase ()
#3  0x000102b2f391 in boost::python::handle_exception_impl ()
#4  0x000102b303b9 in boost::python::detail::init_module ()
#5  0x0001000a04ea in _PyImport_LoadDynamicModule ()
#6  0x0001000a01d2 in import_submodule ()
#7  0x00010009fd9c in load_next ()
#8  0x00010009df99 in PyImport_ImportModuleLevel ()
#9  0x000100083459 in builtin___import__ ()
#10 0x0001e3b6 in PyObject_Call ()
#11 0x00010008dd9b in PyEval_CallObjectWithKeywords ()
#12 0x00010008a0b7 in PyEval_EvalFrameEx ()
#13 0x000100087df9 in PyEval_EvalCodeEx ()
#14 0x00010008786f in PyEval_EvalCode ()
#15 0x00010009ca46 in PyImport_ExecCodeModuleEx ()
#16 0x00010009f731 in load_source_module ()
#17 0x00010009f9f2 in load_package ()
#18 0x0001000a01d2 in import_submodule ()
#19 0x00010009fd9c in load_next ()
#20 0x00010009df99 in PyImport_ImportModuleLevel ()
#21 0x000100083459 in builtin___import__ ()
#22 0x0001e3b6 in PyObject_Call ()
#23 0x00010008dd9b in PyEval_CallObjectWithKeywords ()
#24 0x00010008a0b7 in PyEval_EvalFrameEx ()
#25 0x000100087df9 in PyEval_EvalCodeEx ()
#26 0x00010008786f in PyEval_EvalCode ()
#27 0x0001000a7a2a in run_mod ()
#28 0x0001000a7acd in PyRun_FileExFlags ()
#29 0x0001000a766a in PyRun_SimpleFileExFlags ()
#30 0x0001000b8d6f in Py_Main ()
#31 0x7fff947ec5c9 in start ()

So it looks to me like things are sort of working for a while, but that
somewhere along the line I'm getting a segfault, which may in turn be
triggered by a problem loading a dylib.

I'm guessing that part of the problem is that there are a lot of moving
parts here:

1. RDKIT -- I'm using the latest git head as of today
2. Python
 a. version 2 or version 3?
   - I'm trying to get things working with python2, but python3 would be
nice at some point
 b. system installed, hombrew, or self-installed?
   - I'm trying to use the homebrew-installed python2. Perhaps this is a
mistake.
3. Python libraries (installed via pip)
4. Homebrew libraries
5. System libraries
6. Environment variables
7. etc...

What a mess...

speaking of environment variables, one thing that might be problematic for
me is that I am trying to use the following environment variables:

export PYTHONPATH=/Users/sly/projects/rdkit/
export RDBASE=/Users/sly/projects/rdkit/
export
DYLD_LIBRARY_PATH=/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources:/Users/sly/projects/rdkit/lib:/usr/local/lib:

If I don't add the system ImageIO path, cmake fails with:

dyld: Symbol not found: __cg_png_create_info_struct
  Referenced from:
/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libPng.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

Adding that to DYLD_LIBRARY_PATH at least gets things to build and has some
tests running.

Happy to provide more info if that will help figure out what's going on
here.

thanks,

Cyrus

p.s. sorry about the duplicate subscription and sending this from
not-my-normal-email account, but I'm having travel-based connectivity
issues.
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Rdkit-devel mailing list
Rdkit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-devel