-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql_config not found on windows #3
Comments
see also ryantm/hdbc-mysql#5 |
i can hardcode let include = ["-I/c/Program Files/MySQL/MySQL Server 5.5/include/mysql"] and then $ cabal install --extra-lib-dirs="C:\Program Files\MySQL\MySQL Server 5.5\lib" Resolving dependencies... if i switch to mysql 5.6 $ perl "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql_config.pl" after copying those include/libs into Setup, $ cabal install --extra-lib-dirs="C:\Program Files\MySQL\MySQL Server 5.6\lib" Resolving dependencies... so i commented out line 315 in mysql_com.h, and then: $ cabal install --extra-lib-dirs="C:\Program Files\MySQL\MySQL Server 5.6\lib" cbits\mysql_signals.c:20:2: cbits\mysql_signals.c:21:2: cbits\mysql_signals.c:21:18: cbits\mysql_signals.c:21:18: cbits\mysql_signals.c:22:18: cbits\mysql_signals.c:45:5: so i commented out lines 21 and 22 in mysql_signals.c, and then finally! $ cabal install --extra-lib-dirs="C:\Program Files\MySQL\MySQL Server 5.6\lib" cbits\mysql_signals.c:20:2: cbits\mysql_signals.c:45:5: Warning: resolving __hs_mysql_ping by linking to __hs_mysql_ping@4 Warning: resolving __hs_mysql_fetch_row by linking to __hs_mysql_fetch_row@4 whew! |
but then, when i try to install something that uses it: $ cabal install --extra-lib-dirs="C:\Program Files\MySQL\MySQL Server 5.6\lib" Resolving dependencies... note there is a .lib, not a .dll, by that name: $ ls -al "C:\Program Files\MySQL\MySQL Server 5.6\lib" |
if i follow the advice here, to copy libmysql.dll to mysqlclient.dll: i get: ... |
I have managed to install mysql by modifying Setup.hs to run perl with the mysql_config.pl script.
And a lot more. Any ideas? I need to connect to MySql via Haskell and I run on windows, it's a bit depressing to see Unix-only haskell bindings... |
When I add extra-libraries:mysql to the mysql Cabal file, the undefined reference to mysql_* disappear, but undefined references to hs* remain. I suspect maybe an issue with calling conventions under MINGW? |
Sorry for the constant updates, but at least there'll be a trace. I've force the removal of stdcall in mysql.h and I can get my executable to compile successfully! It now crashes while trying to connect. There's probably a worry with the libmysql.dll file... |
Hi, C:\Users\Ruru>cabal install mysql Environment Description Windows 7 x64 Path = C:\Program Files\Haskell Platform\2014.2.0.0\mingw\bin;C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin;C:\Users\Ruru\AppData\Roaming\cabal\bin;C:\Program1\Android\android-sdk\platform-tools;C:\Program Files (x86)\MySQL\MySQL Server 5.6\lib |
I have hardcoded path. or the result in both cases is
|
Is there any workaround for this? I've tried adding
|
I've managed to work around this issue by installing strawberryperl and directly modifying the Setup.lhs to run perl with
|
and after building with
I guess this problem runs deeper than first seemed |
Ok so I've managed to get this to build, similarly to what @eflister says.
typedef struct { /* signal set type */
unsigned long __sigbits[4];
} sigset_t; Following all of this, I could then install with
|
Just a minor update for those who end up finding this issue. I managed to get my app working by replacing the |
@darthdeus I am trying to make up everything using stack, because I am following the yesod quickstart page (http://www.yesodweb.com/page/quickstart). I have used these commands: stack new my-project yesod-mysql && cd my-project in the last one I get the following message:
How can I make what you said in this situation "I managed to get my app working by replacing the mysql package with ODBC altogether (specifically persistent-odbc)" As you see I am a beginner in Yesod, so please, try to explain detailed... |
@felipexpert I had this issue in mac os and stack too, and I fixed by just making available in the console the program 'mysql_config' which was located in '/usr/local/mysql/bin'. Maybe that is what you can do in windows to fix that. |
Thank you for communicating. On Fri, Apr 22, 2016 at 8:50 AM, Carlos Gómez notifications@github.com
Felipe Carmona Miquilini |
Encountered this problem on Ubuntu and solved with this
|
i can 'mingw-get install msys-perl', which lets me 'perl "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql_config.pl"' , or even just 'mysql_config.pl', but not just 'mysql_config'
so cabal install gives:
Linking .\dist\setup\setup.exe ...
Configuring mysql-0.1.1.4...
setup.exe: The program mysql_config is required but it could not be found
cabal: Error: some packages failed to install:
mysql-0.1.1.4 failed during the configure step. The exception was:
ExitFailure 1
but if i change the argument of findProgramLocation in Setup to 'mysql_config.pl', i get:
Configuring mysql-0.1.1.4...
setup.exe: c:\Program Files\MySQL\MySQL Server 5.5\bin\mysql_config.pl:
invalid argument
cabal.exe: Error: some packages failed to install:
mysql-0.1.1.4 failed during the configure step. The exception was:
ExitFailure 1
$ mysql_config.pl
Usage: /c/Program Files/MySQL/MySQL Server 5.5/bin/mysql_config.pl [OPTIONS]
Options:
--cflags ["-I/c/Program Files/MySQL/MySQL Server 5.5/include/mys
ql" "/MT" "/Zi" "/O2" "/Ob1" "/D" "NDEBUG" "-DDBUG_OFF"]
--include ["-I/c/Program Files/MySQL/MySQL Server 5.5/include/mys
ql"]
--libs ["-L/c/Program Files/MySQL/MySQL Server 5.5/lib" "-lmys
qlclient" "ws2_32 Secur32 "]
--libs_r ["-L/c/Program Files/MySQL/MySQL Server 5.5/lib" "-lmys
qlclient_r" "ws2_32 "]
--socket [/tmp/mysql.sock]
--port [0]
--version [5.5.28]
--libmysqld-libs ["-L/c/Program Files/MySQL/MySQL Server 5.5/lib" "-lmys
qld" "ws2_32 "]
The text was updated successfully, but these errors were encountered: