Problem with new plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with new plugin

Joaquin Peralta
Hello,

I have been working in a format for openbabel. I change the files neccesary to compile, like the developers suggest here http://openbabel.org/docs/2.3.1/WritePlugins/AddFileFormat.html

I can compile and install my plugin.

However, the format is not available running with : babel -H XXX

What could be the problem?

Any help is welcome.

Best Regards
Joaquin Peralta

--
Joaquín Peralta C.
Postdoctoral Research Associate
Materials Science and Engineering
Iowa State University
3326 Hoover Hall
Ames, IA 50011
Phone Lab: <a href="tel:515-294-9547" value="+15152949547" target="_blank">515-294-9547

http://www.lpmd.cl/jperalta
http://www.gnm.cl
-----------------------------------------------
In a world without frontiers,
who needs Gates and Windows?.


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with new plugin

Reinis Danne
Pk, 2012-09-14 14:44 -0500, joaquin peralta rakstīja:

> Hello,
>
>
> I have been working in a format for openbabel. I change the files
> neccesary to compile, like the developers suggest
> here http://openbabel.org/docs/2.3.1/WritePlugins/AddFileFormat.html
>
>
> I can compile and install my plugin.
>
>
> However, the format is not available running with : babel -H XXX
>
>
> What could be the problem?
>
>
> Any help is welcome.
>
>
> Best Regards
> Joaquin Peralta

Have you multiple installations on your system and babel is picking up
other one? Try setting environment variables for the path to your
plugin:
http://openbabel.org/docs/dev/Installation/install.html#troubleshooting-build-problems


Reinis


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with new plugin

Joaquin Peralta
Hello,

Thanks very much for the answer but the problem looks worse now :( ... I assign the environment variable, but still there. 

I don't have any other version of openbabel in the system, and I'm using the last subversion. My Os is ubuntu 12.04 and g++ versin is 4.6.3. I'm installing in my home folder, and the PATH are well defined.

I attached a file with all the detail, because is to much to put it in the e-mail (and probably unnecessary).

Any hint about this segfault ?

Thanks for your time.

Regards
Joaquin Peralta

On Fri, Sep 14, 2012 at 4:03 PM, My Th <[hidden email]> wrote:
Pk, 2012-09-14 14:44 -0500, joaquin peralta rakstīja:
> Hello,
>
>
> I have been working in a format for openbabel. I change the files
> neccesary to compile, like the developers suggest
> here http://openbabel.org/docs/2.3.1/WritePlugins/AddFileFormat.html
>
>
> I can compile and install my plugin.
>
>
> However, the format is not available running with : babel -H XXX
>
>
> What could be the problem?
>
>
> Any help is welcome.
>
>
> Best Regards
> Joaquin Peralta

Have you multiple installations on your system and babel is picking up
other one? Try setting environment variables for the path to your
plugin:
http://openbabel.org/docs/dev/Installation/install.html#troubleshooting-build-problems


Reinis


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



--
Joaquín Peralta C.
Postdoctoral Research Associate
Materials Science and Engineering
Iowa State University
3326 Hoover Hall
Ames, IA 50011
Phone Lab: 515-294-9547

http://www.lpmd.cl/jperalta
http://www.gnm.cl
-----------------------------------------------
In a world without frontiers,
who needs Gates and Windows?.


------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

ob-segfault.pdf (45K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with new plugin

Reinis Danne
Pk, 2012-09-14 17:17 -0500, joaquin peralta rakstīja:
> Hello,

>
> Thanks very much for the answer but the problem looks worse now :( ...
> I assign the environment variable, but still there.
>
>
> I don't have any other version of openbabel in the system, and I'm
> using the last subversion. My Os is ubuntu 12.04 and g++ versin is
> 4.6.3. I'm installing in my home folder, and the PATH are well
> defined.
>
>
> I attached a file with all the detail, because is to much to put it in
> the e-mail (and probably unnecessary).

It is ok to put that much into the email.

> Any hint about this segfault ?

Try cleaning the build dir and recompile without installing:
make clean ; make

and then try to run it from your build dir setting environment
appropriately.

Did you try also setting LD_LIBRARY_PATH to point to were
libopenbabel.so is located? In general you need to set all three
variables mentioned in the docs and make sure you are running babel
binary you just compiled.

If still getting segfault try compiling with debug symbols and getting
backtrace using gdb:
gdb bin/babel core-file
(gdb) bt full

Posting your code would make much easier to help.


Reinis


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with new plugin

Joaquin Peralta
Hello,

Before I put all the text, just allow me to explain :

I'm not compiling with my plugin, it is just a clean svn version. I tried with make clean and make and the problem still, I just set all environment variables and the problem still. 

The problem is running : babel -H (that single command send me a segfault) so I did this with gdb :

===================================================================================
jperaltac@baco:~/buildob$ gdb "/home/jperaltac/local/bin/babel"
..........
Reading symbols from /home/jperaltac/local/bin/babel...done.
(gdb) run -H
Starting program: /home/jperaltac/local/bin/babel -H
Open Babel converts chemical structures from one file format to another

Usage: babel <input spec> <output spec> [Options]

Each spec can be a file whose extension decides the format.
Optionally the format can be specified by preceding the file by
-i<format-type> e.g. -icml, for input and -o<format-type> for output

See below for available format-types, which are the same as the 
file extensions and are case independent.
If no input or output file is given stdin or stdout are used instead.

More than one input file can be specified and their names can contain
wildcard chars (* and ?).The molecules are aggregated in the output file.

Conversion options
-f <#> Start import at molecule # specified
-l <#> End import at molecule # specified
-e Continue with next object after error, if possible
-z Compress the output with gzip
-k Attempt to translate keywords
-H Outputs this help text
-V Outputs version number
-L <category> Lists plugin classes of this category, e.g. <formats>
   Use just -L for a list of plugin categories.
   Use -L <ID> e.g. -L sdf for details of a format or other plugin.
-m Produces multiple output files, to allow:
   Splitting: e.g.        babel infile.mol new.smi -m
     puts each molecule into new1.smi new2.smi etc
   Batch conversion: e.g. babel *.mol -osmi -m
     converts each input file to a .smi file

Program received signal SIGSEGV, Segmentation fault.
0x000000000040769f in std::vector<std::string, std::allocator<std::string> >::max_size (this=0x7fffff7ff130) at /usr/include/c++/4.6/bits/stl_vector.h:576
576      { return _M_get_Tp_allocator().max_size(); }
(gdb) 

===================================================================================

then looking with 'where' in gdb I have :

===================================================================================

#0  0x000000000040769f in std::vector<std::string, std::allocator<std::string> >::max_size (this=0x7fffff7ff130) at /usr/include/c++/4.6/bits/stl_vector.h:576
#1  0x00000000004072c9 in std::vector<std::string, std::allocator<std::string> >::_M_check_len (this=0x7fffff7ff130, __n=1, __s=0x4083da "vector::_M_insert_aux")
    at /usr/include/c++/4.6/bits/stl_vector.h:1241
#2  0x0000000000406d43 in std::vector<std::string, std::allocator<std::string> >::_M_insert_aux (this=0x7fffff7ff130, __position=..., __x=...) at /usr/include/c++/4.6/bits/vector.tcc:325
#3  0x000000000040694a in std::vector<std::string, std::allocator<std::string> >::push_back (this=0x7fffff7ff130, __x=...) at /usr/include/c++/4.6/bits/stl_vector.h:834
#4  0x00007ffff7704c33 in DLHandler::findFiles (file_list=..., pattern=..., path=...) at /home/jperaltac/Projects/openbabel/src/dlhandler_unix.cpp:82
#5  0x00007ffff76c1fc4 in OpenBabel::OBPlugin::LoadAllPlugins () at /home/jperaltac/Projects/openbabel/src/plugin.cpp:61
#6  0x00007ffff76c1ed6 in OpenBabel::OBPlugin::GetTypeMap (PluginID=0x7ffff7762d07 "loaders") at /home/jperaltac/Projects/openbabel/src/plugin.cpp:34
#7  0x00007ffff76c23b9 in OpenBabel::OBPlugin::GetPlugin (Type=0x7ffff7762d07 "loaders", ID=0x7ffff7762d00 "define") at /home/jperaltac/Projects/openbabel/src/plugin.cpp:110
#8  0x00007ffff76c207b in OpenBabel::OBPlugin::LoadAllPlugins () at /home/jperaltac/Projects/openbabel/src/plugin.cpp:80

... The lines #6,#7, and #8 are repeated a lot after that ...
===================================================================================

Now the document that I attahced before about the process :

===================================================================================
My installation process from svn.

jperaltac@baco:~/Projects/openbabel$ sudo find / -iname "abinitformat.so" 
jperaltac@baco:~/Projects/openbabel$ svn st 
?       test/files/prueba.xyz 
?       test/files/Au.lpmd 
A       src/formats/lpmdformat.cpp 
jperaltac@baco:~/Projects/openbabel$ svn up 
At revision 5011. 
jperaltac@baco:~/Projects/openbabel$ 

Compiling

jperaltac@baco:~/Projects/openbabel$ export BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/ 
jperaltac@baco:~/Projects/openbabel$

Then
jperaltac@baco:~/Projects/openbabel$ cd ~/buildob/ 
jperaltac@baco:~/buildob$ ls 
jperaltac@baco:~/buildob$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/jperaltac/local/ ~/Projects/openbabel/ 
-- The C compiler identification is GNU 
-- The CXX compiler identification is GNU 
-- Check for working C compiler: /usr/bin/gcc 
-- Check for working C compiler: /usr/bin/gcc -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Check for working CXX compiler: /usr/bin/c++ 
-- Check for working CXX compiler: /usr/bin/c++ -- works 
-- Detecting CXX compiler ABI info 
-- Detecting CXX compiler ABI info - done 
-- Using included inchi library. 
-- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) 
CMake Warning at CMakeLists.txt:152 (message): 
  libxml2 not found - disabling CML support! 


-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.3.4") 
-- Could NOT find wxWidgets (missing:  wxWidgets_FOUND) 
-- Looking for conio.h 
-- Looking for conio.h - not found 
-- Looking for sys/time.h 
-- Looking for sys/time.h - found 
-- Looking for time.h 
-- Looking for time.h - found 
-- Looking for strings.h 
-- Looking for strings.h - found 
-- Looking for rpc/xdr.h 
-- Looking for rpc/xdr.h - found 
-- Looking for regex.h 
-- Looking for regex.h - found 
-- Looking for C++ include sstream 
-- Looking for C++ include sstream - found 
-- Looking for rint 
-- Looking for rint - not found. 
-- Looking for snprintf 
-- Looking for snprintf - found 
-- Looking for sranddev 
-- Looking for sranddev - not found. 
-- Looking for strcasecmp 
-- Looking for strcasecmp - found 
-- Looking for strncasecmp 
-- Looking for strncasecmp - found 
-- Looking for dlopen in dl 
-- Looking for dlopen in dl - found 
-- Looking for sys/types.h 
-- Looking for sys/types.h - found 
-- Looking for stdint.h 
-- Looking for stdint.h - found 
-- Looking for stddef.h 
-- Looking for stddef.h - found 
-- Check size of clock_t 
-- Check size of clock_t - done 
-- Performing Test SCANDIR_NEEDS_CONST 
-- Performing Test SCANDIR_NEEDS_CONST - Failed 
-- Performing Test HAVE_GCC_VISIBILITY 
-- Performing Test HAVE_GCC_VISIBILITY - Success 
-- Could NOT find Eigen3 (missing:  EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) (Required is at least version "2.91.0") 
-- Could NOT find Eigen2 (missing:  EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK) (Required is at least version "2.0.0") 
-- checking for module 'cairo' 
--   package 'cairo' not found 
-- Could NOT find Cairo. PNG output will NOT be supported. 
-- Looking for getopt 
-- Looking for getopt - found 
-- Attempting to build the GUI 
--    wxWidgets not found => GUI will not be built 
-- Found PythonInterp: /usr/bin/python (found version "2.7.3") 
-- Configuring done 
-- Generating done 
-- Build files have been written to: /home/jperaltac/buildob 

Compiling

make ; make instal

Work finw without error message nor suspissious warnings. Then :

jperaltac@baco:~/buildob$ babel 
No output file or format spec! 
Open Babel 2.3.2 -- Sep 14 2012 -- 17:07:39 
Usage: babel [-i<input-type>] <name> [-o<output-type>] <name> 
Try  -H option for more information. 
jperaltac@baco:~/buildob$ babel -H 
Open Babel converts chemical structures from one file format to another 

Usage: babel <input spec> <output spec> [Options] 

Each spec can be a file whose extension decides the format. 
Optionally the format can be specified by preceding the file by 
-i<format-type> e.g. -icml, for input and -o<format-type> for output 

See below for available format-types, which are the same as the 
file extensions and are case independent. 
If no input or output file is given stdin or stdout are used instead. 

More than one input file can be specified and their names can contain 
wildcard chars (* and ?).The molecules are aggregated in the output file. 

Conversion options 
-f <#> Start import at molecule # specified 
-l <#> End import at molecule # specified 
-e Continue with next object after error, if possible 
-z Compress the output with gzip 
-k Attempt to translate keywords 
-H Outputs this help text 
-V Outputs version number 
-L <category> Lists plugin classes of this category, e.g. <formats> 
   Use just -L for a list of plugin categories. 
   Use -L <ID> e.g. -L sdf for details of a format or other plugin. 
-m Produces multiple output files, to allow: 
   Splitting: e.g.        babel infile.mol new.smi -m 
     puts each molecule into new1.smi new2.smi etc 
   Batch conversion: e.g. babel *.mol -osmi -m 
     converts each input file to a .smi file 
Segmentation fault (core dumped) 
jperaltac@baco:~/buildob$ 

Looks like somethings is wrong here, I don't know why the segmentation fault!. Any hint now with this ?

And my environments variables :

jperaltac@baco:~/buildob$ env | grep bab 
BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/ 
OLDPWD=/home/jperaltac/Projects/openbabel 
jperaltac@baco:~/buildob$ 

Finallym the valgrind output :

==1485== Stack overflow in thread 1: can't grow stack to 0x7fe801ff8 
==1485== 
==1485== Process terminating with default action of signal 11 (SIGSEGV) 
==1485==  Access not within mapped region at address 0x7FE801FF8 
==1485==    at 0x40790A: std::string* std::__uninitialized_copy<false>::__uninit_copy<std::string*, std::string*>(std::string*, std::string*, std::string*) (stl_uninitialized.h:70) 
==1485==  If you believe this happened as a result of a stack 
==1485==  overflow in your program's main thread (unlikely but 
==1485==  possible), you can try to increase the size of the 
==1485==  main thread stack using the --main-stacksize= flag. 
==1485==  The main thread stack size used in this run was 8388608. 
==1485== Stack overflow in thread 1: can't grow stack to 0x7fe801fe8 
==1485== 
==1485== Process terminating with default action of signal 11 (SIGSEGV) 
==1485==  Access not within mapped region at address 0x7FE801FE8 
==1485==    at 0x4A255A0: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so) 
==1485==  If you believe this happened as a result of a stack 
==1485==  overflow in your program's main thread (unlikely but 
==1485==  possible), you can try to increase the size of the 
==1485==  main thread stack using the --main-stacksize= flag. 
==1485==  The main thread stack size used in this run was 8388608. 
==1485== 
==1485== HEAP SUMMARY: 
==1485==     in use at exit: 1,813,622 bytes in 28,223 blocks 
==1485==   total heap usage: 288,894 allocs, 260,671 frees, 866,039,001 bytes allocated 
==1485== 
==1485== LEAK SUMMARY: 
==1485==    definitely lost: 0 bytes in 0 blocks 
==1485==    indirectly lost: 0 bytes in 0 blocks 
==1485==      possibly lost: 1,758,118 bytes in 26,375 blocks 
==1485==    still reachable: 55,504 bytes in 1,848 blocks 
==1485==         suppressed: 0 bytes in 0 blocks 
==1485== Rerun with --leak-check=full to see details of leaked memory 
==1485== 
==1485== For counts of detected and suppressed errors, rerun with: -v 
==1485== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2) 
Segmentation fault (core dumped) 

===================================================================================

that's it!

Thanks for all the help, and sorry about the long e-mail.

Regards
Joaquin

On Fri, Sep 14, 2012 at 5:45 PM, My Th <[hidden email]> wrote:
Pk, 2012-09-14 17:17 -0500, joaquin peralta rakstīja:
> Hello,

>
> Thanks very much for the answer but the problem looks worse now :( ...
> I assign the environment variable, but still there.
>
>
> I don't have any other version of openbabel in the system, and I'm
> using the last subversion. My Os is ubuntu 12.04 and g++ versin is
> 4.6.3. I'm installing in my home folder, and the PATH are well
> defined.
>
>
> I attached a file with all the detail, because is to much to put it in
> the e-mail (and probably unnecessary).

It is ok to put that much into the email.

> Any hint about this segfault ?

Try cleaning the build dir and recompile without installing:
make clean ; make

and then try to run it from your build dir setting environment
appropriately.

Did you try also setting LD_LIBRARY_PATH to point to were
libopenbabel.so is located? In general you need to set all three
variables mentioned in the docs and make sure you are running babel
binary you just compiled.

If still getting segfault try compiling with debug symbols and getting
backtrace using gdb:
gdb bin/babel core-file
(gdb) bt full

Posting your code would make much easier to help.


Reinis


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



--
Joaquín Peralta C.
Postdoctoral Research Associate
Materials Science and Engineering
Iowa State University
3326 Hoover Hall
Ames, IA 50011
Phone Lab: 515-294-9547

http://www.lpmd.cl/jperalta
http://www.gnm.cl
-----------------------------------------------
In a world without frontiers,
who needs Gates and Windows?.


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with new plugin

Reinis Danne
Pk, 2012-09-14 18:08 -0500, joaquin peralta rakstīja:
> Hello,
>
>
> Before I put all the text, just allow me to explain :
>
>
> I'm not compiling with my plugin, it is just a clean svn version. I
> tried with make clean and make and the problem still, I just set all
> environment variables and the problem still.

You can set environment variables in alias:
$ alias obpath='LD_LIBRARY_PATH=/path/to/build_dir/lib/
BABEL_LIBDIR=/path/to/build_dir/lib/
BABEL_DATADIR=/path/to/source_dir/data/'

Then from your build dir:
$ obpath bin/babel -V
Open Babel 2.3.2 -- Sep 15 2012 -- 02:48:52

You already have issue without your plugin. Solve that first, it should
not segfault. What is result of 'make test'?


Reinis



------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with new plugin

Joaquin Peralta
Hello, I already have my environment variables ready :

==========================================================
jperaltac@baco:~/buildob$ env | grep babel
BABEL_DATADIR=/home/jperaltac/local/share/openbabel
BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/
LD_LIBARY_PATH=/home/jperaltac/local/share/openbabel:/usr/local/lib:/opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64:/opt/intel/composer_xe_2011_sp1.10.319/ipp/../compiler/lib/intel64:/opt/intel/composer_xe_2011_sp1.10.319/ipp/lib/intel64:/opt/intel/composer_xe_2011_sp1.10.319/compiler/lib/intel64:/opt/intel/composer_xe_2011_sp1.10.319/mkl/lib/intel64:/opt/intel/composer_xe_2011_sp1.10.319/tbb/lib/intel64//cc4.1.0_libc2.4_kernel2.6.16.21:/opt/intel/composer_xe_2011_sp1.10.319/debugger/lib/intel64:/opt/intel/composer_xe_2011_sp1.10.319/mpirt/lib/intel64

jperaltac@baco:~/buildob$ babel -V
Open Babel 2.3.2 -- Sep 14 2012 -- 17:07:39
jperaltac@baco:~/buildob$ 
===============================================================

They are in my bashrc file.

Yes, I'm trying to solve the segfault first, so I can try my plugin later.

 An the output of the make test is :

================================================================
jperaltac@baco:~/buildob$ make test
Running tests...
Test project /home/jperaltac/buildob
      Start  1: automorphism_Test
 1/59 Test  #1: automorphism_Test ................   Passed    2.98 sec
      Start  2: builder_Test
 2/59 Test  #2: builder_Test .....................   Passed   22.01 sec
      Start  3: canonconsistent_Test
 3/59 Test  #3: canonconsistent_Test .............   Passed    2.46 sec
      Start  4: canonstable_Test
 4/59 Test  #4: canonstable_Test .................   Passed   96.57 sec
      Start  5: cistrans_Test
 5/59 Test  #5: cistrans_Test ....................   Passed    0.06 sec
      Start  6: graphsym_Test
 6/59 Test  #6: graphsym_Test ....................   Passed    0.48 sec
      Start  7: implicitH_Test
 7/59 Test  #7: implicitH_Test ...................   Passed    0.19 sec
      Start  8: lssr_Test
 8/59 Test  #8: lssr_Test ........................   Passed   40.12 sec
      Start  9: isomorphism_Test
 9/59 Test  #9: isomorphism_Test .................***Failed  Error regular expression found in output. Regex=[FAIL]  0.12 sec
      Start 10: rotor_Test
10/59 Test #10: rotor_Test .......................***Failed  Error regular expression found in output. Regex=[FAIL]  0.05 sec
      Start 11: shuffle_Test
11/59 Test #11: shuffle_Test .....................   Passed   12.61 sec
      Start 12: smiles_Test
12/59 Test #12: smiles_Test ......................   Passed    0.19 sec
      Start 13: spectrophore_Test
13/59 Test #13: spectrophore_Test ................   Passed    2.90 sec
      Start 14: squareplanar_Test
14/59 Test #14: squareplanar_Test ................   Passed    0.01 sec
      Start 15: stereo_Test
15/59 Test #15: stereo_Test ......................   Passed    2.47 sec
      Start 16: stereoperception_Test
16/59 Test #16: stereoperception_Test ............   Passed    0.18 sec
      Start 17: tautomer_Test
17/59 Test #17: tautomer_Test ....................   Passed    0.20 sec
      Start 18: tetrahedral_Test
18/59 Test #18: tetrahedral_Test .................   Passed    0.01 sec
      Start 19: tetranonplanar_Test
19/59 Test #19: tetranonplanar_Test ..............   Passed    0.01 sec
      Start 20: tetraplanar_Test
20/59 Test #20: tetraplanar_Test .................   Passed    0.05 sec
      Start 21: uniqueid_Test
21/59 Test #21: uniqueid_Test ....................   Passed    0.01 sec
      Start 22: inchiSamples.sdf_Test
22/59 Test #22: inchiSamples.sdf_Test ............   Passed    1.15 sec
      Start 23: inchiSamplesTechMan.sdf_Test
23/59 Test #23: inchiSamplesTechMan.sdf_Test .....   Passed    0.27 sec
      Start 24: inchiSteffen_PubChem.smi_Test
24/59 Test #24: inchiSteffen_PubChem.smi_Test ....   Passed    0.30 sec
      Start 25: aromatest_Test
25/59 Test #25: aromatest_Test ...................   Passed    0.14 sec
      Start 26: atom_Test
26/59 Test #26: atom_Test ........................   Passed    0.01 sec
      Start 27: bond_Test
27/59 Test #27: bond_Test ........................   Passed    0.01 sec
      Start 28: cansmi_Test
28/59 Test #28: cansmi_Test ......................   Passed    7.19 sec
      Start 29: charge-mmff94_Test
29/59 Test #29: charge-mmff94_Test ...............   Passed    0.98 sec
      Start 30: charge-gasteiger_Test
30/59 Test #30: charge-gasteiger_Test ............   Passed    0.52 sec
      Start 31: conversion_Test
31/59 Test #31: conversion_Test ..................   Passed    0.04 sec
      Start 32: datatest_Test
32/59 Test #32: datatest_Test ....................   Passed    0.02 sec
      Start 33: ffgaff_Test
33/59 Test #33: ffgaff_Test ......................   Passed    3.68 sec
      Start 34: ffghemical_Test
34/59 Test #34: ffghemical_Test ..................   Passed    3.87 sec
      Start 35: ffmmff94_Test
35/59 Test #35: ffmmff94_Test ....................   Passed    3.49 sec
      Start 36: ffuff_Test
36/59 Test #36: ffuff_Test .......................   Passed    3.54 sec
      Start 37: formalcharge_Test
37/59 Test #37: formalcharge_Test ................   Passed    0.76 sec
      Start 38: format_Test
38/59 Test #38: format_Test ......................   Passed    0.03 sec
      Start 39: formula_Test
39/59 Test #39: formula_Test .....................   Passed    1.39 sec
      Start 40: internalcoord_Test
40/59 Test #40: internalcoord_Test ...............   Passed    0.02 sec
      Start 41: invalidsmarts_Test
41/59 Test #41: invalidsmarts_Test ...............   Passed    0.05 sec
      Start 42: invalidsmiles_Test
42/59 Test #42: invalidsmiles_Test ...............   Passed    0.04 sec
      Start 43: iterators_Test
43/59 Test #43: iterators_Test ...................   Passed    0.80 sec
      Start 44: logp_psa_Test
44/59 Test #44: logp_psa_Test ....................   Passed    0.13 sec
      Start 45: math_Test
45/59 Test #45: math_Test ........................   Passed    0.18 sec
      Start 46: mol_Test
46/59 Test #46: mol_Test .........................   Passed    0.08 sec
      Start 47: phmodel_Test
47/59 Test #47: phmodel_Test .....................   Passed    0.22 sec
      Start 48: residue_Test
48/59 Test #48: residue_Test .....................   Passed    0.10 sec
      Start 49: ringtest_Test
49/59 Test #49: ringtest_Test ....................   Passed    0.77 sec
      Start 50: smartstest_Test
50/59 Test #50: smartstest_Test ..................   Passed    1.24 sec
      Start 51: smartsparse_Test
51/59 Test #51: smartsparse_Test .................   Passed    0.05 sec
      Start 52: smilesmatch_Test
52/59 Test #52: smilesmatch_Test .................   Passed    4.33 sec
      Start 53: unitcell_Test
53/59 Test #53: unitcell_Test ....................   Passed    0.03 sec
      Start 54: pytest_babel
54/59 Test #54: pytest_babel .....................   Passed    0.45 sec
      Start 55: pytest_sym
55/59 Test #55: pytest_sym .......................***Failed  Error regular expression found in output. Regex=[FAIL]  7.97 sec
      Start 56: pytest_smartssym
56/59 Test #56: pytest_smartssym .................   Passed    1.84 sec
      Start 57: pytest_fastsearch
57/59 Test #57: pytest_fastsearch ................   Passed    0.27 sec
      Start 58: pytest_unique
58/59 Test #58: pytest_unique ....................   Passed    0.76 sec
      Start 59: pytest_kekule
59/59 Test #59: pytest_kekule ....................   Passed    0.98 sec

95% tests passed, 3 tests failed out of 59

Total Test time (real) = 231.61 sec

The following tests FAILED:
 9 - isomorphism_Test (Failed)
10 - rotor_Test (Failed)
55 - pytest_sym (Failed)
Errors while running CTest
make: *** [test] Error 8
jperaltac@baco:~/buildob$ 



================================================================

Any suggestion is welcome.

All the best
Joaquin

On Fri, Sep 14, 2012 at 6:53 PM, My Th <[hidden email]> wrote:
Pk, 2012-09-14 18:08 -0500, joaquin peralta rakstīja:
> Hello,
>
>
> Before I put all the text, just allow me to explain :
>
>
> I'm not compiling with my plugin, it is just a clean svn version. I
> tried with make clean and make and the problem still, I just set all
> environment variables and the problem still.

You can set environment variables in alias:
$ alias obpath='LD_LIBRARY_PATH=/path/to/build_dir/lib/
BABEL_LIBDIR=/path/to/build_dir/lib/
BABEL_DATADIR=/path/to/source_dir/data/'

Then from your build dir:
$ obpath bin/babel -V
Open Babel 2.3.2 -- Sep 15 2012 -- 02:48:52

You already have issue without your plugin. Solve that first, it should
not segfault. What is result of 'make test'?


Reinis





--
Joaquín Peralta C.
Postdoctoral Research Associate
Materials Science and Engineering
Iowa State University
3326 Hoover Hall
Ames, IA 50011
Phone Lab: 515-294-9547

http://www.lpmd.cl/jperalta
http://www.gnm.cl
-----------------------------------------------
In a world without frontiers,
who needs Gates and Windows?.


------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with new plugin

Noel O'Boyle
Administrator
In reply to this post by Joaquin Peralta
You are not using a clean svn version (see the output of your "svn st"
command). Just start over. Remove the install directory. Check out a
clean version from SVN and try to get that to build. There's no point
trying to write a plugin until you can successfully run Open Babel
from SVN.

- Noel

On 15 September 2012 00:08, joaquin peralta <[hidden email]> wrote:

> Hello,
>
> Before I put all the text, just allow me to explain :
>
> I'm not compiling with my plugin, it is just a clean svn version. I tried
> with make clean and make and the problem still, I just set all environment
> variables and the problem still.
>
> The problem is running : babel -H (that single command send me a segfault)
> so I did this with gdb :
>
> ===================================================================================
> jperaltac@baco:~/buildob$ gdb "/home/jperaltac/local/bin/babel"
> ..........
> Reading symbols from /home/jperaltac/local/bin/babel...done.
> (gdb) run -H
> Starting program: /home/jperaltac/local/bin/babel -H
> Open Babel converts chemical structures from one file format to another
>
> Usage: babel <input spec> <output spec> [Options]
>
> Each spec can be a file whose extension decides the format.
> Optionally the format can be specified by preceding the file by
> -i<format-type> e.g. -icml, for input and -o<format-type> for output
>
> See below for available format-types, which are the same as the
> file extensions and are case independent.
> If no input or output file is given stdin or stdout are used instead.
>
> More than one input file can be specified and their names can contain
> wildcard chars (* and ?).The molecules are aggregated in the output file.
>
> Conversion options
> -f <#> Start import at molecule # specified
> -l <#> End import at molecule # specified
> -e Continue with next object after error, if possible
> -z Compress the output with gzip
> -k Attempt to translate keywords
> -H Outputs this help text
> -V Outputs version number
> -L <category> Lists plugin classes of this category, e.g. <formats>
>    Use just -L for a list of plugin categories.
>    Use -L <ID> e.g. -L sdf for details of a format or other plugin.
> -m Produces multiple output files, to allow:
>    Splitting: e.g.        babel infile.mol new.smi -m
>      puts each molecule into new1.smi new2.smi etc
>    Batch conversion: e.g. babel *.mol -osmi -m
>      converts each input file to a .smi file
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000040769f in std::vector<std::string, std::allocator<std::string>
>>::max_size (this=0x7fffff7ff130) at
> /usr/include/c++/4.6/bits/stl_vector.h:576
> 576      { return _M_get_Tp_allocator().max_size(); }
> (gdb)
>
> ===================================================================================
>
> then looking with 'where' in gdb I have :
>
> ===================================================================================
>
> #0  0x000000000040769f in std::vector<std::string,
> std::allocator<std::string> >::max_size (this=0x7fffff7ff130) at
> /usr/include/c++/4.6/bits/stl_vector.h:576
> #1  0x00000000004072c9 in std::vector<std::string,
> std::allocator<std::string> >::_M_check_len (this=0x7fffff7ff130, __n=1,
> __s=0x4083da "vector::_M_insert_aux")
>     at /usr/include/c++/4.6/bits/stl_vector.h:1241
> #2  0x0000000000406d43 in std::vector<std::string,
> std::allocator<std::string> >::_M_insert_aux (this=0x7fffff7ff130,
> __position=..., __x=...) at /usr/include/c++/4.6/bits/vector.tcc:325
> #3  0x000000000040694a in std::vector<std::string,
> std::allocator<std::string> >::push_back (this=0x7fffff7ff130, __x=...) at
> /usr/include/c++/4.6/bits/stl_vector.h:834
> #4  0x00007ffff7704c33 in DLHandler::findFiles (file_list=..., pattern=...,
> path=...) at /home/jperaltac/Projects/openbabel/src/dlhandler_unix.cpp:82
> #5  0x00007ffff76c1fc4 in OpenBabel::OBPlugin::LoadAllPlugins () at
> /home/jperaltac/Projects/openbabel/src/plugin.cpp:61
> #6  0x00007ffff76c1ed6 in OpenBabel::OBPlugin::GetTypeMap
> (PluginID=0x7ffff7762d07 "loaders") at
> /home/jperaltac/Projects/openbabel/src/plugin.cpp:34
> #7  0x00007ffff76c23b9 in OpenBabel::OBPlugin::GetPlugin
> (Type=0x7ffff7762d07 "loaders", ID=0x7ffff7762d00 "define") at
> /home/jperaltac/Projects/openbabel/src/plugin.cpp:110
> #8  0x00007ffff76c207b in OpenBabel::OBPlugin::LoadAllPlugins () at
> /home/jperaltac/Projects/openbabel/src/plugin.cpp:80
>
> ... The lines #6,#7, and #8 are repeated a lot after that ...
> ===================================================================================
>
> Now the document that I attahced before about the process :
>
> ===================================================================================
> My installation process from svn.
>
> jperaltac@baco:~/Projects/openbabel$ sudo find / -iname "abinitformat.so"
> jperaltac@baco:~/Projects/openbabel$ svn st
> ?       test/files/prueba.xyz
> ?       test/files/Au.lpmd
> A       src/formats/lpmdformat.cpp
> jperaltac@baco:~/Projects/openbabel$ svn up
> At revision 5011.
> jperaltac@baco:~/Projects/openbabel$
>
> Compiling
>
> jperaltac@baco:~/Projects/openbabel$ export
> BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/
> jperaltac@baco:~/Projects/openbabel$
>
> Then
> jperaltac@baco:~/Projects/openbabel$ cd ~/buildob/
> jperaltac@baco:~/buildob$ ls
> jperaltac@baco:~/buildob$ cmake -DCMAKE_BUILD_TYPE=Debug
> -DCMAKE_INSTALL_PREFIX=/home/jperaltac/local/ ~/Projects/openbabel/
> -- The C compiler identification is GNU
> -- The CXX compiler identification is GNU
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Using included inchi library.
> -- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
> CMake Warning at CMakeLists.txt:152 (message):
>   libxml2 not found - disabling CML support!
>
>
> -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.3.4")
> -- Could NOT find wxWidgets (missing:  wxWidgets_FOUND)
> -- Looking for conio.h
> -- Looking for conio.h - not found
> -- Looking for sys/time.h
> -- Looking for sys/time.h - found
> -- Looking for time.h
> -- Looking for time.h - found
> -- Looking for strings.h
> -- Looking for strings.h - found
> -- Looking for rpc/xdr.h
> -- Looking for rpc/xdr.h - found
> -- Looking for regex.h
> -- Looking for regex.h - found
> -- Looking for C++ include sstream
> -- Looking for C++ include sstream - found
> -- Looking for rint
> -- Looking for rint - not found.
> -- Looking for snprintf
> -- Looking for snprintf - found
> -- Looking for sranddev
> -- Looking for sranddev - not found.
> -- Looking for strcasecmp
> -- Looking for strcasecmp - found
> -- Looking for strncasecmp
> -- Looking for strncasecmp - found
> -- Looking for dlopen in dl
> -- Looking for dlopen in dl - found
> -- Looking for sys/types.h
> -- Looking for sys/types.h - found
> -- Looking for stdint.h
> -- Looking for stdint.h - found
> -- Looking for stddef.h
> -- Looking for stddef.h - found
> -- Check size of clock_t
> -- Check size of clock_t - done
> -- Performing Test SCANDIR_NEEDS_CONST
> -- Performing Test SCANDIR_NEEDS_CONST - Failed
> -- Performing Test HAVE_GCC_VISIBILITY
> -- Performing Test HAVE_GCC_VISIBILITY - Success
> -- Could NOT find Eigen3 (missing:  EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
> (Required is at least version "2.91.0")
> -- Could NOT find Eigen2 (missing:  EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)
> (Required is at least version "2.0.0")
> -- checking for module 'cairo'
> --   package 'cairo' not found
> -- Could NOT find Cairo. PNG output will NOT be supported.
> -- Looking for getopt
> -- Looking for getopt - found
> -- Attempting to build the GUI
> --    wxWidgets not found => GUI will not be built
> -- Found PythonInterp: /usr/bin/python (found version "2.7.3")
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/jperaltac/buildob
>
> Compiling
>
> make ; make instal
>
> Work finw without error message nor suspissious warnings. Then :
>
> jperaltac@baco:~/buildob$ babel
> No output file or format spec!
> Open Babel 2.3.2 -- Sep 14 2012 -- 17:07:39
> Usage: babel [-i<input-type>] <name> [-o<output-type>] <name>
> Try  -H option for more information.
> jperaltac@baco:~/buildob$ babel -H
> Open Babel converts chemical structures from one file format to another
>
> Usage: babel <input spec> <output spec> [Options]
>
> Each spec can be a file whose extension decides the format.
> Optionally the format can be specified by preceding the file by
> -i<format-type> e.g. -icml, for input and -o<format-type> for output
>
> See below for available format-types, which are the same as the
> file extensions and are case independent.
> If no input or output file is given stdin or stdout are used instead.
>
> More than one input file can be specified and their names can contain
> wildcard chars (* and ?).The molecules are aggregated in the output file.
>
> Conversion options
> -f <#> Start import at molecule # specified
> -l <#> End import at molecule # specified
> -e Continue with next object after error, if possible
> -z Compress the output with gzip
> -k Attempt to translate keywords
> -H Outputs this help text
> -V Outputs version number
> -L <category> Lists plugin classes of this category, e.g. <formats>
>    Use just -L for a list of plugin categories.
>    Use -L <ID> e.g. -L sdf for details of a format or other plugin.
> -m Produces multiple output files, to allow:
>    Splitting: e.g.        babel infile.mol new.smi -m
>      puts each molecule into new1.smi new2.smi etc
>    Batch conversion: e.g. babel *.mol -osmi -m
>      converts each input file to a .smi file
> Segmentation fault (core dumped)
> jperaltac@baco:~/buildob$
>
> Looks like somethings is wrong here, I don't know why the segmentation
> fault!. Any hint now with this ?
>
> And my environments variables :
>
> jperaltac@baco:~/buildob$ env | grep bab
> BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/
> OLDPWD=/home/jperaltac/Projects/openbabel
> jperaltac@baco:~/buildob$
>
> Finallym the valgrind output :
>
> ==1485== Stack overflow in thread 1: can't grow stack to 0x7fe801ff8
> ==1485==
> ==1485== Process terminating with default action of signal 11 (SIGSEGV)
> ==1485==  Access not within mapped region at address 0x7FE801FF8
> ==1485==    at 0x40790A: std::string*
> std::__uninitialized_copy<false>::__uninit_copy<std::string*,
> std::string*>(std::string*, std::string*, std::string*)
> (stl_uninitialized.h:70)
> ==1485==  If you believe this happened as a result of a stack
> ==1485==  overflow in your program's main thread (unlikely but
> ==1485==  possible), you can try to increase the size of the
> ==1485==  main thread stack using the --main-stacksize= flag.
> ==1485==  The main thread stack size used in this run was 8388608.
> ==1485== Stack overflow in thread 1: can't grow stack to 0x7fe801fe8
> ==1485==
> ==1485== Process terminating with default action of signal 11 (SIGSEGV)
> ==1485==  Access not within mapped region at address 0x7FE801FE8
> ==1485==    at 0x4A255A0: _vgnU_freeres (in
> /usr/lib/valgrind/vgpreload_core-amd64-linux.so)
> ==1485==  If you believe this happened as a result of a stack
> ==1485==  overflow in your program's main thread (unlikely but
> ==1485==  possible), you can try to increase the size of the
> ==1485==  main thread stack using the --main-stacksize= flag.
> ==1485==  The main thread stack size used in this run was 8388608.
> ==1485==
> ==1485== HEAP SUMMARY:
> ==1485==     in use at exit: 1,813,622 bytes in 28,223 blocks
> ==1485==   total heap usage: 288,894 allocs, 260,671 frees, 866,039,001
> bytes allocated
> ==1485==
> ==1485== LEAK SUMMARY:
> ==1485==    definitely lost: 0 bytes in 0 blocks
> ==1485==    indirectly lost: 0 bytes in 0 blocks
> ==1485==      possibly lost: 1,758,118 bytes in 26,375 blocks
> ==1485==    still reachable: 55,504 bytes in 1,848 blocks
> ==1485==         suppressed: 0 bytes in 0 blocks
> ==1485== Rerun with --leak-check=full to see details of leaked memory
> ==1485==
> ==1485== For counts of detected and suppressed errors, rerun with: -v
> ==1485== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
> Segmentation fault (core dumped)
>
> ===================================================================================
>
> that's it!
>
> Thanks for all the help, and sorry about the long e-mail.
>
> Regards
> Joaquin
>
> On Fri, Sep 14, 2012 at 5:45 PM, My Th <[hidden email]> wrote:
>>
>> Pk, 2012-09-14 17:17 -0500, joaquin peralta rakstīja:
>> > Hello,
>>
>> >
>> > Thanks very much for the answer but the problem looks worse now :( ...
>> > I assign the environment variable, but still there.
>> >
>> >
>> > I don't have any other version of openbabel in the system, and I'm
>> > using the last subversion. My Os is ubuntu 12.04 and g++ versin is
>> > 4.6.3. I'm installing in my home folder, and the PATH are well
>> > defined.
>> >
>> >
>> > I attached a file with all the detail, because is to much to put it in
>> > the e-mail (and probably unnecessary).
>>
>> It is ok to put that much into the email.
>>
>> > Any hint about this segfault ?
>>
>> Try cleaning the build dir and recompile without installing:
>> make clean ; make
>>
>> and then try to run it from your build dir setting environment
>> appropriately.
>>
>> Did you try also setting LD_LIBRARY_PATH to point to were
>> libopenbabel.so is located? In general you need to set all three
>> variables mentioned in the docs and make sure you are running babel
>> binary you just compiled.
>>
>> If still getting segfault try compiling with debug symbols and getting
>> backtrace using gdb:
>> gdb bin/babel core-file
>> (gdb) bt full
>>
>> Posting your code would make much easier to help.
>>
>>
>> Reinis
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Got visibility?
>> Most devs has no idea what their production app looks like.
>> Find out how fast your code is with AppDynamics Lite.
>> http://ad.doubleclick.net/clk;262219671;13503038;y?
>> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
>
>
> --
> Joaquín Peralta C.
> Postdoctoral Research Associate
> Materials Science and Engineering
> Iowa State University
> 3326 Hoover Hall
> Ames, IA 50011
> Phone Lab: 515-294-9547
> http://www.lpmd.cl/jperalta
> http://www.gnm.cl
> -----------------------------------------------
> In a world without frontiers,
> who needs Gates and Windows?.
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with new plugin

Joaquin Peralta
Hello,

Sorry for the late answer, as you can see in the svn, the data was ok. Because there are no modifications of the original data. :)

jperaltac@baco:~/Projects/openbabel$ svn st
?       test/files/prueba.xyz
?       test/files/Au.lpmd
A       src/formats/lpmdformat.cpp
jperaltac@baco:~/Projects/openbabel$ svn up
At revision 5011.
jperaltac@baco:~/Projects/openbabel$

Anyway, the problem was solved :), was my mistake. 
The location of the plugins was set to : BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/ and must be : BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/2.3.2/

Thanks to everyone for the help.

All the best
Joaquin

I chage 

On Sat, Sep 15, 2012 at 3:36 AM, Noel O'Boyle <[hidden email]> wrote:
You are not using a clean svn version (see the output of your "svn st"
command). Just start over. Remove the install directory. Check out a
clean version from SVN and try to get that to build. There's no point
trying to write a plugin until you can successfully run Open Babel
from SVN.

- Noel

On 15 September 2012 00:08, joaquin peralta <[hidden email]> wrote:
> Hello,
>
> Before I put all the text, just allow me to explain :
>
> I'm not compiling with my plugin, it is just a clean svn version. I tried
> with make clean and make and the problem still, I just set all environment
> variables and the problem still.
>
> The problem is running : babel -H (that single command send me a segfault)
> so I did this with gdb :
>
> ===================================================================================
> jperaltac@baco:~/buildob$ gdb "/home/jperaltac/local/bin/babel"
> ..........
> Reading symbols from /home/jperaltac/local/bin/babel...done.
> (gdb) run -H
> Starting program: /home/jperaltac/local/bin/babel -H
> Open Babel converts chemical structures from one file format to another
>
> Usage: babel <input spec> <output spec> [Options]
>
> Each spec can be a file whose extension decides the format.
> Optionally the format can be specified by preceding the file by
> -i<format-type> e.g. -icml, for input and -o<format-type> for output
>
> See below for available format-types, which are the same as the
> file extensions and are case independent.
> If no input or output file is given stdin or stdout are used instead.
>
> More than one input file can be specified and their names can contain
> wildcard chars (* and ?).The molecules are aggregated in the output file.
>
> Conversion options
> -f <#> Start import at molecule # specified
> -l <#> End import at molecule # specified
> -e Continue with next object after error, if possible
> -z Compress the output with gzip
> -k Attempt to translate keywords
> -H Outputs this help text
> -V Outputs version number
> -L <category> Lists plugin classes of this category, e.g. <formats>
>    Use just -L for a list of plugin categories.
>    Use -L <ID> e.g. -L sdf for details of a format or other plugin.
> -m Produces multiple output files, to allow:
>    Splitting: e.g.        babel infile.mol new.smi -m
>      puts each molecule into new1.smi new2.smi etc
>    Batch conversion: e.g. babel *.mol -osmi -m
>      converts each input file to a .smi file
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000040769f in std::vector<std::string, std::allocator<std::string>
>>::max_size (this=0x7fffff7ff130) at
> /usr/include/c++/4.6/bits/stl_vector.h:576
> 576      { return _M_get_Tp_allocator().max_size(); }
> (gdb)
>
> ===================================================================================
>
> then looking with 'where' in gdb I have :
>
> ===================================================================================
>
> #0  0x000000000040769f in std::vector<std::string,
> std::allocator<std::string> >::max_size (this=0x7fffff7ff130) at
> /usr/include/c++/4.6/bits/stl_vector.h:576
> #1  0x00000000004072c9 in std::vector<std::string,
> std::allocator<std::string> >::_M_check_len (this=0x7fffff7ff130, __n=1,
> __s=0x4083da "vector::_M_insert_aux")
>     at /usr/include/c++/4.6/bits/stl_vector.h:1241
> #2  0x0000000000406d43 in std::vector<std::string,
> std::allocator<std::string> >::_M_insert_aux (this=0x7fffff7ff130,
> __position=..., __x=...) at /usr/include/c++/4.6/bits/vector.tcc:325
> #3  0x000000000040694a in std::vector<std::string,
> std::allocator<std::string> >::push_back (this=0x7fffff7ff130, __x=...) at
> /usr/include/c++/4.6/bits/stl_vector.h:834
> #4  0x00007ffff7704c33 in DLHandler::findFiles (file_list=..., pattern=...,
> path=...) at /home/jperaltac/Projects/openbabel/src/dlhandler_unix.cpp:82
> #5  0x00007ffff76c1fc4 in OpenBabel::OBPlugin::LoadAllPlugins () at
> /home/jperaltac/Projects/openbabel/src/plugin.cpp:61
> #6  0x00007ffff76c1ed6 in OpenBabel::OBPlugin::GetTypeMap
> (PluginID=0x7ffff7762d07 "loaders") at
> /home/jperaltac/Projects/openbabel/src/plugin.cpp:34
> #7  0x00007ffff76c23b9 in OpenBabel::OBPlugin::GetPlugin
> (Type=0x7ffff7762d07 "loaders", ID=0x7ffff7762d00 "define") at
> /home/jperaltac/Projects/openbabel/src/plugin.cpp:110
> #8  0x00007ffff76c207b in OpenBabel::OBPlugin::LoadAllPlugins () at
> /home/jperaltac/Projects/openbabel/src/plugin.cpp:80
>
> ... The lines #6,#7, and #8 are repeated a lot after that ...
> ===================================================================================
>
> Now the document that I attahced before about the process :
>
> ===================================================================================
> My installation process from svn.
>
> jperaltac@baco:~/Projects/openbabel$ sudo find / -iname "abinitformat.so"
> jperaltac@baco:~/Projects/openbabel$ svn st
> ?       test/files/prueba.xyz
> ?       test/files/Au.lpmd
> A       src/formats/lpmdformat.cpp
> jperaltac@baco:~/Projects/openbabel$ svn up
> At revision 5011.
> jperaltac@baco:~/Projects/openbabel$
>
> Compiling
>
> jperaltac@baco:~/Projects/openbabel$ export
> BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/
> jperaltac@baco:~/Projects/openbabel$
>
> Then
> jperaltac@baco:~/Projects/openbabel$ cd ~/buildob/
> jperaltac@baco:~/buildob$ ls
> jperaltac@baco:~/buildob$ cmake -DCMAKE_BUILD_TYPE=Debug
> -DCMAKE_INSTALL_PREFIX=/home/jperaltac/local/ ~/Projects/openbabel/
> -- The C compiler identification is GNU
> -- The CXX compiler identification is GNU
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Using included inchi library.
> -- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
> CMake Warning at CMakeLists.txt:152 (message):
>   libxml2 not found - disabling CML support!
>
>
> -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.3.4")
> -- Could NOT find wxWidgets (missing:  wxWidgets_FOUND)
> -- Looking for conio.h
> -- Looking for conio.h - not found
> -- Looking for sys/time.h
> -- Looking for sys/time.h - found
> -- Looking for time.h
> -- Looking for time.h - found
> -- Looking for strings.h
> -- Looking for strings.h - found
> -- Looking for rpc/xdr.h
> -- Looking for rpc/xdr.h - found
> -- Looking for regex.h
> -- Looking for regex.h - found
> -- Looking for C++ include sstream
> -- Looking for C++ include sstream - found
> -- Looking for rint
> -- Looking for rint - not found.
> -- Looking for snprintf
> -- Looking for snprintf - found
> -- Looking for sranddev
> -- Looking for sranddev - not found.
> -- Looking for strcasecmp
> -- Looking for strcasecmp - found
> -- Looking for strncasecmp
> -- Looking for strncasecmp - found
> -- Looking for dlopen in dl
> -- Looking for dlopen in dl - found
> -- Looking for sys/types.h
> -- Looking for sys/types.h - found
> -- Looking for stdint.h
> -- Looking for stdint.h - found
> -- Looking for stddef.h
> -- Looking for stddef.h - found
> -- Check size of clock_t
> -- Check size of clock_t - done
> -- Performing Test SCANDIR_NEEDS_CONST
> -- Performing Test SCANDIR_NEEDS_CONST - Failed
> -- Performing Test HAVE_GCC_VISIBILITY
> -- Performing Test HAVE_GCC_VISIBILITY - Success
> -- Could NOT find Eigen3 (missing:  EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
> (Required is at least version "2.91.0")
> -- Could NOT find Eigen2 (missing:  EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK)
> (Required is at least version "2.0.0")
> -- checking for module 'cairo'
> --   package 'cairo' not found
> -- Could NOT find Cairo. PNG output will NOT be supported.
> -- Looking for getopt
> -- Looking for getopt - found
> -- Attempting to build the GUI
> --    wxWidgets not found => GUI will not be built
> -- Found PythonInterp: /usr/bin/python (found version "2.7.3")
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/jperaltac/buildob
>
> Compiling
>
> make ; make instal
>
> Work finw without error message nor suspissious warnings. Then :
>
> jperaltac@baco:~/buildob$ babel
> No output file or format spec!
> Open Babel 2.3.2 -- Sep 14 2012 -- 17:07:39
> Usage: babel [-i<input-type>] <name> [-o<output-type>] <name>
> Try  -H option for more information.
> jperaltac@baco:~/buildob$ babel -H
> Open Babel converts chemical structures from one file format to another
>
> Usage: babel <input spec> <output spec> [Options]
>
> Each spec can be a file whose extension decides the format.
> Optionally the format can be specified by preceding the file by
> -i<format-type> e.g. -icml, for input and -o<format-type> for output
>
> See below for available format-types, which are the same as the
> file extensions and are case independent.
> If no input or output file is given stdin or stdout are used instead.
>
> More than one input file can be specified and their names can contain
> wildcard chars (* and ?).The molecules are aggregated in the output file.
>
> Conversion options
> -f <#> Start import at molecule # specified
> -l <#> End import at molecule # specified
> -e Continue with next object after error, if possible
> -z Compress the output with gzip
> -k Attempt to translate keywords
> -H Outputs this help text
> -V Outputs version number
> -L <category> Lists plugin classes of this category, e.g. <formats>
>    Use just -L for a list of plugin categories.
>    Use -L <ID> e.g. -L sdf for details of a format or other plugin.
> -m Produces multiple output files, to allow:
>    Splitting: e.g.        babel infile.mol new.smi -m
>      puts each molecule into new1.smi new2.smi etc
>    Batch conversion: e.g. babel *.mol -osmi -m
>      converts each input file to a .smi file
> Segmentation fault (core dumped)
> jperaltac@baco:~/buildob$
>
> Looks like somethings is wrong here, I don't know why the segmentation
> fault!. Any hint now with this ?
>
> And my environments variables :
>
> jperaltac@baco:~/buildob$ env | grep bab
> BABEL_LIBDIR=/home/jperaltac/local/lib/openbabel/
> OLDPWD=/home/jperaltac/Projects/openbabel
> jperaltac@baco:~/buildob$
>
> Finallym the valgrind output :
>
> ==1485== Stack overflow in thread 1: can't grow stack to 0x7fe801ff8
> ==1485==
> ==1485== Process terminating with default action of signal 11 (SIGSEGV)
> ==1485==  Access not within mapped region at address 0x7FE801FF8
> ==1485==    at 0x40790A: std::string*
> std::__uninitialized_copy<false>::__uninit_copy<std::string*,
> std::string*>(std::string*, std::string*, std::string*)
> (stl_uninitialized.h:70)
> ==1485==  If you believe this happened as a result of a stack
> ==1485==  overflow in your program's main thread (unlikely but
> ==1485==  possible), you can try to increase the size of the
> ==1485==  main thread stack using the --main-stacksize= flag.
> ==1485==  The main thread stack size used in this run was 8388608.
> ==1485== Stack overflow in thread 1: can't grow stack to 0x7fe801fe8
> ==1485==
> ==1485== Process terminating with default action of signal 11 (SIGSEGV)
> ==1485==  Access not within mapped region at address 0x7FE801FE8
> ==1485==    at 0x4A255A0: _vgnU_freeres (in
> /usr/lib/valgrind/vgpreload_core-amd64-linux.so)
> ==1485==  If you believe this happened as a result of a stack
> ==1485==  overflow in your program's main thread (unlikely but
> ==1485==  possible), you can try to increase the size of the
> ==1485==  main thread stack using the --main-stacksize= flag.
> ==1485==  The main thread stack size used in this run was 8388608.
> ==1485==
> ==1485== HEAP SUMMARY:
> ==1485==     in use at exit: 1,813,622 bytes in 28,223 blocks
> ==1485==   total heap usage: 288,894 allocs, 260,671 frees, 866,039,001
> bytes allocated
> ==1485==
> ==1485== LEAK SUMMARY:
> ==1485==    definitely lost: 0 bytes in 0 blocks
> ==1485==    indirectly lost: 0 bytes in 0 blocks
> ==1485==      possibly lost: 1,758,118 bytes in 26,375 blocks
> ==1485==    still reachable: 55,504 bytes in 1,848 blocks
> ==1485==         suppressed: 0 bytes in 0 blocks
> ==1485== Rerun with --leak-check=full to see details of leaked memory
> ==1485==
> ==1485== For counts of detected and suppressed errors, rerun with: -v
> ==1485== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
> Segmentation fault (core dumped)
>
> ===================================================================================
>
> that's it!
>
> Thanks for all the help, and sorry about the long e-mail.
>
> Regards
> Joaquin
>
> On Fri, Sep 14, 2012 at 5:45 PM, My Th <[hidden email]> wrote:
>>
>> Pk, 2012-09-14 17:17 -0500, joaquin peralta rakstīja:
>> > Hello,
>>
>> >
>> > Thanks very much for the answer but the problem looks worse now :( ...
>> > I assign the environment variable, but still there.
>> >
>> >
>> > I don't have any other version of openbabel in the system, and I'm
>> > using the last subversion. My Os is ubuntu 12.04 and g++ versin is
>> > 4.6.3. I'm installing in my home folder, and the PATH are well
>> > defined.
>> >
>> >
>> > I attached a file with all the detail, because is to much to put it in
>> > the e-mail (and probably unnecessary).
>>
>> It is ok to put that much into the email.
>>
>> > Any hint about this segfault ?
>>
>> Try cleaning the build dir and recompile without installing:
>> make clean ; make
>>
>> and then try to run it from your build dir setting environment
>> appropriately.
>>
>> Did you try also setting LD_LIBRARY_PATH to point to were
>> libopenbabel.so is located? In general you need to set all three
>> variables mentioned in the docs and make sure you are running babel
>> binary you just compiled.
>>
>> If still getting segfault try compiling with debug symbols and getting
>> backtrace using gdb:
>> gdb bin/babel core-file
>> (gdb) bt full
>>
>> Posting your code would make much easier to help.
>>
>>
>> Reinis
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Got visibility?
>> Most devs has no idea what their production app looks like.
>> Find out how fast your code is with AppDynamics Lite.
>> http://ad.doubleclick.net/clk;262219671;13503038;y?
>> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
>
>
> --
> Joaquín Peralta C.
> Postdoctoral Research Associate
> Materials Science and Engineering
> Iowa State University
> 3326 Hoover Hall
> Ames, IA 50011
> Phone Lab: <a href="tel:515-294-9547" value="+15152949547">515-294-9547
> http://www.lpmd.cl/jperalta
> http://www.gnm.cl
> -----------------------------------------------
> In a world without frontiers,
> who needs Gates and Windows?.
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>



--
Joaquín Peralta C.
Postdoctoral Research Associate
Materials Science and Engineering
Iowa State University
3326 Hoover Hall
Ames, IA 50011
Phone Lab: 515-294-9547

http://www.lpmd.cl/jperalta
http://www.gnm.cl
-----------------------------------------------
In a world without frontiers,
who needs Gates and Windows?.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss