[odb-users] libc++abi.dylib: terminating with uncaught foreign exception

Adnan RIHAN axel50397 at gmail.com
Thu Oct 23 06:55:18 EDT 2014


Hello !

So, I’ll try to reproduce everything with Yosemite on VM (Parallels Desktop) because as it’s final from few days, I will also try if it’s supported. If it’s not, I will revert to Maverick on the VM. So here as I start:  

0. 1) Install Maverick from host recovery partition.  
2) Copied "Install Yosemite.app” from host then installed it.
3) Copied XCode 6.0.1 from host and started it (to initialize, no CLT explicitly installed).
4) Updated Xcode from VM AppStore to 6.1 .
5) Problem with update detection with AppStore, removed and installed Xcode from VM AppStore.

> MacBook-Pro-de-OSX:~ osx$ xcode-select -v  
> xcode-select version 2339.
>
> MacBook-Pro-de-OSX:~ osx$ which clang
> /usr/bin/clang
>
> MacBook-Pro-de-OSX:~ osx$ clang --version
> Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
> Target: x86_64-apple-darwin14.0.0
> Thread model: posix

On 20 octobre 2014 at 14:06:07, Boris Kolpackov (boris at codesynthesis.com(mailto:boris at codesynthesis.com)) wrote:

> 1. Install command line tools.
>
> One thing I could not do is first uninstall everything (e.g.,
> get rid of /usr/bin/{clang,gcc,...} and /usr/include/*).
> Apparently there is no way to do it. In particular, running
> this did not remove those tools:
>
> /Developer/Library/uninstall-devtools --mode=all  

I don’t have this path, neither in /Applications/Xcode.app .

> In any case, to make sure I have the latest stuff, I ran:
>
> xcode-select --install  

Even if (from: https://developer.apple.com/library/ios/technotes/tn2339/_index.html):  
> If Xcode is installed on your machine, then there is no need to install them. Xcode comes bundled with all your command-line tools. OS X 10.9 includes shims or wrapper executables. These shims, installed in /usr/bin, can map any tool included in /usr/bin to the corresponding one inside Xcode. xcrun is one of such shims, which allows you to find or run any tool inside Xcode from the command
line. Use it to invoke any tool within Xcode from the command line.

I still have installed them via `xcode-select --install`.  

> And it downloaded and installed something. After that, I got:
>
> $ clang --version
> Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)  

The only difference with mine is:
> Target: x86_64-apple-darwin14.0.0

> 2. Then, for general undestanding, I compiled a test program called
> sizeof_funds.cxx (attached) to see which mode (32/64) is the
> default:
>
> So, by default, clang generates 64-bit code (look at size of void*)
> but you can request 32-bit with -m32.  

Same for me, without precising “-mXX” -> void* sizeof = 8 alignof = 8  

> 3. Next I downloaded and unpacked these 4 ODB packages:

> libodb-2.3.0.tar.bz2  
> ./configure CC=clang CXX=clang++ && make && sudo make install
OK

> libodb-sqlite-2.3.0.tar.bz2  
> ./configure CC=clang CXX=clang++ && make && sudo make install
OK  

Then:  
> MacBook-Pro-de-OSX:hello osx$ pwd
> /tmp/odb-examples-2.3.0/hello
> MacBook-Pro-de-OSX:hello osx$ ../../odb-2.3.0-i686-macosx/bin/odb -d sqlite -q -s person.hxx  
> ../../odb-2.3.0-i686-macosx/bin/odb: error: unable to extract profile paths

This error tells me that MAYBE yosemite has a problem. So I’ll try on my host “Maverick”.  
----------
To try from a cleanest as possible system, I’ve reinstalled CLT and remove EVERY homebrew package I have, so I’ll have /usr/local/{bin,include,lib} clean:

> ➜ local git:(master) pwd  
> /usr/local
> ➜ local git:(master) ls bin/ include/ lib/
> bin/:
> brew* git-shell@
> brew-rmtree.rb@ git-upload-archive@
> git@ git-upload-pack@
> git-credential-osxkeychain@ github@
> git-cvsserver@ gpg@
> git-receive-pack@
>  
> include/:
>  
> lib/:
> perl5/

> clang -v  
> Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
> Target: x86_64-apple-darwin13.4.0
> Thread model: posix

Then I download and compile the libodb*:  
> $ wget -O- -q http://www.codesynthesis.com/download/odb/2.3/libodb-2.3.0.tar.gz | tar -zx
> $ cd libodb-2.3.0
> $ ./configure CC=clang CXX=clang++
> $ make && sudo make install

> $ wget -O- -q http://www.codesynthesis.com/download/odb/2.3/libodb-sqlite-2.3.0.tar.gz | tar -zx  
> $ cd libodb-sqlite-2.3.0
> $ ./configure CC=clang CXX=clang++
> $ make && sudo make install

> $ wget -O- -q http://www.codesynthesis.com/download/odb/2.3/odb-2.3.0-i686-macosx.tar.bz2 | tar -jx  

These are OK.  
Then, hello example:
> $ wget -O- -q http://www.codesynthesis.com/download/odb/2.3/odb-examples-2.3.0.tar.gz | tar -zx
> $ cd odb-examples-2.3.0/hello
> $ ../../odb-2.3.0-i686-macosx/bin/odb -d sqlite -q -s person.hxx
> clang++ -c person-odb.cxx
> clang++ -DDATABASE_SQLITE -c driver.cxx
// clang++ -o driver driver.o person-odb.o -lodb-mysql -lodb // I haven’t done this one
> clang++ -o driver driver.o person-odb.o -lodb-sqlite -lodb
> $ ./driver
> Hello, John Doe!
> Hello, Jane Doe!
>
> count : 3
> min age: 31
> max age: 33  

Exact same output for me.  

> So, for me, everything works pretty smoothly. Can you try these exact
> steps and see if they work for you?

It also works. -_-'  
----------
My project had some compilation issues, but this thread was about an error got only while querying relationships.

So my idea will be to compile the models file, and the entire project to see what error I have.  

> $ pwd  
> /Users/Max13/Dev/System/LGC/Desktop/apps/LGC/src/Models/Category
> $ cd Category
> $ /tmp/odb-2.3.0-i686-macosx/bin/odb -x -F/Users/Max13/Qt/5.3/clang_64/lib -x -I/Users/Max13/Qt/5.3/clang_64/lib/QtCore.framework/Headers -x -I/usr/local/include -d sqlite -p qt -q -s Category.hpp
> Category.xml: info: initializing changelog with base version 1

> $ cd ../Provider  
> /tmp/odb-2.3.0-i686-macosx/bin/odb -x -F/Users/Max13/Qt/5.3/clang_64/lib -x -I/Users/Max13/Qt/5.3/clang_64/lib/QtCore.framework/Headers -x -I/usr/local/include -d sqlite -p qt -q -s Provider.hpp
> Provider.xml: info: initializing changelog with base version 1

> $ cd ../Product  
/tmp/odb-2.3.0-i686-macosx/bin/odb -x -F/Users/Max13/Qt/5.3/clang_64/lib -x -I/Users/Max13/Qt/5.3/clang_64/lib/QtCore.framework/Headers -x -I/usr/local/include -d sqlite -p qt -q -s Product.hpp  
> Product.xml: info: initializing changelog with base version 1

Now I’ll Qt-Creator to compile my project:  
> Undefined symbols for architecture x86_64:
>   "odb::sqlite::delete_statement::delete_statement(odb::sqlite::connection&, std::string const&, odb::sqlite::binding&)", referenced from:
>       odb::access::object_traits_impl<Category, (odb::database_id)1>::erase_query(odb::database&, odb::sqlite::query_base const&) in Category-odb.o
>       odb::access::object_traits_impl<Provider, (odb::database_id)1>::erase_query(odb::database&, odb::sqlite::query_base const&) in Provider-odb.o
>       odb::access::object_traits_impl<Product, (odb::database_id)1>::erase_query(odb::database&, odb::sqlite::query_base const&) in Product-odb.o
>       odb::access::object_traits_impl<Offer, (odb::database_id)1>::erase_query(odb::database&, odb::sqlite::query_base const&) in Offer-odb.o
>   "odb::sqlite::select_statement::select_statement(odb::sqlite::connection&, std::string const&, bool, bool, odb::sqlite::binding&, odb::sqlite::binding&)", referenced from:
>       odb::access::object_traits_impl<Category, (odb::database_id)1>::query(odb::database&, odb::sqlite::query_base const&) in Category-odb.o
>       odb::access::object_traits_impl<Provider, (odb::database_id)1>::query(odb::database&, odb::sqlite::query_base const&) in Provider-odb.o
>       odb::access::object_traits_impl<Product, (odb::database_id)1>::query(odb::database&, odb::sqlite::query_base const&) in Product-odb.o
>       odb::access::object_traits_impl<Offer, (odb::database_id)1>::query(odb::database&, odb::sqlite::query_base const&) in Offer-odb.o
>   "odb::sqlite::database::database(std::string const&, int, bool, std::string const&, odb::details::transfer_ptr<odb::sqlite::connection_factory>)", referenced from:
>       MasterController::checkEnv() in MasterController.o
> ld: symbol(s) not found for architecture x86_64

From here, it seems to be project related. But, without touching my project, I’ve recompiled “libodb” + “libodb-sqlite” with gcc-4.9 (not by homebrew, but with CC and CXX flags) and by projects compiles normally without a single warning. In case of you could have an idea, I’ve attached my Category.hpp (one of the models, independent) and the generated files. I don’t attach the .cpp because it’s only getters and setters, no other calls.

Something still strange is that my project crashed because of this error, only when querying an object with relations. It crashed again today, I’ve recompiled the libs with gcc-4.9 and project with clang, it’s now working.

I think I’ll create another VM with Maverick and restart again the whole process with a sample project. I don’t understand ...
--
Cordialement, Adnan RIHAN.
Directeur-Gérant de Eolis-Software, société de services informatiques.

GPG: 5675-62BA (https://keybase.io/max13/key.asc)
-> Si vous n'utilisez pas GPG mais souhaitez quand même m’envoyer un e-mail chiffré: (https://encrypt.to/0x567562BA).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Category-odb.cxx
Type: application/octet-stream
Size: 17319 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20141023/c907508d/Category-odb-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Category-odb.hxx
Type: application/octet-stream
Size: 6771 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20141023/c907508d/Category-odb-0004.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Category-odb.ixx
Type: application/octet-stream
Size: 1242 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20141023/c907508d/Category-odb-0005.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Category.hpp
Type: application/octet-stream
Size: 1462 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20141023/c907508d/Category-0001.obj


More information about the odb-users mailing list