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

DLL error on OSX and PostgreSQL #334

Closed
orionz opened this Issue May 18, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@orionz

orionz commented May 18, 2016

Trying out the diesel_demo on an OSX 10.11.4 laptop running postgresql.

Everything works up to the migration:

$ diesel migration run
thread '<main>' panicked at 'Error creating timestamp helper functions for Pg: DatabaseError("ERROR:  could not load library \"/usr/local/lib/postgresql/plpgsql.so\": dlopen(/usr/local/lib/postgresql/plpgsql.so, 10): Symbol not found: _DatumIsReadWriteExpandedObject\n  Referenced from: /usr/local/lib/postgresql/plpgsql.so\n  Expected in: /usr/local/opt/postgresql/bin/postgres\n in /usr/local/lib/postgresql/plpgsql.so\n")', ../src/libcore/result.rs:785
note: Run with `RUST_BACKTRACE=1` for a backtrace.
$ otool -l `which diesel` | grep libpq
 name /usr/local/opt/postgresql/lib/libpq.5.dylib (offset 24)

As you can see diesel is linked to libpq.5.dylib but is looking for plpgsql.so (which would make sense on linux but not osx). I can only assume somewhere the path is hardcoded for a linux install.

@orionz orionz closed this May 18, 2016

@orionz

This comment has been minimized.

orionz commented May 18, 2016

Things were configured wrong on my side - fixed.

@sgrif

This comment has been minimized.

Member

sgrif commented Sep 17, 2016

For anyone running into this in the future, this is caused by having postgres 9.5 installed, but pointed at a data directory for 9.4 (likely because you haven't run pg_upgrade yet)

@raywu

This comment has been minimized.

raywu commented May 31, 2018

@sgrif can you show me how to check what data directory postgres is pointing to?

Would something like this work?

// check installed version
$ postgres --version
postgres (PostgreSQL) 10.4

// check directory version
$ psql development_env
# select version();
                                                   version                                                    
--------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.5.3 on x86_64-apple-darwin14.5.0, compiled by Apple LLVM version 7.0.2 (clang-700.1.81), 64-bit
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment