File: //usr/local/rvm/src/ruby-2.7.4/ext/gdbm/mkmf.log
have_library: checking for gdbm_open() in -lgdbm... -------------------- no
"gcc -o conftest -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/gdbm -g -O2 -fPIC conftest.c -L. -L../.. -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L/usr/local/rvm/rubies/ruby-2.7.4/lib -lruby-static -lz -lpthread -lrt -lrt -ldl -lcrypt -lm -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
"gcc -o conftest -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/gdbm -g -O2 -fPIC conftest.c -L. -L../.. -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L/usr/local/rvm/rubies/ruby-2.7.4/lib -lruby-static -lz -lpthread -lrt -lrt -ldl -lcrypt -lm -lgdbm -lm -lc"
conftest.c: In function ‘t’:
conftest.c:14:57: error: ‘gdbm_open’ undeclared (first use in this function); did you mean ‘fmemopen’?
int t(void) { void ((*volatile p)()); p = (void ((*)()))gdbm_open; return !p; }
^~~~~~~~~
fmemopen
conftest.c:14: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: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: int (* volatile tp)(void)=(int (*)(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))gdbm_open; return !p; }
/* end */
"gcc -o conftest -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/gdbm -g -O2 -fPIC conftest.c -L. -L../.. -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L/usr/local/rvm/rubies/ruby-2.7.4/lib -lruby-static -lz -lpthread -lrt -lrt -ldl -lcrypt -lm -lgdbm -lm -lc"
/usr/bin/ld: cannot find -lgdbm
collect2: error: ld returned 1 exit status
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: int (* volatile tp)(void)=(int (*)(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: extern void gdbm_open();
15: int t(void) { gdbm_open(); return 0; }
/* end */
--------------------