Git Product home page Git Product logo

dbm's Introduction

Actions Status: MinGW Actions Status: RJIT Actions Status: Ubuntu Actions Status: Windows Travis Status

What is Ruby?

Ruby is an interpreted object-oriented programming language often used for web development. It also offers many scripting features to process plain text and serialized files, or manage system tasks. It is simple, straightforward, and extensible.

Features of Ruby

  • Simple Syntax
  • Normal Object-oriented Features (e.g. class, method calls)
  • Advanced Object-oriented Features (e.g. mix-in, singleton-method)
  • Operator Overloading
  • Exception Handling
  • Iterators and Closures
  • Garbage Collection
  • Dynamic Loading of Object Files (on some architectures)
  • Highly Portable (works on many Unix-like/POSIX compatible platforms as well as Windows, macOS, etc.) cf. https://docs.ruby-lang.org/en/master/maintainers_md.html#label-Platform+Maintainers

How to get Ruby

For a complete list of ways to install Ruby, including using third-party tools like rvm, see:

https://www.ruby-lang.org/en/downloads/

You can download release packages and the snapshot of the repository. If you want to download whole versions of Ruby, please visit https://www.ruby-lang.org/en/downloads/releases/.

Download with Git

The mirror of the Ruby source tree can be checked out with the following command:

$ git clone https://github.com/ruby/ruby.git

There are some other branches under development. Try the following command to see the list of branches:

$ git ls-remote https://github.com/ruby/ruby.git

You may also want to use https://git.ruby-lang.org/ruby.git (actual master of Ruby source) if you are a committer.

How to build

See Building Ruby

Ruby home page

https://www.ruby-lang.org/

Documentation

Mailing list

There is a mailing list to discuss Ruby. To subscribe to this list, please send the following phrase:

join

in the mail subject (not body) to the address [email protected].

Copying

See the file COPYING.

Feedback

Questions about the Ruby language can be asked on the Ruby-Talk mailing list or on websites like https://stackoverflow.com.

Bugs should be reported at https://bugs.ruby-lang.org. Read "Reporting Issues" for more information.

Contributing

See "Contributing to Ruby", which includes setup and build instructions.

The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.

[email protected]

dbm's People

Contributors

akr avatar dependabot[bot] avatar dsisnero avatar eban avatar hsbt avatar jeremyevans avatar knu avatar ko1 avatar mame avatar nobu avatar nurse avatar olleolleolle avatar shirosaki avatar shugo avatar shyouhei avatar unak avatar znz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dbm's Issues

Gem update fails on Ruby for Windows

Unable to update dbm gem under Ruby for Windows (Win 10 x64, installed via Chocolatey).

ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32]
gem 3.1.2

This is the error I get when I run gem update:

>gem update
Updating installed gems
Updating dbm
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing dbm:
        ERROR: Failed to build gem native extension.

    current directory: C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/dbm-1.1.0/ext/dbm
C:/tools/ruby26/bin/ruby.exe -I C:/tools/ruby26/lib/ruby/site_ruby/2.6.0 -r ./siteconf20191226-12392-3k8zod.rb extconf.rb
checking for DBM in ndbm.h... no
checking for DBM in db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db2/db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db2.h with -DDB_DBM_HSEARCH... no
checking for DBM in db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db1/ndbm.h... no
checking for DBM in db1.h... no
checking for DBM in ndbm.h... no
checking for DBM in db6/db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db6.h with -DDB_DBM_HSEARCH... no
checking for DBM in db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db5/db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db5.h with -DDB_DBM_HSEARCH... no
checking for DBM in db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db4/db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db4.h with -DDB_DBM_HSEARCH... no
checking for DBM in db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db3/db.h with -DDB_DBM_HSEARCH... no
checking for DBM in db3.h with -DDB_DBM_HSEARCH... no
checking for DBM in db.h with -DDB_DBM_HSEARCH... no
checking for -lgdbm... no
checking for -lgdbm... no
checking for -lgdbm... no
checking for DBM in gdbm-ndbm.h... no
checking for DBM in gdbm/ndbm.h... no
checking for DBM in ndbm.h... no
checking for DBM in qdbm/relic.h... no
checking for DBM in relic.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/tools/ruby26/bin/$(RUBY_BASE_NAME)
        --with-dbm-dir
        --without-dbm-dir
        --with-dbm-include
        --without-dbm-include=${dbm-dir}/include
        --with-dbm-lib
        --without-dbm-lib=${dbm-dir}/lib
        --with-dbm-type
        --without-dbm-type
        --with-gdbmlib
        --without-gdbmlib
        --with-gdbmlib
        --without-gdbmlib
        --with-gdbmlib
        --without-gdbmlib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  C:/tools/ruby26/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/dbm-1.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/dbm-1.1.0 for inspection.
Results logged to C:/tools/ruby26/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/dbm-1.1.0/gem_make.out
Updating gdbm
Building native extensions. This could take a while...
ERROR:  Error installing gdbm:
        ERROR: Failed to build gem native extension.

    current directory: C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/gdbm-2.1.0/ext/gdbm
C:/tools/ruby26/bin/ruby.exe -I C:/tools/ruby26/lib/ruby/site_ruby/2.6.0 -r ./siteconf20191226-12392-pqp00j.rb extconf.rb
checking for gdbm_open() in -lgdbm... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/tools/ruby26/bin/$(RUBY_BASE_NAME)
        --with-gdbm-dir
        --without-gdbm-dir
        --with-gdbm-include
        --without-gdbm-include=${gdbm-dir}/include
        --with-gdbm-lib
        --without-gdbm-lib=${gdbm-dir}/lib
        --with-gdbmlib
        --without-gdbmlib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  C:/tools/ruby26/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/gdbm-2.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/gdbm-2.1.0 for inspection.
Results logged to C:/tools/ruby26/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/gdbm-2.1.0/gem_make.out
Gems updated: dbm gdbm

And this is the mkmf.log file:

have_library: checking for gdbm_open() in -lgdbm... -------------------- no

"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/tools/ruby26/include/ruby-2.6.0/x64-mingw32 -IC:/tools/ruby26/include/ruby-2.6.0/ruby/backward -IC:/tools/ruby26/include/ruby-2.6.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math conftest.c  -L. -LC:/tools/ruby26/lib -L. -pipe -s     -lx64-msvcrt-ruby260  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */

"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/tools/ruby26/include/ruby-2.6.0/x64-mingw32 -IC:/tools/ruby26/include/ruby-2.6.0/ruby/backward -IC:/tools/ruby26/include/ruby-2.6.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math conftest.c  -L. -LC:/tools/ruby26/lib -L. -pipe -s     -lx64-msvcrt-ruby260 -lgdbm  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
conftest.c: In function 't':
conftest.c:17:57: error: 'gdbm_open' undeclared (first use in this function)
   17 | int t(void) { void ((*volatile p)()); p = (void ((*)()))gdbm_open; return !p; }
      |                                                         ^~~~~~~~~
conftest.c:17:57: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: 
 6: /*top*/
 7: extern int t(void);
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     int (* volatile tp)(void)=(int (*)(void))&t;
12:     printf("%d", (*tp)());
13:   }
14: 
15:   return 0;
16: }
17: int t(void) { void ((*volatile p)()); p = (void ((*)()))gdbm_open; return !p; }
/* end */

"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/tools/ruby26/include/ruby-2.6.0/x64-mingw32 -IC:/tools/ruby26/include/ruby-2.6.0/ruby/backward -IC:/tools/ruby26/include/ruby-2.6.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -O3 -fno-fast-math conftest.c  -L. -LC:/tools/ruby26/lib -L. -pipe -s     -lx64-msvcrt-ruby260 -lgdbm  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi  "
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgdbm
collect2.exe: error: ld returned 1 exit status
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: #include <winsock2.h>
 4: #include <windows.h>
 5: 
 6: /*top*/
 7: extern int t(void);
 8: int main(int argc, char **argv)
 9: {
10:   if (argc > 1000000) {
11:     int (* volatile tp)(void)=(int (*)(void))&t;
12:     printf("%d", (*tp)());
13:   }
14: 
15:   return 0;
16: }
17: extern void gdbm_open();
18: int t(void) { gdbm_open(); return 0; }
/* end */

--------------------

Gem update fails on Ubuntu 18.04

When I try to update the dbm gem on ubuntu 18.04 I receive the following error:

Updating dbm
Building native extensions. This could take a while...
ERROR:  Error installing dbm:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/dbm-1.1.0/ext/dbm
/usr/bin/ruby2.5 -I /usr/local/lib/site_ruby/2.5.0 -r ./siteconf20200115-24133-6eh10c.rb extconf.rb
checking for -lgdbm... yes
checking for DBM in gdbm-ndbm.h... no
checking for -lgdbm... yes
checking for DBM in gdbm/ndbm.h... no
checking for -lgdbm... yes
checking for DBM in ndbm.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/$(RUBY_BASE_NAME)2.5
        --with-dbm-dir
        --without-dbm-dir
        --with-dbm-include
        --without-dbm-include=${dbm-dir}/include
        --with-dbm-lib
        --without-dbm-lib=${dbm-dir}/lib
        --with-dbm-type
        --with-gdbmlib
        --without-gdbmlib
        --with-gdbmlib
        --without-gdbmlib
        --with-gdbmlib
        --without-gdbmlib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/dbm-1.1.0/mkmf.log

extconf failed, exit code 1

mkmf.log:

have_library: checking for -lgdbm... -------------------- yes

"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.5.0 -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.5-B0MvC_/ruby2.5-2.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c  -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic     -lruby-2.5  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.5.0 -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.5-B0MvC_/ruby2.5-2.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c  -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic     -lruby-2.5 -lgdbm  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: 
14: int t(void) { ; return 0; }
/* end */

--------------------

have_type: checking for DBM in gdbm-ndbm.h... -------------------- no

"gcc -I/usr/include/x86_64-linux-gnu/ruby-2.5.0 -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.5-B0MvC_/ruby2.5-2.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC   -c conftest.c"
conftest.c:3:10: fatal error: gdbm-ndbm.h: No such file or directory
 #include <gdbm-ndbm.h>
          ^~~~~~~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <gdbm-ndbm.h>
4: 
5: /*top*/
6: typedef DBM conftest_type;
7: int conftestval[sizeof(conftest_type)?1:-1];
/* end */

--------------------

have_library: checking for -lgdbm... -------------------- yes

"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.5.0 -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.5-B0MvC_/ruby2.5-2.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c  -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic     -lruby-2.5 -lgdbm  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: 
14: int t(void) { ; return 0; }
/* end */

--------------------

have_type: checking for DBM in gdbm/ndbm.h... -------------------- no

"gcc -I/usr/include/x86_64-linux-gnu/ruby-2.5.0 -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.5-B0MvC_/ruby2.5-2.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC   -c conftest.c"
conftest.c:3:10: fatal error: gdbm/ndbm.h: No such file or directory
 #include <gdbm/ndbm.h>
          ^~~~~~~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <gdbm/ndbm.h>
4: 
5: /*top*/
6: typedef DBM conftest_type;
7: int conftestval[sizeof(conftest_type)?1:-1];
/* end */

--------------------

have_library: checking for -lgdbm... -------------------- yes

"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.5.0 -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.5-B0MvC_/ruby2.5-2.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c  -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic     -lruby-2.5 -lgdbm  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: 
14: int t(void) { ; return 0; }
/* end */

--------------------

have_type: checking for DBM in ndbm.h... -------------------- no

"gcc -I/usr/include/x86_64-linux-gnu/ruby-2.5.0 -I/usr/include/ruby-2.5.0/ruby/backward -I/usr/include/ruby-2.5.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.5-B0MvC_/ruby2.5-2.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC   -c conftest.c"
conftest.c:3:10: fatal error: ndbm.h: No such file or directory
 #include <ndbm.h>
          ^~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <ndbm.h>
4: 
5: /*top*/
6: typedef DBM conftest_type;
7: int conftestval[sizeof(conftest_type)?1:-1];
/* end */

--------------------

libgdbm-dev is installed, so all dependencies should be fulfilled to build the gem?

gem update dbm fails - wrong number of arguments (given 4, expected 1)

Hi,

I've never seen this error before!

I tried the suggested solutions in the previous thread: #8

But still not updating?

Clean install of Ubuntu 18.04.5 LTS on Vultr.

Ruby version 2.5.1 via sudo apt install ruby.

Any ideas?

$ gem update dbm
Updating installed gems
Updating dbm
ERROR:  While executing gem ... (ArgumentError)
    wrong number of arguments (given 4, expected 1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.