Qt-interest Archive, December 2007
[Win32] Unable to build MySQL plugin
Pages: Prev | 1 | 2 | Next
Message 1 in thread
I'm trying to build the mysql plugin under Win32 with
qt-win-opensource-src-4.3.2. I have a MySQL 5 development
tree installed under:
C:\Program Files\MySQL\MySQL Server 5.0
with lib and include directories in
C:\Program Files\MySQL\MySQL Server 5.0\include
C:\Program Files\MySQL\MySQL Server 5.0\lib\opt
respectively. I configure Qt with:
> configure.exe -plugin-sql-sqlite -plugin-sql-mysql
-I "C:\Program Files\MySQL\MySQL Server 5.0\include"
-L "C:\Program Files\MySQL\MySQL Server 5.0\lib\opt"
When I try to build it, it falls over with the following error:
Generating Code...
link /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:CONSOLE
/MANIFESTFILE:"tmp\obj\r
elease_shared\rcc.intermediate.manifest" /OUT:..\..\..\bin\rcc.exe
@C:\DOCUME~1\
ADMINI~1\LOCALS~1\Temp\nm187.tmp
LINK : fatal error LNK1181: cannot open input file 'Files\MySQL\MySQL.obj'
The "Files\MySQL" string looks rather suspicious to me, as if
something isn't handling the space in "Program Files" properly.
Can someone suggest what the problem is, and how to fix it ?
--
[ signature omitted ]
Message 2 in thread
Oh well, the good old spaces in path names ... specify it this way:
-L "\"C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\""
- Thomas
2007/12/3, Stephen Collyer <scollyer@xxxxxxxxxxxxxxxx>:
> I'm trying to build the mysql plugin under Win32 with
> qt-win-opensource-src-4.3.2. I have a MySQL 5 development
> tree installed under:
>
> C:\Program Files\MySQL\MySQL Server 5.0
>
> with lib and include directories in
>
> C:\Program Files\MySQL\MySQL Server 5.0\include
> C:\Program Files\MySQL\MySQL Server 5.0\lib\opt
>
> respectively. I configure Qt with:
>
> > configure.exe -plugin-sql-sqlite -plugin-sql-mysql
> -I "C:\Program Files\MySQL\MySQL Server 5.0\include"
> -L "C:\Program Files\MySQL\MySQL Server 5.0\lib\opt"
>
> When I try to build it, it falls over with the following error:
>
> Generating Code...
> link /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:CONSOLE
> /MANIFESTFILE:"tmp\obj\r
> elease_shared\rcc.intermediate.manifest" /OUT:..\..\..\bin\rcc.exe
> @C:\DOCUME~1\
> ADMINI~1\LOCALS~1\Temp\nm187.tmp
> LINK : fatal error LNK1181: cannot open input file 'Files\MySQL\MySQL.obj'
>
> The "Files\MySQL" string looks rather suspicious to me, as if
> something isn't handling the space in "Program Files" properly.
>
> Can someone suggest what the problem is, and how to fix it ?
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 3 in thread
Thomas Dähling wrote:
> Oh well, the good old spaces in path names ... specify it this way:
>
> -L "\"C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\""
Thomas, thanks for the suggestion. However, that doesn't solve
the problem. I'm getting
"Argument passed to -L option is not a directory path. Did you mean
the -l option ?"
Remember that I also have a -I argument that I have quoted in a
similar fashion immediately before the -L. Could that be breaking
the second set of quotes ? (I have no idea of the cmd.exe quoting
rules, and unfortunately Google suggests not many other people do,
either).
I assume that this quoting is for the benefit of the cmd.exe parser,
and it isn't due to something internal to the configure program itself ?
It's just occurred to me that it may be easier to run the whole
thing from a cygwin bash shell. The only reason I'm using cmd.exe
is that that is what the VS2005 command line option pops up.
--
[ signature omitted ]
Message 4 in thread
Hello Stephen,
I suggest, that you put your files into a directory without spaces to
test all, i.E. put it in x:\mysql\include and x:\mysql\lib and then try
it again with your parameters. -I include to mysql -L lib to mysql
That should work. Do not forget to use switch -plugin-sql-mysql also.
Regards,
Peter
Stephen Collyer schrieb:
> Thomas Dähling wrote:
>> Oh well, the good old spaces in path names ... specify it this way:
>>
>> -L "\"C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\""
>
> Thomas, thanks for the suggestion. However, that doesn't solve
> the problem. I'm getting
>
> "Argument passed to -L option is not a directory path. Did you mean
> the -l option ?"
>
> Remember that I also have a -I argument that I have quoted in a
> similar fashion immediately before the -L. Could that be breaking
> the second set of quotes ? (I have no idea of the cmd.exe quoting
> rules, and unfortunately Google suggests not many other people do,
> either).
>
> I assume that this quoting is for the benefit of the cmd.exe parser,
> and it isn't due to something internal to the configure program itself ?
>
> It's just occurred to me that it may be easier to run the whole
> thing from a cygwin bash shell. The only reason I'm using cmd.exe
> is that that is what the VS2005 command line option pops up.
>
--
[ signature omitted ]
Message 5 in thread
peter wrote:
> Hello Stephen,
> I suggest, that you put your files into a directory without spaces to
> test all, i.E. put it in x:\mysql\include and x:\mysql\lib and then try
> it again with your parameters. -I include to mysql -L lib to mysql
> That should work. Do not forget to use switch -plugin-sql-mysql also.
I seem to have managed to get it to run from a Cygwin shell script,
where I can use bash quoting rules to protect the spaces sensibly,
so I may not need to bother.
Thanks anyway.
--
[ signature omitted ]
Message 6 in thread
>Peter wrote:
>> Hello Stephen,
>> I suggest, that you put your files into a directory without spaces to
>> test all, i.E. put it in x:\mysql\include and x:\mysql\lib and then try
>> it again with your parameters. -I include to mysql -L lib to mysql
>> That should work. Do not forget to use switch -plugin-sql-mysql also.
>
>I seem to have managed to get it to run from a Cygwin shell script,
>where I can use bash quoting rules to protect the spaces sensibly,
>so I may not need to bother.
OK, the pain continues. I have indeed succeeded in getting through
the configure stage, but the build process fails immediately.
I have a Cygwin bash script that looks like this:
#!/bin/sh
./configure -plugin-sql-sqlite -plugin-sql-mysql \
-I 'c:\Program Files\MySQL\MySQL Server 5.0\include' \
-L 'c:\Program Files\MySQL\MySQL Server 5.0\lib\opt'
nmake
and nmakes fails like this:
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -W3 -w34100 -w34189 -GR -EHsc -DQ
T_THREAD_SUPPORT -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_AS
CII -DQT_ASCII_CAST_WARNINGS -DQT_44_API_QSQLQUERY_FINISH -DQT3_SUPPORT -DQT
_MOC_COMPAT -D_USE_MATH_DEFINES -I"..\..\include" -I"c:\Program" -I"Files\My
SQL\MySQL" -I"Server" -I"5.0\include" -I"tmp" -I"..\..\include\QtCore" -I"e:
\qt\qt-win-opensource-src-4.3.2\include\qtmain" -I"tmp" -I"e:\qt\qt-win-open
source-src-4.3.2\include\ActiveQt" -I"tmp\moc\debug_shared" -I"." -I"..\..\m
kspecs\win32-msvc2005" -Fotmp\obj\debug_shared\
@c:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nm12.tmp
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio
8\VC\bin\cl.EXE"' : return code '0x80'
Now, once again it looks like something inside configure can't handle
the spaces in the include and lib dirs, since we end up with these
suspicious -I directives:
-I"c:\Program" -I"Files\MySQL\MySQL" -I"Server" -I"5.0\include"
So the question is this: can configure not handle path specs
with spaces, or am I merely lacking some more quoting ? If so,
how should the spaces be quoted ?
--
[ signature omitted ]
Message 7 in thread
Why stay in pain and try to guess. Do, what I suggested to do and test
it again, pathes with spaces are always a pain.....
Stephen Collyer schrieb:
>> Peter wrote:
>>> Hello Stephen,
>>> I suggest, that you put your files into a directory without spaces to
>>> test all, i.E. put it in x:\mysql\include and x:\mysql\lib and then try
>>> it again with your parameters. -I include to mysql -L lib to mysql
>>> That should work. Do not forget to use switch -plugin-sql-mysql also.
>> I seem to have managed to get it to run from a Cygwin shell script,
>> where I can use bash quoting rules to protect the spaces sensibly,
>> so I may not need to bother.
>
> OK, the pain continues. I have indeed succeeded in getting through
> the configure stage, but the build process fails immediately.
>
> I have a Cygwin bash script that looks like this:
>
> #!/bin/sh
>
> ./configure -plugin-sql-sqlite -plugin-sql-mysql \
> -I 'c:\Program Files\MySQL\MySQL Server 5.0\include' \
> -L 'c:\Program Files\MySQL\MySQL Server 5.0\lib\opt'
>
> nmake
>
> and nmakes fails like this:
>
>
>
>
>
>
>
>
>
> cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -W3 -w34100 -w34189 -GR -EHsc -DQ
> T_THREAD_SUPPORT -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_AS
> CII -DQT_ASCII_CAST_WARNINGS -DQT_44_API_QSQLQUERY_FINISH -DQT3_SUPPORT -DQT
> _MOC_COMPAT -D_USE_MATH_DEFINES -I"..\..\include" -I"c:\Program" -I"Files\My
> SQL\MySQL" -I"Server" -I"5.0\include" -I"tmp" -I"..\..\include\QtCore" -I"e:
> \qt\qt-win-opensource-src-4.3.2\include\qtmain" -I"tmp" -I"e:\qt\qt-win-open
> source-src-4.3.2\include\ActiveQt" -I"tmp\moc\debug_shared" -I"." -I"..\..\m
> kspecs\win32-msvc2005" -Fotmp\obj\debug_shared\
> @c:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nm12.tmp
> NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio
> 8\VC\bin\cl.EXE"' : return code '0x80'
>
> Now, once again it looks like something inside configure can't handle
> the spaces in the include and lib dirs, since we end up with these
> suspicious -I directives:
>
> -I"c:\Program" -I"Files\MySQL\MySQL" -I"Server" -I"5.0\include"
>
> So the question is this: can configure not handle path specs
> with spaces, or am I merely lacking some more quoting ? If so,
> how should the spaces be quoted ?
>
> --
> Regards
>
> Steve Collyer
> Netspinner Ltd
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 8 in thread
peter wrote:
> Why stay in pain and try to guess. Do, what I suggested to do and test
> it again, pathes with spaces are always a pain.....
Well, I don't want to guess; I'd prefer to know precisely what
is failing so that I can avoid the problem in the future and in
addition, the build takes so long that I don't want to go round
this loop too many times. I want to get it right next time.
Also I'd rather build the sources against the default MySQL
installation, rather than have to document the fact that they
must be installed into a location with no spaces.
Is there any Trolltech employee who could confirm (or deny)
that something in the build process can't handle spaces in
include and library dir, specifications ?
--
[ signature omitted ]
Message 9 in thread
Although my answer is in no way official (as i'm not from TT) i can
confirm that i was only able to build Qt+MySQL with no spaces in the
path (and VS2005 on Vista for what it's worth).
If anybody came to a solution i' eager to get to know it.
> peter wrote:
>> Why stay in pain and try to guess. Do, what I suggested to do and test
>> it again, pathes with spaces are always a pain.....
>
> Well, I don't want to guess; I'd prefer to know precisely what
> is failing so that I can avoid the problem in the future and in
> addition, the build takes so long that I don't want to go round
> this loop too many times. I want to get it right next time.
>
> Also I'd rather build the sources against the default MySQL
> installation, rather than have to document the fact that they
> must be installed into a location with no spaces.
>
> Is there any Trolltech employee who could confirm (or deny)
> that something in the build process can't handle spaces in
> include and library dir, specifications ?
>
--
[ signature omitted ]
Message 10 in thread
RZ wrote:
> Although my answer is in no way official (as i'm not from TT) i can
> confirm that i was only able to build Qt+MySQL with no spaces in the
> path (and VS2005 on Vista for what it's worth).
> If anybody came to a solution i' eager to get to know it.
OK, that's useful info. At some point, I'll reinstall mysql
at some more sensible location and try again.
--
[ signature omitted ]
Message 11 in thread
Hi,
> I'm trying to build the mysql plugin under Win32 with
> qt-win-opensource-src-4.3.2. I have a MySQL 5 development
> tree installed under:
>
> C:\Program Files\MySQL\MySQL Server 5.0
Where did you get it from, by the way? If the MySQL package is designed to
work with Visual, it probably won't work with MinGW without some tweaking.
This is not directly a Qt issue, rather an issue of compatibility between
MinGW and libraries built for Visual.
This is a different problem than the issue with spaces described below, but
you might hit after you resolve the issue with spaces.
> [...]
> Can someone suggest what the problem is, and how to fix it ?
I'm afraid I don't have a detailed explanation, but you might want to have a
look at this:
http://www.thelins.se/johan/2007/01/windows-mingw-qt-and-mysql.html
http://wiki.qtcentre.org/index.php?title=Building_the_QMYSQL_plugin_on_Windows_using_mingw
--
[ signature omitted ]
Message 12 in thread
Dimitri wrote:
> Hi,
>
>> I'm trying to build the mysql plugin under Win32 with
>> qt-win-opensource-src-4.3.2. I have a MySQL 5 development
>> tree installed under:
>>
>> C:\Program Files\MySQL\MySQL Server 5.0
>
> Where did you get it from, by the way? If the MySQL package is designed
> to work with Visual, it probably won't work with MinGW without some
> tweaking. This is not directly a Qt issue, rather an issue of
> compatibility between MinGW and libraries built for Visual.
>
> This is a different problem than the issue with spaces described below,
> but you might hit after you resolve the issue with spaces.
I got it from the MySQL download area on www.mysql.com.
I'm building with VS by the way, so mingw doesn't come into
the picture.
> I'm afraid I don't have a detailed explanation, but you might want to
> have a look at this:
> http://www.thelins.se/johan/2007/01/windows-mingw-qt-and-mysql.html
> http://wiki.qtcentre.org/index.php?title=Building_the_QMYSQL_plugin_on_Windows_using_mingw
Thanks, but I suspect they're irrelevant as I'm using VS.
What procedure does Trolltech use internally for building
against MySQL ? If you could describe that, then everyone else
could follow a method known to work.
--
[ signature omitted ]
Message 13 in thread
Stephen Collyer wrote:
> What procedure does Trolltech use internally for building
> against MySQL ? If you could describe that, then everyone else
> could follow a method known to work.
I always build the database driver plug-ins as described in the
documentation, but I don't have any spaces in my paths.
According to the documentation spaces are not accepted in include paths
on Windows. It can be worked around by using an 8.3 filename instead of
the full name, e.g. C:\progra~1\mysql instead of C:\Program Files\mysql.
See:
http://doc.trolltech.com/4.3/sql-driver.html#building-the-drivers-using-configure
Hope this helps.
--
[ signature omitted ]
Message 14 in thread
Anders Larsen wrote:
> According to the documentation spaces are not accepted in include paths
> on Windows.
Right. Thanmks for pointing that out. I had read that page
but I didn't the restriction laid out clearly like that. My mistake.
(I couldn't find it by googling either)
>It can be worked around by using an 8.3 filename instead of
> the full name, e.g. C:\progra~1\mysql instead of C:\Program Files\mysql.
OK.
> Hope this helps.
A lot. Thanks. BTW, is it likely that this restriction will be
fixed in the future ?
--
[ signature omitted ]
Message 15 in thread
Hi,
> Thanks, but I suspect they're irrelevant as I'm using VS.
They're actually relevant.
http://wiki.qtcentre.org/index.php?title=Building_the_QMYSQL_plugin_on_Windows_using_mingw
--
[ signature omitted ]
Pages: Prev | 1 | 2 | Next