[odb-users] ODB plugin error when executing

Sverre Eplov sverre at awion.dk
Thu Feb 4 19:01:24 EST 2016


Hi,

I’ve compiled odb from GIT, commit d1b34452

I’m using GCC version: "g++-5 (Homebrew gcc 5.3.0) 5.3.0" on OS X 10.11.3

When I try to use odb on the “person.h” file from odb sample code, I get:

----------------------------------------
odb --database pgsql -I/usr/local/include person.h 
person.h:*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_START_UNIT                | odb
PLUGIN_PRAGMAS                   | odb
PLUGIN_OVERRIDE_GATE             | odb
In file included from /usr/local/include/odb/container-traits.hxx:211:0,
                 from <standard-odb-epilogue>:9:
/usr/local/include/odb/std-deque-traits.hxx:66:1: internal compiler error: Abort trap: 6
 }
 ^
g++-5: internal compiler error: Abort trap: 6 (program cc1plus)
----------------------------------------

Any suggestions on what I’ve goofed up?



----------------------------------------
To get a working ODB on my system, I did as follows:

In a directory with odb checked out, master branch
Using libcutl from develop folder, as it is compiled statically with GCC. (The one installed on /usr/… is compiled with clang)


1) Create source distribution

make dist dist_prefix=~/tmp/odb

Configuring external dependency on 'cli' for 'odb'.


Would you like to configure dependency on the installed 
version of 'cli' as opposed to the development build?

[y]: 


configuring 'odb'


Please select the C++ compiler you would like to use:

(1) GNU C++ (g++)
(2) Intel C++ (icc)
(3) Other C++ compiler

[1]: 

Would you like the C++ compiler to optimize generated code?

[y]: 

Would you like the C++ compiler to generate debug information?

[y]: 

Embed dynamic library paths into executables (rpath)?

[y]: 

Please enter any extra C++ preprocessor options.

[]: 

Please enter any extra C++ compiler options.

[]: -I/usr/local/include

Please enter any extra C++ linker options.

[]: 

Please enter any extra C++ libraries.

[]: 

Configuring external dependency on 'libcutl' for 'odb'.


Would you like to configure dependency on the installed 
version of 'libcutl' as opposed to the development build?

[y]: n

Please enter the src_root for 'libcutl'.

[]: /Users/sverre/Packed/CPP/ODB/git/libcutl

Please enter the out_root for 'libcutl'.

[/Users/sverre/Packed/CPP/ODB/git/libcutl]: 


configuring 'odb'



Please enter the g++ binary you would like to use, for example 'g++-3.4',
'/usr/local/bin/g++' or 'distcc g++'.

[g++]: g++-5

Please select the optimization level you would like to use:

(1) -O1 [Tries to reduce code size and execution time, without
         performing any optimizations that take a great deal of
         compilation time.]
(2) -O2 [Performs nearly all supported optimizations that do not
         involve a space-speed tradeoff.]
(3) -O3 [Optimize even more.]
(4) -Os [Optimize for size.]

[2]: 
(source files are then created in ~/tmp/odb without errors)

--------------------------------------------------------
2) build and install odb

cd ~/tmp/odb
./bootstrap
./configure --with-libcutl=/Users/sverre/Packed/CPP/ODB/git/libcutl CC=gcc-5 CPP='gcc-5 -E' CXX=g++-5 CXXCPP='g++-5 -E' CPPFLAGS=-I/usr/local/include
 
(exempt from ./configure output)
….
checking whether g++-5 supports plugins... yes
checking whether to install ODB plugin into default GCC plugin directory... no
checking for GCC plugin headers... yes
checking for libcutl... yes
….

make install
(executes without errors)

(exempt from compile step)
….
libtool: compile:  g++-5 -DHAVE_CONFIG_H -I.. -I.. -I/usr/local/include -I/usr/local/Cellar/gcc/5.3.0/lib/gcc/5/gcc/x86_64-apple-darwin15.2.0/5.3.0/plugin/include -I/Users/sverre/Packed/CPP/ODB/git/libcutl -g -O2 -MT cxx-lexer.lo -MD -MP -MF .deps/cxx-lexer.Tpo -c cxx-lexer.cxx  -fno-common -DPIC -o .libs/cxx-lexer.o
….
--------------------------------------------------------

3) Check odb

otool -L `which odb`
/usr/local/bin/odb:
	/usr/local/opt/gcc/lib/gcc/5/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.21.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/usr/local/lib/gcc/5/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

odb --version
ODB object-relational mapping (ORM) compiler for C++ 2.5.0.a4
Copyright (c) 2009-2015 Code Synthesis Tools CC
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



More information about the odb-users mailing list