PostgreSQL.jl
PostgreSQL.jl copied to clipboard
Completely broken on v0.6
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
const _IO_FILE = Void
might work, not sure
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.
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.
how did this code ever work
ccall used to be oddly permissive of invalid code in parts it didn't use or call
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.