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

On OpenBSD/ad 7.4 pg_query generates the error Unable to resolve symbol - Init_pg_query #315

Open
vtamara opened this issue May 8, 2024 · 0 comments

Comments

@vtamara
Copy link

vtamara commented May 8, 2024

My platform is:

% uname -a
OpenBSD mi.mi.org 7.4 APRENDIENDODEJESUS.MP#7 amd64
% ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-openbsd]
% psql --version
psql (PostgreSQL) 16.2

I installed with:

% doas gem install pg_query
Fetching google-protobuf-4.26.1.gem
Fetching pg_query-5.1.0.gem
Building native extensions. This could take a while...
Successfully installed google-protobuf-4.26.1
Building native extensions. This could take a while...
Successfully installed pg_query-5.1.0
Parsing documentation for google-protobuf-4.26.1
Installing ri documentation for google-protobuf-4.26.1
Parsing documentation for pg_query-5.1.0
Installing ri documentation for pg_query-5.1.0
Done installing documentation for google-protobuf, pg_query after 2 seconds
2 gems installed

The minimal example I'm using in a file e.rb is:

require "pg_query"
puts PgQuery.parse("SELECT 1").inspect 

Running with ruby e.rb produces:

<internal:/usr/local/lib/ruby/site_ruby/3.3/rubygems/core_ext/kernel_require.rb>:136:in `require': Unable to resolve symbol - Init_pg_query (LoadError)
        from <internal:/usr/local/lib/ruby/site_ruby/3.3/rubygems/core_ext/kernel_require.rb>:136:in `require'
        from /usr/local/lib/ruby/gems/3.3/gems/pg_query-5.1.0/lib/pg_query.rb:7:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.3/rubygems/core_ext/kernel_require.rb>:141:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.3/rubygems/core_ext/kernel_require.rb>:141:in `rescue in require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.3/rubygems/core_ext/kernel_require.rb>:135:in `require'
        from e.rb:1:in `<main>'
<internal:/usr/local/lib/ruby/site_ruby/3.3/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- pg_query (LoadError)
        from <internal:/usr/local/lib/ruby/site_ruby/3.3/rubygems/core_ext/kernel_require.rb>:136:in `require'
        from e.rb:1:in `<main>'

Any suggestions how to diagnose better or how to solve?

@vtamara vtamara changed the title On OpenBSD/ad 7.4 trying to use generates the error Unable to resolve symbol - Init_pg_query On OpenBSD/ad 7.4 pg_query generates the error Unable to resolve symbol - Init_pg_query May 8, 2024
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

1 participant