Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DB_File CPAN distribution.

Report information
The Basics
Id:
125238
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
DMTHOMAS [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: DB_File fails when building perl on macOS 10.13
DB_File fails when building perl on macOS 10.13 sse also https://rt.cpan.org/Public/Bug/Display.html?id=124836 * macOS 10.13 perl does include DB_File * ... but macOS 10.13 perl's DB_File is broken * building DB_File distribution with /usr/bin/perl fails * Hmmm, does DB_File.bundle tell us anything? * Let's make libdb work * Success with 5.22.4, 5.24.4, 5.26.0, 5.26.1, 5.26.2 & 5.27.11 I built perl-5.26.1 on macOS 10.11, apparently successfully. This was done a while ago and there's a slight possibility I tweaked the build process to make it "work". Anyway Dannys-MacBook-Pro:DB_File-1.841 dthomas$ /opt/uq.cis.work/build.perl/perl-bootstrap/perl-5.26.1/perl -e 'use DB_File; print "db_version=$DB_File::db_version\n"' db_version=1 Neither MacPorts or Homebrew is installed on this machine. And in any case I don't think either offer berkeley-db version 1. This is also the version reported by /usr/bin/perl Another person reporting this problem How to install Perl on macOS 10.13 High Sierra https://stackoverflow.com/questions/46660971/how-to-install-perl-on-macos-10-13-high-sierra They solved it by installing Homebrew's Berkeley DB and perl brew install berkeley-db perlbrew install perl-5.26.1 But I'm building a perl outside MacPorts/Homebrew There's a comment on this stackoverflow page It's probably worth reporting this on rt.perl.org. That 'mostly harmless' needs to be changed when libdb isn't installed! – RickMeasham Nov 22 '17 at 22:49 I think 'mostly harmless' can be true as using macOS' /usr/bin/perl to build DB_File-1.841.tar.gz on macOS 10.11 shows this message but builds and PASSes the tests. Mind you I don't know how libdb is resolved as I couldn't find it either on macOS 10.11 or macOS 10.13. The fact that perl and the distribution build on macOS 10.11, and report db_version of 1 strongly suggests libdb is visible to the linker. But the failure on macOS 10.13 indicates the mysterious libdb is no more. In that case there's no way to fix the distribution except by adding documentation, and perhaps emit a warning from Makefile.PL. People manually building perl on macOS 10.13 might not not notice or care about the test failure, but my build script dies on any backtick operation failing, i.e. backtick "make test" so I was made aware of the issue. Anyway here's my setup OS 10.13.3 /usr/bin/perl -V listed below XCode downloaded from app store, apparently "Version: 9.3 (9E145)" Command_Line_Tools_macOS_10.13_for_Xcode_9.3.dmg downloaded from https://developer.apple.com/download/more/ MacPorts installed. So far only "sudo port -v install graphviz" "Suspicious Package" http://www.mothersruin.com/software/SuspiciousPackage/ shows the .pkg file in Command_Line_Tools_macOS_10.13_for_Xcode_9.3.dmg does install /usr/include/db.h /usr/share/man/man3/db.3 but no equivalent under /usr/lib There is BerkeleyDB-21 listed on https://opensource.apple.com/release/macos-10133.html "This is version 4.7.25 of Berkeley DB from Oracle" but I did not try building it in case it caused problems The Makefile includes configure --disable-java --disable-shared --prefix=/usr/local docdir=/usr/local/BerkeleyDB/docs macOS 10.13 perl does include DB_File ===================================== dthomas@Dannys-iMac$ /usr/bin/perl -V Summary of my perl5 (revision 5 version 18 subversion 2) configuration: Platform: osname=darwin, osvers=17.0, archname=darwin-thread-multi-2level uname='darwin osx352.sd.apple.com 17.0 darwin kernel version 16.1.0: wed jun 14 23:26:09 pdt 2017; root:xnu-3789.21.4.1.6~1development_x86_64 x86_64 ' config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector', optimize='-Os', cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector' ccversion='', gccversion='4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc -mmacosx-version-min=10.12.1', ldflags ='-arch x86_64 -arch i386 -fstack-protector' libpth=/usr/lib /usr/local/lib libs= perllibs= libc=, so=dylib, useshrplib=true, libperl=libperl.dylib gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Locally applied patches: /Library/Perl/Updates/<version> comes before system perl directories installprivlib and installarchlib points to the Updates directory Built under darwin Compiled at Oct 7 2017 02:40:20 @INC: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 . dthomas@Dannys-iMac$ /usr/bin/perl -e 'use DB_File; print "VERSION=$DB_File::VERSION\n"' VERSION=1.827 dthomas@Dannys-iMac$ /usr/bin/perl -e 'use DB_File; print "db_version=$DB_File::db_version\n"' db_version=1 ... but macOS 10.13 perl's DB_File is broken ============================================ running the script from https://discussions.apple.com/thread/8125401 dthomas@Dannys-iMac$ /usr/bin/perl /tmp/test.pl a=1 keys=[a], [b], [c] Use of uninitialized value within %a in join or string at /tmp/test.pl line 17. Use of uninitialized value within %a in join or string at /tmp/test.pl line 17. Use of uninitialized value within %a in join or string at /tmp/test.pl line 17. values=[], [], [] a=1 keys=[a], [b], [c] Use of uninitialized value within %b in join or string at /tmp/test.pl line 25. Use of uninitialized value within %b in join or string at /tmp/test.pl line 25. Use of uninitialized value within %b in join or string at /tmp/test.pl line 25. values=[], [], [] the script runs fine under macOS 10.11's /usr/bin/perl building DB_File distribution with /usr/bin/perl fails ====================================================== dthomas@Dannys-iMac$ cd /tmp dthomas@Dannys-iMac$ cp ~/Downloads/DB_File-1.841.tar.gz . dthomas@Dannys-iMac$ tar zxf DB_File-1.841.tar.gz dthomas@Dannys-iMac$ cd DB_File-1.841 dthomas@Dannys-iMac$ /usr/bin/perl Makefile.PL Parsing config.in... Looks Good. Checking if your kit is complete... Looks good Warning (mostly harmless): No library found for -ldb Writing Makefile for DB_File Writing MYMETA.yml and MYMETA.json dthomas@Dannys-iMac$ make cp DB_File.pm blib/lib/DB_File.pm cc -c -I/usr/local/BerkeleyDB/include -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"1.841\" -DXS_VERSION=\"1.841\" "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -D_NOT_CORE -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t version.c /usr/bin/perl /System/Library/Perl/5.18/ExtUtils/xsubpp -noprototypes -typemap /System/Library/Perl/5.18/ExtUtils/typemap -typemap typemap DB_File.xs > DB_File.xsc && mv DB_File.xsc DB_File.c cc -c -I/usr/local/BerkeleyDB/include -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"1.841\" -DXS_VERSION=\"1.841\" "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -D_NOT_CORE -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t DB_File.c Running Mkbootstrap for DB_File () chmod 644 DB_File.bs rm -f blib/arch/auto/DB_File/DB_File.bundle cc -mmacosx-version-min=10.12.1 -arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -fstack-protector version.o DB_File.o -o blib/arch/auto/DB_File/DB_File.bundle \ \ ld: warning: object file (version.o) was built for newer OSX version (10.13) than being linked (10.12.1) ld: warning: object file (DB_File.o) was built for newer OSX version (10.13) than being linked (10.12.1) ld: warning: object file (version.o) was built for newer OSX version (10.13) than being linked (10.12.1) ld: warning: object file (DB_File.o) was built for newer OSX version (10.13) than being linked (10.12.1) chmod 755 blib/arch/auto/DB_File/DB_File.bundle cp DB_File.bs blib/arch/auto/DB_File/DB_File.bs chmod 644 blib/arch/auto/DB_File/DB_File.bs Manifying blib/man3/DB_File.3pm dthomas@Dannys-iMac$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/db-btree.t .. ok t/db-hash.t ... Use of uninitialized value $value in string eq at t/db-hash.t line 224. Use of uninitialized value $values[0] in string eq at t/db-hash.t line 224. Use of uninitialized value $value in lc at t/db-hash.t line 224. Use of uninitialized value $h{""} in string eq at t/db-hash.t line 243. Use of uninitialized value in numeric eq (==) at t/db-hash.t line 252. Use of uninitialized value in numeric eq (==) at t/db-hash.t line 252. Use of uninitialized value in numeric eq (==) at t/db-hash.t line 252. Use of uninitialized value in numeric eq (==) at t/db-hash.t line 252. Use of uninitialized value in numeric eq (==) at t/db-hash.t line 252. Use of uninitialized value in numeric eq (==) at t/db-hash.t line 252. Use of uninitialized value in numeric eq (==) at t/db-hash.t line 252. Use of uninitialized value in numeric eq (==) at t/db-hash.t line 252. Use of uninitialized value $foo[18] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[36] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[48] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[58] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[59] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[60] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[62] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[63] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[92] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[114] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[140] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[187] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[188] in join or string at t/db-hash.t line 261. Use of uninitialized value $foo[189] in join or string at t/db-hash.t line 261. t/db-hash.t ... 1/166 Use of uninitialized value $h{"Fred"} in string eq at t/db-hash.t line 572. Use of uninitialized value $v in concatenation (.) or string at t/db-hash.t line 748. t/db-hash.t ... Dubious, test returned 2 (wstat 512, 0x200) Failed 76/166 subtests t/db-recno.t .. ok t/pod.t ....... ok Test Summary Report ------------------- t/db-hash.t (Wstat: 512 Tests: 116 Failed: 26) Failed tests: 23-25, 27-28, 30, 37, 45-46, 68, 70, 72-77 82, 84, 86, 89-90, 98, 101, 106, 112 Non-zero exit status: 2 Parse errors: Bad plan. You planned 166 tests but ran 116. Files=4, Tests=518, 13 wallclock secs ( 0.38 usr 0.05 sys + 3.24 cusr 7.67 csys = 11.34 CPU) Result: FAIL Failed 1/4 test programs. 26/518 subtests failed. make: *** [test_dynamic] Error 255 Hmmm, does DB_File.bundle tell us anything? =========================================== NB the second is from an installation of MacPorts dthomas@Dannys-iMac$ locate DB_File.bundle /System/Library/Perl/5.18/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle /opt/local/lib/perl5/5.26/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle dthomas@Dannys-iMac$ ls -l /System/Library/Perl/5.18/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle -rwxr-xr-x 1 root wheel 106816 19 Jan 18:30 /System/Library/Perl/5.18/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle dthomas@Dannys-iMac$ otool -L /System/Library/Perl/5.18/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle /System/Library/Perl/5.18/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0) dthomas@Dannys-iMac$ nm -a /usr/lib/libSystem.B.dylib | grep -i db dthomas@Dannys-iMac$ dthomas@Dannys-iMac$ nm -a /System/Library/Perl/5.18/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle U _PL_thr_key U _Perl_call_list U _Perl_call_sv U _Perl_croak U _Perl_croak_nocontext U _Perl_croak_xs_usage U _Perl_free_tmps U _Perl_get_sv U _Perl_hv_common_key_len U _Perl_markstack_grow U _Perl_mg_get U _Perl_mg_set U _Perl_my_cxt_init U _Perl_newSVpvf_nocontext U _Perl_newSVpvn U _Perl_newSVsv U _Perl_newXS U _Perl_pop_scope U _Perl_push_scope U _Perl_safesysfree U _Perl_safesysmalloc U _Perl_save_int U _Perl_save_sptr U _Perl_stack_grow U _Perl_sv_2iv_flags U _Perl_sv_2mortal U _Perl_sv_2pv_flags U _Perl_sv_2pvbyte U _Perl_sv_2uv_flags U _Perl_sv_derived_from U _Perl_sv_free2 U _Perl_sv_isa U _Perl_sv_magic U _Perl_sv_mortalcopy_flags U _Perl_sv_newmortal U _Perl_sv_setiv U _Perl_sv_setpvn U _Perl_sv_setref_pv U _Perl_sv_setsv_flags U _Perl_xs_apiversion_bootcheck U _Perl_xs_version_bootcheck U ___bzero 0000000000000914 T ___getBerkeleyDBInfo 00000000000009ac T _boot_DB_File U _dbopen U _memcmp U _pthread_getspecific U dyld_stub_binder 0000000005614542 - 00 0000 OPT radr://5614542 dthomas@Dannys-iMac$ ls -l /opt/local/lib/perl5/5.26/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle -r-xr-xr-x 1 root admin 45432 5 Jan 06:11 /opt/local/lib/perl5/5.26/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle dthomas@Dannys-iMac$ otool -L /opt/local/lib/perl5/5.26/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle /opt/local/lib/perl5/5.26/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0) dthomas@Dannys-iMac$ nm -a /opt/local/lib/perl5/5.26/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle 0000000000000f50 T _DB_File___unused U _PL_thr_key U _Perl_call_sv U _Perl_croak_nocontext U _Perl_croak_xs_usage U _Perl_cvgv_from_hek U _Perl_free_tmps U _Perl_get_sv U _Perl_hv_common_key_len U _Perl_markstack_grow U _Perl_mg_get U _Perl_mg_set U _Perl_my_cxt_init U _Perl_newSVpvf_nocontext U _Perl_newSVpvn U _Perl_newSVsv U _Perl_newXS_deffile U _Perl_pop_scope U _Perl_push_scope U _Perl_safesysfree U _Perl_safesysmalloc U _Perl_save_int U _Perl_save_sptr U _Perl_savetmps U _Perl_stack_grow U _Perl_sv_2iv_flags U _Perl_sv_2mortal U _Perl_sv_2pv_flags U _Perl_sv_2pvbyte U _Perl_sv_2uv_flags U _Perl_sv_derived_from U _Perl_sv_free2 U _Perl_sv_isa U _Perl_sv_magic U _Perl_sv_mortalcopy_flags U _Perl_sv_newmortal U _Perl_sv_setiv U _Perl_sv_setiv_mg U _Perl_sv_setpvn U _Perl_sv_setref_pv U _Perl_sv_setsv_flags U _Perl_xs_boot_epilog U _Perl_xs_handshake 0000000000008440 t _S_CvGV 0000000000002af0 t _XS_DB_File_DELETE 0000000000002830 t _XS_DB_File_DESTROY 0000000000001a50 t _XS_DB_File_DoTie_ 0000000000002fb0 t _XS_DB_File_EXISTS 0000000000003440 t _XS_DB_File_FETCH 0000000000004070 t _XS_DB_File_FIRSTKEY 0000000000004390 t _XS_DB_File_NEXTKEY 0000000000003a30 t _XS_DB_File_STORE 00000000000012d0 t _XS_DB_File_constant 00000000000057c0 t _XS_DB_File_del 0000000000006b80 t _XS_DB_File_fd 00000000000077a0 t _XS_DB_File_filter_fetch_key 0000000000007b20 t _XS_DB_File_filter_fetch_value 0000000000007960 t _XS_DB_File_filter_store_key 0000000000007ce0 t _XS_DB_File_filter_store_value 0000000000005c80 t _XS_DB_File_get 00000000000055c0 t _XS_DB_File_length 0000000000004af0 t _XS_DB_File_pop 0000000000005190 t _XS_DB_File_push 0000000000006350 t _XS_DB_File_put 0000000000006f20 t _XS_DB_File_seq 0000000000004e40 t _XS_DB_File_shift 0000000000006d20 t _XS_DB_File_sync 00000000000046b0 t _XS_DB_File_unshift U ___bzero 0000000000000eb0 T ___getBerkeleyDBInfo U ___stack_chk_fail U ___stack_chk_guard 0000000000000f60 T _boot_DB_File 0000000000008060 t _btree_compare 0000000000008250 t _btree_prefix U _dbopen 0000000000007ea0 t _hash_cb U _memcmp 0000000000009190 d _my_cxt_index U _pthread_getspecific U dyld_stub_binder I don't really understand linking or XS, but the system perl's and MacPorts' DB_File.bundle files are different. Neither of these seem to refer to a shared library. Let's make libdb work ===================== Building the distribution did include this warning Warning (mostly harmless): No library found for -ldb There's no libdb visible to gcc in default search paths dthomas@Dannys-iMac$ gcc -ldb ld: library not found for -ldb clang: error: linker command failed with exit code 1 (use -v to see invocation) Are any libdb shared-libraries around? dthomas@Dannys-iMac$ locate libdb. /opt/local/lib/db48/libdb.a /opt/local/lib/db48/libdb.dylib So the only version is that installed by MacPorts either during its' own installation or from the only package I installed (graphviz). NB DB_File's Makefile.PL includes default path of /usr/local/BerkeleyDB MyDoubleCheck: @echo Checking config.in is setup for a release @(grep "^LIB.*/usr/local/BerkeleyDB" config.in && \ grep "^INCLUDE.*/usr/local/BerkeleyDB" config.in && \ or which can be supplied in environment variables $INC_DIR = $ENV{'DB_FILE_INCLUDE'} || $Info{'INCLUDE'} ; $LIB_DIR = $ENV{'DB_FILE_LIB'} || $Info{'LIB'} ; So let's make the MacPorts db48 visible dthomas@Dannys-iMac$ sudo mkdir /usr/local/BerkeleyDB dthomas@Dannys-iMac$ sudo ln -s /opt/local/lib/db48 /usr/local/BerkeleyDB/lib dthomas@Dannys-iMac$ sudo ln -s /opt/local/include/db48 /usr/local/BerkeleyDB/include gcc still doesn't know to look in the BerkeleyDB subdirectory dthomas@Dannys-iMac$ gcc -ldb ld: library not found for -ldb clang: error: linker command failed with exit code 1 (use -v to see invocation) Let's try building the distribution afresh dthomas@Dannys-iMac$ cd /tmp dthomas@Dannys-iMac$ rm -rf DB_File-1.841 dthomas@Dannys-iMac$ tar zxf DB_File-1.841.tar.gz dthomas@Dannys-iMac$ cd DB_File-1.841 dthomas@Dannys-iMac$ /usr/bin/perl Makefile.PL Parsing config.in... Looks Good. Checking if your kit is complete... Looks good Writing Makefile for DB_File Writing MYMETA.yml and MYMETA.json dthomas@Dannys-iMac$ make cp DB_File.pm blib/lib/DB_File.pm cc -c -I/usr/local/BerkeleyDB/include -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"1.841\" -DXS_VERSION=\"1.841\" "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -D_NOT_CORE -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t version.c /usr/bin/perl /System/Library/Perl/5.18/ExtUtils/xsubpp -noprototypes -typemap /System/Library/Perl/5.18/ExtUtils/typemap -typemap typemap DB_File.xs > DB_File.xsc && mv DB_File.xsc DB_File.c cc -c -I/usr/local/BerkeleyDB/include -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"1.841\" -DXS_VERSION=\"1.841\" "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -D_NOT_CORE -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t DB_File.c Running Mkbootstrap for DB_File () chmod 644 DB_File.bs rm -f blib/arch/auto/DB_File/DB_File.bundle LD_RUN_PATH="/usr/local/BerkeleyDB/lib" cc -mmacosx-version-min=10.12.1 -arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -fstack-protector version.o DB_File.o -o blib/arch/auto/DB_File/DB_File.bundle \ -L/usr/local/BerkeleyDB/lib -ldb \ ld: warning: object file (version.o) was built for newer OSX version (10.13) than being linked (10.12.1) ld: warning: object file (DB_File.o) was built for newer OSX version (10.13) than being linked (10.12.1) ld: warning: object file (version.o) was built for newer OSX version (10.13) than being linked (10.12.1) ld: warning: object file (DB_File.o) was built for newer OSX version (10.13) than being linked (10.12.1) ld: warning: ignoring file /usr/local/BerkeleyDB/lib/libdb.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/BerkeleyDB/lib/libdb.dylib chmod 755 blib/arch/auto/DB_File/DB_File.bundle cp DB_File.bs blib/arch/auto/DB_File/DB_File.bs chmod 644 blib/arch/auto/DB_File/DB_File.bs Manifying blib/man3/DB_File.3pm dthomas@Dannys-iMac$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/db-btree.t .. ok t/db-hash.t ... ok t/db-recno.t .. ok t/pod.t ....... ok All tests successful. Files=4, Tests=568, 2 wallclock secs ( 0.04 usr 0.01 sys + 0.60 cusr 0.42 csys = 1.07 CPU) Result: PASS I did not do a "make install" as I don't want to touch the system perl Success with 5.22.4, 5.24.4, 5.26.0, 5.26.1, 5.26.2 & 5.27.11 ============================================================= After creating /usr/local/BerkeleyDB/{include,lib} I successfully built each of these versions of perl in a separate empty directory area In these cases they did report the MacPorts' libdb version dthomas@Dannys-iMac$ /opt/uq.cis.work/build.perl/perl-bootstrap/perl-5.27.11/perl -e 'use DB_File; print "db_version=$DB_File::db_version\n"' db_version=4.8 running the script from https://discussions.apple.com/thread/8125401 dthomas@Dannys-iMac$ /opt/uq.cis.work/build.perl/perl-bootstrap/perl-5.26.2/perl /tmp/test.pl a=1 keys=[b], [a], [c] values=[2], [1], [3] a=1 keys=[b], [a], [c] values=[2], [1], [3]
Hey Danny, thanks for the feedback. To summarise - to get DB_File running on MacOS you need to expose the library in /opt/local/lib/db48 ? I know nothing about MacOS, so this will be useful for anyone else who needs to get DB_File running ona Mac. cheers Paul
On Sun Apr 29 15:16:13 2018, PMQS wrote:
Show quoted text
>I know nothing about MacOS, so this will be useful for anyone >else who needs to get DB_File running ona Mac.
macOS does not have a packaging system like yum/dnf etc. There's 2 such system (I think based on BSD pkgsrc) MacPorts HomeBrew I believe these systems build packages on your system rather than downloading pre-built binaries such as rpms. For each package there's a recipe to download & build a tarball, usually applying some patches. Both systems have recipes for thousands of packages.
Show quoted text
> To summarise - to get DB_File running on MacOS you need to > expose the library in /opt/local/lib/db48 ?
well you need to expose a version of BerkeleyDB /opt/local/lib/db48 came from MacPorts; at least I did not explicitly install it. MacPorts has quite a few versions of BerkeleyDB I'm not sure where HomeBrew would install its' BerkeleyDB include/lib directories. Plus somebody could build their own BerkeleyDB in another location. This issue seems new with macOS 10.13 though I've never used 10.12.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.