Skip to content

Commit

Permalink
SQLite3 uses dl, so we need to ensure it's linked
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jun 21, 2018
1 parent f9b5a46 commit f4ffec2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/sqlite3/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def asplode missing
asplode('sqlite3.h') unless find_header 'sqlite3.h'
find_library 'pthread', 'pthread_create' # 1.8 support. *shrug*

have_library 'dl'

%w{ dlopen dlclose dlsym }.each do |func|
abort "missing function #{func}" unless have_func(func)
end

if with_config('sqlcipher')
asplode('sqlcipher') unless find_library 'sqlcipher', 'sqlite3_libversion_number'
else
Expand Down

1 comment on commit f4ffec2

@MSP-Greg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tenderlove

While removing the 'shared' fat binary code, I rebased on this, and had an error in the Appveyor log.

I like to think I can build, but I'm not a c type... Thanks, Greg

Please sign in to comment.