[odb-users] segmentation error on the hello example(w.r.t
auto_ptr<database> db (new odb::mysql::database (argc, argv));)
youngsunhere at gmail.com
Fri Mar 26 06:53:31 EDT 2021
ys C <youngsunhere at gmail.com>
12:10 PM (7 hours ago)
Thank you for your reply, Boris!
I used g++ 7 for example and libodb build.
I did use the 2.5 pre-release install through build as well.
As you mentioned, I tried debugging while running the executable, and got
the following clues. Could this be some broken linkage issue?
libc.so.6!_int_malloc(mstate av, size_t bytes)
libstdc++.so.6!operator new(unsigned long)
Thank you for your time!
On Thu, Mar 25, 2021 at 10:22 PM Boris Kolpackov <boris at codesynthesis.com>
> ys C <youngsunhere at gmail.com> writes:
> > However when driver is run as below, I get segmentation error.
> > *./driver --user root --database cpp_test*
> > My debugging only got so far as finding out that it was due to L 62 in
> > *database.hxx*
> > *auto_ptr<database> db (new odb::mysql::database (argc, argv));)*
> > I am running on Ubuntu 18.04, using mysql for db, as mentioned.
> > Could this be installation issue?
> Yes, this could be a compiler/ABI mismatch between the compiler that
> you use to build the example and that was used to build the libodb*
> packages (I assume you are using system-installed ones).
> If you want to try to eliminate this possibility, I would suggest
> building the 2.5 pre-release from source as described here:
> Otherwise (or if you have the same issues with 2.5), you will
> need to build the test with debug information (-g) and look
> around in the debugger (e.g., stack trace, etc) for what might
> be causing this.
More information about the odb-users