-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Various errors on Windows #159
Comments
So the problem you have is about the dll dependencies of the windows binary I prepared. The way the pgloader code now loads the librairies have changed and it might be that I could produce a better windows executable file, going to try and see. Meanwhile, as I know nothing about working on windows, maybe you'd want to setup a build environment for pgloader? It must be noted that the current simplest way out for you here might be to just install an linux (ubuntu, say) Virtual Machine and operate pgloader from there. |
Thanks for the quick response. Unfortunately I know very little about using linux and would really like to stick to Windows if you're willing and able to work that out. I'll download their technical preview and put that and a sample database on a VM for you to test with, I don't think there would be licensing issues with that as they've given it out for free for testing. |
Found a windows VM where I could still build pgloader, so let's have a try. Ironically I don't have a Please try the version from http://pgloader.io/files/pgloader.95961a4.exe And here's the diff I came up with to have a working binary (quickly tested, even): diff --git a/pgloader.asd b/pgloader.asd
index 402c91c..3f9244f 100644
--- a/pgloader.asd
+++ b/pgloader.asd
@@ -31,7 +31,7 @@
#:trivial-backtrace ; For --debug cli usage
#:cl-markdown ; To produce the website
#:metabang-bind ; the bind macro
- #:mssql ; M$ SQL connectivity
+ ;#:mssql ; M$ SQL connectivity
#:uuid ; Transforming MS SQL unique identifiers
)
:components
@@ -44,7 +44,8 @@
(:module "monkey"
:components
((:file "bind")
- (:file "mssql")))
+ ;; (:file "mssql")
+ ))
(:module "utils"
:depends-on ("package" "params")
@@ -158,15 +159,15 @@
:depends-on ("sqlite-cast-rules"
"sqlite-schema"))))
- (:module "mssql"
- :depends-on ("common")
- :components
- ((:file "mssql-cast-rules")
- (:file "mssql-schema"
- :depends-on ("mssql-cast-rules"))
- (:file "mssql"
- :depends-on ("mssql-cast-rules"
- "mssql-schema"))))
+ ;; (:module "mssql"
+ ;; :depends-on ("common")
+ ;; :components
+ ;; ((:file "mssql-cast-rules")
+ ;; (:file "mssql-schema"
+ ;; :depends-on ("mssql-cast-rules"))
+ ;; (:file "mssql"
+ ;; :depends-on ("mssql-cast-rules"
+ ;; "mssql-schema"))))
(:module "mysql"
:depends-on ("common")
diff --git a/src/hooks.lisp b/src/hooks.lisp
index 97ec7bc..9f11596 100644
--- a/src/hooks.lisp
+++ b/src/hooks.lisp
@@ -15,7 +15,8 @@
"Close Foreign libs in use by pgloader at application save time."
(let (#+sbcl (sb-ext:*muffled-warnings* 'style-warning))
(mapc #'cffi:close-foreign-library '(cl+ssl::libssl
- mssql::sybdb))))
+ ;; mssql::sybdb
+ ))))
(defun open-foreign-libs ()
"Open Foreign libs in use by pgloader at application start time."
diff --git a/src/parsers/command-mssql.lisp b/src/parsers/command-mssql.lisp
index 622e2c5..45b35dc 100644
--- a/src/parsers/command-mssql.lisp
+++ b/src/parsers/command-mssql.lisp
@@ -117,8 +117,8 @@
(excluding))
`(lambda ()
;; now is the time to load the CFFI lib we need (freetds)
- (let (#+sbcl(sb-ext:*muffled-warnings* 'style-warning))
- (cffi:load-foreign-library 'mssql::sybdb))
+ ;; (let (#+sbcl(sb-ext:*muffled-warnings* 'style-warning))
+ ;; (cffi:load-foreign-library 'mssql::sybdb))
(let* ((state-before (pgloader.utils:make-pgstate))
(*state* (or *state* (pgloader.utils:make-pgstate))) |
Thanks, I get the same error with the new .exe though. With the libssl32.dll and sqlite3.dll files added my error message has become "The procedure entry point EVP_md2 could not be located in the dynamic link ;ibrary 'my_path/'libssl32.dll." as shown here https://shwivel.in/pgloader/pgloader.html I made that video when running your initial exe but the same error occurs with the last one. I sent a link to my full VM to the email address you have on your github. |
I think the error has to do with the dll files that are for whatever reason not present in the postgresql 'portable' app at http://sourceforge.net/projects/postgresqlportable/ and is unrelated to your exe. I just tested your new exe on a full postgresql 9.4 install and don't receive any dll related errors. I did get the sqlite3.dll error but simply putting it in the bin folder resolved that. I think the error I am getting now has to do with the syntax of my control file. Could you please review the below: Table is:
Control file is:
Windows .bat file to run the control file is:
My more_fish.txt file that I'm trying to import is:
This is the error I get: Thanks |
I fixed it by adding the line separator as shown below, will have to do some more reading of your docs as to writing out the control files but looks like I am all set to go. I appreciate your help, this will be very useful.
|
Nice to see the issue fixed. FWIW I tried parsing your command without the line ending comment tricks and it worked for me here. |
I have the same issue, running on windows 7, 64 bits.
I previously added the libeay32.dll file, and now its sqlite3.dll missing. Is there something i'm missing to use pgloader on win64 ? |
You need to have the sqlite dll with the current executable, I will need to either make that dependency optional like the others or provide for it in the next release. |
Ok, so now libssl32.dll is missing.
|
Rinse, repeat.The OpenSSL should be only loaded opportunitiscally, at the connection driver's request. |
I just wanted to update this to provide a brief guide of the problems I encountered, and how they were fixed, for anyone else who needs assistance with the issues in this thread. This is for using Pgloader, in Windows (my install is Windows 8.1 64-bit), and I was specifically migrating from MySQL to Postgres in my usage.
|
oh wow, thanks for that feedback. We should probably find out what's about that EVP_md2 and avoid pushing users through the SBCL interactive debugger too... Building on windows should be simple enough nowadays if you can provide the freetds dll, or again using the patch above. Any chance you would try building from sources? |
OK, so I've given building a bit of a shot, but without success. Primarily, I work with databases and scripting languages doing for data analytics, so compiling a Lisp application isn't exactly my strong suit. I have a relatively new computer here, so I cloned a copy of pgloader, and then made sure I had installed Gnu make, SBCL, and cURL on the machine, since it is a Windows box. I ran the makefile, though, and it still hits a bit of a snag during compilation. I get the following response:
I tried copying the 'libssl32.dll' file to the main pgloader folder (same as the makefile), to the src folder, and to the build folder. Each of the three cases still throws the same error during compilation. Not sure where exactly to go from there. |
I am not versed at all on the windows platform, I would still try copying the ddl into the same folder as where the sbcl binary is to be found, as it is this executable which is trying to load it when compiling... |
Just to let you know, I gave compilation a shot, trying to fix the libssl32.dll issues, but no matter where I put the file during compilation, I always got an error saying the specified module could not be found. I'm just in over my head on this particular problem... |
I've also tested pgloader on a windows virtual box (after temporary solving the issues with missing dlls using the above tips), but it is not as fast as I expected, in fact for my table ~ 3 million records it is slower than the standard [copy to] command (7 min vs 4 min). I relay think that parallel batch processing/loading is needed. Any idea of how to increase the performance of the actual pgloader? One of the scripts used for testing is:
|
pgloader uses the COPY protocol and can not be faster than COPY with the current solution. The only way to beat COPY is to handle more than one COPY process to load a single data source, as you're saying. pgloader is what to use to improve error handling and data processing, not for improving raw performances of data loading. |
thanks for the quick response. "handle more than one COPY process to load a single data source" -- is this on your to do list, do yo have an ETA? I really need a solution to load big data (ex: 1 billion rows) into postgres and not waiting for days to finish the loading. Do you have a suggestion/tips? |
No ETA yet, I intend to implement single-reader multiple-writers architecture in pgloader at some point. Of course if you're interested about sponsoring the feature, we can work on a proper schedule. Meanwhile, is it possible for you to somehow split the data in the source? |
"Of course if you're interested about sponsoring the feature, we can work on a proper schedule." -- I'm not in this position to decide about sponsoring but we will see. "Meanwhile, is it possible for you to somehow split the data in the source?" -- I think this could be a solution. |
Just thought I'd share my experience with Windows 7 64-bit, using the 95961a4 pgloader .exe linked early in this thread.
From there, I was able to run pgloader, porting a relatively simple Django database from MySQL 5.6.12 to PostgreSQL 9.5.1. (The only thing I needed the command file for was I can't comment on building pgloader from source, I'm afraid. I didn't feel that the latest pgloader was necessary for me, since my Windows use case is only for my development machine (not production), and my project's database usage isn't that specialized. |
Windows default end of line is #\Return then #\Newline and the parser gets to see both of them, so it needs to be prepared. See #159 which is all about windows support.
Thanks for your feedback, I could test with tweaking a test file to have windows-style end-of-lines and sure enough could reproduce (then fix) the bug here. Build-dependencies shouldn't be a big problem even on windows, if you want to see about that. |
Hello, Can someone give me the link for Windows version of pgloader, so that I can test and use?� I couldn't find in the pgloader.io website. |
I don't build binaries for windows because I don't own any license for any version of the system. You can build from sources, you need some command line tools and either SBCL or CCL for windows. Best option I think is to grab the latest released bundle and build from there. See https://github.com/dimitri/pgloader/releases. |
I am having trouble getting any basic load to work using the Windows program (pgloader-3.1.ed853a7.exe) provided at http://pgloader.io/
I go over the details in a question I asked recently at stack overflow:
http://stackoverflow.com/questions/28130419/pgloader-error-sqlite3-dll-but-am-not-using-sqlite
Could you please take a look when you have time and let me know what you think?
Thanks
The text was updated successfully, but these errors were encountered: