[Qt-interest] Compiling from source
Robert Hairgrove
evorgriahr at hispeed.ch
Sun Dec 6 17:14:44 CET 2009
Peter M. Groen wrote:
> Hi All,
>
> I tried compiling Qt 4.6 from sources ( MaxOSX 10.6 Snow Leopard ) but
> it always breaks on the WebCore.
>
> The only success I had on compiling was with the WebCore option
> disabled. What could be the problem here? What am I missing?
>
Hello, I just ran into the same problem when compiling Qt 4.6.0 on Mac
OSX 10.5.8 with a configuration which included MySQL support and WebKit.
I got the exact error messages which you did, and I can confirm that it
is indeed a conflicting header file.
The default Mac installation puts all of the MySQL libraries into
/usr/local/mysql-5.*-osx10.*-x86 and then advises to create an alias
"mysql" to that directory. Still, the Qt configure program cannot find
the MySQL include nor the lib directory by itself. However, including
the include directory as an -I switch will cause this directory to be
searched before all others, thus causing the conflict.
It seems that the header "plugin.h" is probably the culprit, although
I'm not 100% sure about it. What I did to solve the problem was to add a
single symbolic link (alias) to the single header file "mysql.h" in the
/usr/local/include directory and only added an -L switch to the
configure program so that the linker can find the MySQL libs. Then I
invoked "make" again (repeatedly) and watched which additional headers
were claimed as missing. There are about 5 or 6 of these, namely:
mysql.h
my_alloc.h
my_list.h
mysql_com.h
mysql_time.h
mysql_version.h
typelib.h
OK, there are 7 of them total. ... Anyway, once you have these in place,
and have added the -L switch to the configuration, everything should
compile and build correctly. But don't make a symlink to the entire
directory because you will get the conflict with at least one of the
other header files in that directory; you have to make links to the
individual files.
Please note that I haven't actually had time to USE anything of the new
Qt installation yet, so "caveat emptor" applies!
HTH
More information about the Qt-interest-old
mailing list