Dear all,
I solved myself the mistery. It is very tricky and only thanks to a previous experience I wondered what was wrong.
When you configure, the compiler and the linker look for libraries in LD_LIBRARY_PATH environment variable.
Then, you call the configure passing -I and -L and you add further folders to the linking and include paths.
Well, what happened to me and the other guys who have this uic error?
The uic gets compiled against libraries in a certain folder but the includes used are not the right ones. Tipically, in one of the folders you specified with the -I option there is an header in conflict with one of the libraries. What you simply have to do is to verify that the folders you added with -I contain only the header you needs to link against the libraries you are specifying with the -L option.
The reason for the segmentation error is very simple.
Imagine you are linking against lib.so version 2. Version 2 contains for object A three methods in the header.
Imagine you then include the objecta.h in the project, but it is version 1 and only includes two methods.
What is going to happen is that, when you free or allocate an object A, this is going to have a size which is different from the expected one. This will result in a segmentation error, especially when you free the object.
In my case I was compilng and linking against dbus.
1) My -I/home/edmondo/project/sdimage/part4/usr/include/ is simply the /usr/include folders of a debian linux version for an ARM embedded device on a SD mounted on /home/edmondo/project/sdimage/part4/ .
2) I was including this folders to contains the header for the dbus library which I was linking against: -L/home/edmondo/project/sdimage/part4/dbuslib
3) the folder /home/edmondo/project/sdimage/part4/usr/include/ contains other includes! This were taken at the place of the ones of my host machine (my kubuntu laptop) but then uic was linked against the libraries of my kubuntu laptop.
How did I solve that? I copied the dbus includes in a different folder, and i -I the folders containing only the dbus includes.
Hope that can be helpful
Best Regards
Edmondo
Bookmarks