{"action":"created","issue":{"url":"https://api.github.com/repos/knq/usql/issues/17","repository_url":"https://api.github.com/repos/knq/usql","labels_url":"https://api.github.com/repos/knq/usql/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/knq/usql/issues/17/comments","events_url":"https://api.github.com/repos/knq/usql/issues/17/events","html_url":"https://github.com/knq/usql/issues/17","id":215127420,"number":17,"title":"Problems with building oracle version on Windows ","user":{"login":"majkinetor","id":85767,"avatar_url":"https://avatars2.githubusercontent.com/u/85767?v=3","gravatar_id":"","url":"https://api.github.com/users/majkinetor","html_url":"https://github.com/majkinetor","followers_url":"https://api.github.com/users/majkinetor/followers","following_url":"https://api.github.com/users/majkinetor/following{/other_user}","gists_url":"https://api.github.com/users/majkinetor/gists{/gist_id}","starred_url":"https://api.github.com/users/majkinetor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majkinetor/subscriptions","organizations_url":"https://api.github.com/users/majkinetor/orgs","repos_url":"https://api.github.com/users/majkinetor/repos","events_url":"https://api.github.com/users/majkinetor/events{/privacy}","received_events_url":"https://api.github.com/users/majkinetor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-03-17T21:31:08Z","updated_at":"2017-03-18T03:51:45Z","closed_at":"2017-03-18T03:46:42Z","body":"Here is the complete setup I used to build u-sql exe on Windows with oracle support:\r\n\r\n## Environment\r\n\r\n- Windows 10\r\n- Powershell 5\r\n\r\n## Build\r\n\r\n1. Installed golang and gcc stuff with chocolatey:\r\n```powershell\r\n#iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex\r\nchoco install golang mingw pkgconfiglite\r\nrefreshenv\r\n```\r\n\r\n2. Downloaded [Instant Client Downloads for Microsoft Windows (x64)](http://www.oracle.com/technetwork/topics/winx64soft-089540.html). All zip files extracted into the same directory `c:\\oracle\\instantclient_12_1`\r\n\r\n3. Created file `c:\\oracle\\oci8.pc` file with the following content:\r\n```\r\nprefix=/devel/target/1.0\r\nexec_prefix=${prefix}\r\nlibdir=C:/oracle/instantclient_12_1/sdk/lib/msvc\r\nincludedir=C:/oracle/instantclient_12_1/sdk/include\r\noralib=C:/oracle/instantclient_12_1/sdk/lib/msvc\r\norainclude=C:/oracle/instantclient_12_1/sdk/include\r\ngcclib=c:/tools/mingw64/lib\r\ngccinclude=c:/tools/mingw64/lib\r\nglib_genmarshal=glib-genmarshal\r\ngobject_query=gobject-query\r\nglib_mkenums=glib-mkenums\r\nName: oci8\r\nVersion: 12.1\r\nDescription: oci8 library\r\nLibs: -L${oralib} -L${gcclib} -loci\r\nLibs.private:\r\nCflags: -I${orainclude} -I${gccinclude}\r\n```\r\n\r\n4. Run the following build command:\r\n```powershell\r\n$Env:PKG_CONFIG_PATH=\"c:\\oracle\"  #location of oci8.pc\r\ngo get -u -tags oracle github.com/knq/usql\r\n```\r\n\r\nIt builds without problems and produces ~ 13MB file in `$HOME\\go\\bin\\usql.exe`\r\nWhen I run it nothing happens - no error, no output, no nothing. When I build non oracle binary everything works as expected.\r\n\r\nUsing dependency walker I found out that many of the DLLs are missing:\r\n```\r\n       Module                                                        File Time Stamp   Link Time Stamp   File Size   Attr.  Link Checksum  Real Checksum  CPU  Subsystem  Symbols     Preferred Base      Actual Base  Virtual Size  Load Order  File Ver        Product Ver     Image Ver    Linker Ver  OS Ver  Subsystem Ver\r\n-----  ------------------------------------------------------------  ----------------  ----------------  ----------  -----  -------------  -------------  ---  ---------  ----------  ------------------  -----------  ------------  ----------  --------------  --------------  -----------  ----------  ------  -------------\r\n[ ? ]  API-MS-WIN-CORE-APIQUERY-L1-1-0.DLL                           Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-APPCOMPAT-L1-1-1.DLL                          Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-APPINIT-L1-1-0.DLL                            Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-ATOMS-L1-1-0.DLL                              Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-CRT-L1-1-0.DLL                                Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-CRT-L2-1-0.DLL                                Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-DATETIME-L1-1-2.DLL                           Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-DELAYLOAD-L1-1-1.DLL                          Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-ENCLAVE-L1-1-0.DLL                            Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-ERRORHANDLING-L1-1-3.DLL                      Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-FIBERS-L2-1-1.DLL                             Error opening file. The system cannot find the file specified (2).\r\n[ ? ]  API-MS-WIN-CORE-FILE-L1-2-2.DLL                               Error opening file. The system cannot find the file\r\n...\r\n```\r\n\r\nLooks like vcredist but I have all installed:\r\n...\r\n> choco list -l vcredist\r\nChocolatey v0.10.3\r\nvcredist140 14.10.25008.0\r\nvcredist2008 9.0.30729.6161\r\nvcredist2010 10.0.40219.2\r\nvcredist2012 11.0.61031\r\nvcredist2015 14.0.24215.20170201\r\n5 packages installed.\r\n...\r\n\r\nI would appreciate any help. "},"comment":{"url":"https://api.github.com/repos/knq/usql/issues/comments/287514064","html_url":"https://github.com/knq/usql/issues/17#issuecomment-287514064","issue_url":"https://api.github.com/repos/knq/usql/issues/17","id":287514064,"user":{"login":"kenshaw","id":2274859,"avatar_url":"https://avatars2.githubusercontent.com/u/2274859?v=3","gravatar_id":"","url":"https://api.github.com/users/kenshaw","html_url":"https://github.com/kenshaw","followers_url":"https://api.github.com/users/kenshaw/followers","following_url":"https://api.github.com/users/kenshaw/following{/other_user}","gists_url":"https://api.github.com/users/kenshaw/gists{/gist_id}","starred_url":"https://api.github.com/users/kenshaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenshaw/subscriptions","organizations_url":"https://api.github.com/users/kenshaw/orgs","repos_url":"https://api.github.com/users/kenshaw/repos","events_url":"https://api.github.com/users/kenshaw/events{/privacy}","received_events_url":"https://api.github.com/users/kenshaw/received_events","type":"User","site_admin":false},"created_at":"2017-03-18T03:51:45Z","updated_at":"2017-03-18T03:51:45Z","body":"Oh, one more note -- running `usql.exe` when properly built with Oracle support requires more than just registering the `OCI.dll`. I'm not sure exactly *which* DLLs need to be registered/present, as the instantclient Windows libs doesn't seem to have any kind of documentation, or \"installer\" with it. As such, I just copied all of the instantclient files into the same working directory as the output dir for `usql.exe`."}}
{"actor":{"display_login":"kenshaw"}}