Skip to content
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

Completely broken on v0.6 #52

Open
essenciary opened this issue Jun 26, 2017 · 5 comments · May be fixed by #53
Open

Completely broken on v0.6 #52

essenciary opened this issue Jun 26, 2017 · 5 comments · May be fixed by #53

Comments

@essenciary
Copy link

Sadly, this package is now completely broken on 0.6 :(

I started patching it but got stuck at

ERROR: LoadError: LoadError: UndefVarError: _IO_FILE not defined
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:569
 [2] include(::String) at ./sysimg.jl:14
 [3] include_from_node1(::String) at ./loading.jl:569
 [4] eval(::Module, ::Any) at ./boot.jl:235
 [5] _require(::Symbol) at ./loading.jl:483
 [6] require(::Symbol) at ./loading.jl:398
while loading /Users/adrian/.julia/v0.6/PostgreSQL/src/libpq_interface.jl, in expression starting on line 4
while loading /Users/adrian/.julia/v0.6/PostgreSQL/src/PostgreSQL.jl, in expression starting on line 10
@iamed2
Copy link
Contributor

iamed2 commented Jun 26, 2017

const _IO_FILE = Void

might work, not sure

@stevengj
Copy link

stevengj commented Jul 3, 2017

Where was _IO_FILE defined before? i.e. how did this code ever work? Or did you re-run Clang or something?

This is apparently used for C FILE* arguments, which are opaque pointers, so just Void should work.

A more basic issue, however is that libpq_interface.jl (the Clang-generated file) is picking up a whole bunch of C standard-library functions (fscanf, perror, etcetera) that you almost certainly don't need or want. Probably you just want to include the PQ* functions (PQuser etcetera) and filter out everything else.

@iamed2
Copy link
Contributor

iamed2 commented Jul 3, 2017

Current master works on 0.4.

It looks like libpq-fe.h includes stdio...maybe Clang.jl has an exclude list now. I ran it a very long time ago.

@tkelman
Copy link
Collaborator

tkelman commented Jul 3, 2017

how did this code ever work

ccall used to be oddly permissive of invalid code in parts it didn't use or call

@stevengj
Copy link

stevengj commented Jul 3, 2017

Probably easiest to just manually trim the unnecessary functions from that file for now. It is not very long, and the API seems small enough to maintain the wrappers manually.

@jgoldfar jgoldfar linked a pull request Jul 14, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants