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

undefined symbol: _Static_assert - outdated gcc? #73

Closed
annaswims opened this issue Oct 18, 2017 · 4 comments
Closed

undefined symbol: _Static_assert - outdated gcc? #73

annaswims opened this issue Oct 18, 2017 · 4 comments

Comments

@annaswims
Copy link

annaswims commented Oct 18, 2017

I'm getting the error "undefined symbol: _Static_assert".

(just to prove that the db connection works)

$ bundle exec irb
irb(main):001:0> require 'pg'
=> true
irb(main):002:0> p = PGconn.open(:dbname => 'dbname', :port => 5432, :password=>"MYPASSWORD")
=> #<PG::Connection:0x00000001412110>
irb(main):003:0> statement = "SELECT * from people where id = 1"
=> "SELECT * from people where id = 1"
irb(main):004:0> res = p.exec(statement)
=> #<PG::Result:0x00000001ac40a8 @connection=#<PG::Connection:0x00000001412110>>

And the real problem...

irb(main):008:0> require 'pg_query'
=> true
irb(main):009:0> PgQuery.parse(statement)
irb: symbol lookup error: /applications/mobi/shared/bundle/ruby/extensions/x86_64-linux/pg_query-0.13.3/pg_query/pg_query.so: undefined symbol: _Static_assert

Is the problem that I'm using gcc version 4.4.7? My c knowledge is minimal, and I was hoping someone could confirm that this is the issue before I ask our sysadmin to consider updating gcc.

@lfittl
Copy link
Member

lfittl commented Oct 18, 2017

Hi @annaswims - thanks for the report.

It seems right now libpg_query requires at least gcc 4.6.0, but we should be good to loosen that restriction a bit to allow earlier versions as well. Let me see if I can get a quick bugfix release out for that today.

@annaswims
Copy link
Author

That's wonderful, but don't stress if it's too hard, we can just create a vm with a newer OS/gcc for our use.

@lfittl
Copy link
Member

lfittl commented Oct 20, 2017

@annaswims A fix for this is now released in version 0.13.4 - if you have a chance would be great if you could verify that indeed fixes it :)

Thanks again for the report!

@annaswims
Copy link
Author

That fixed it. Thanks so much!!!

lfittl added a commit to pganalyze/libpg_query that referenced this issue Oct 30, 2017
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

No branches or pull requests

2 participants