Opened 7 years ago
Closed 7 years ago
#54646 closed defect (fixed)
subversion build failure because selected bdb was picked up by apr-util
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.1 |
Keywords: | snowleopard | Cc: | dluke@…, blair@… |
Port: | subversion |
Description
checking whether libtool needs -no-undefined... no checking for trang... none checking for doxygen... /opt/local/bin/doxygen checking for Expat... yes checking for socket in -lsocket... no checking for availability of Berkeley DB... no configure: error: Berkeley DB 4.0.14 or 5.x wasn't found. Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_subversion/subversion/work/subversion-1.9.7" && ./configure --prefix=/opt/local --with-berkeley-db=:/opt/local/include/db46:/opt/local/lib/db46:db-4.6 --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\${prefix}/share/man --with-serf=/opt/local --with-sasl=/opt/local --with-libmagic=/opt/local --without-gnome-keyring Exit code: 1 Error: Failed to configure subversion, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_subversion/subversion/work/subversion-1.9.7/config.log Error: Failed to configure subversion: configure failure: command execution failed
configure:18891: checking for availability of Berkeley DB configure:18992: /opt/local/bin/clang-mp-3.9 -o conftest -Werror=unknown-warning-option -pipe -Os -arch x86_64 -I/opt/local/include/db46 -I/opt/local/include/apr-1 -I/opt/local/include -I/opt/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10 -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -L/opt/local/lib/db46 -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib/db46 conftest.c -L/opt/local/lib/db46 -L/opt/local/lib -ldb-4.6 >&5 configure:18992: $? = 0 configure:18992: ./conftest configure:18992: $? = 1 configure: program exited with status 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "subversion" | #define PACKAGE_TARNAME "subversion" | #define PACKAGE_VERSION "1.9.7" | #define PACKAGE_STRING "subversion 1.9.7" | #define PACKAGE_BUGREPORT "http://subversion.apache.org/" | #define PACKAGE_URL "" | #define SVN_SOVERSION 0 | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define SVN_HAVE_SERF 1 | #define SVN_HAVE_MEMCACHE 1 | #define SVN_HAS_ATOMIC_BUILTINS 1 | #define SVN_BINDIR "/opt/local/bin" | #define SVN_LOCALE_DIR "/opt/local/share/locale" | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | /* end confdefs.h. */ | | #include <string.h> | #include <stdlib.h> | #define APU_WANT_DB | #include <apu_want.h> | | int main () | { | int major, minor, patch; | | db_version (&major, &minor, &patch); | | /* Sanity check: ensure that db.h constants actually match the db library */ | if (major != DB_VERSION_MAJOR | || minor != DB_VERSION_MINOR | || patch != DB_VERSION_PATCH) | exit (1); | | /* Block Berkeley DB 6, because (a) we haven't tested with it, (b) 6.0.20 | and newer are under the AGPL, and we want use of AGPL dependencies to be | opt-in. */ | if (major >= 6 && strcmp("unspecified", "yes")) | exit(2); | | /* Run-time check: ensure the library claims to be the correct version. */ | | if (major < 4) | exit (1); | if (major > 4) | exit (0); | | if (minor < 0) | exit (1); | if (minor > 0) | exit (0); | | if (patch >= 14) | exit (0); | else | exit (1); | } | configure:19020: result: no configure:19025: error: Berkeley DB 4.0.14 or 5.x wasn't found.
Well, this is the *truth*. I do have installed Berkeley DB 4.8.30. And 4.6.21…
Port decided at some time to install db48, although no port needs it, according to port echo depof:db48
(only clang-3.9 is listed, but it's also listed with db46). So the actual problem is that db_version ()
in conftest
returns 4.6.21, but Clang includes.. /opt/local/include/db48/db.h
although its invocation is:
/opt/local/bin/clang-mp-3.9 -o conftest -Werror=unknown-warning-option -pipe -Os -arch x86_64 -I/opt/local/include/db46 -I/opt/local/include/apr-1 -I/opt/local/include -I/opt/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10 -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -L/opt/local/lib/db46 -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib/db46 conftest.c -L/opt/local/lib/db46 -L/opt/local/lib -ldb-4.6
At least when I run – in my private environment – this command with -H -Wl,-t
added I get:
. /usr/include/string.h .. /usr/include/_types.h ... /usr/include/sys/_types.h .... /usr/include/sys/cdefs.h .... /usr/include/machine/_types.h ..... /usr/include/i386/_types.h .. /usr/include/secure/_string.h ... /usr/include/secure/_common.h . /usr/include/stdlib.h .. /usr/include/Availability.h ... /usr/include/AvailabilityInternal.h .. /usr/include/sys/wait.h ... /usr/include/sys/signal.h .... /usr/include/sys/appleapiopts.h .... /usr/include/machine/signal.h ..... /usr/include/i386/signal.h ...... /usr/include/i386/_structs.h .... /usr/include/sys/_structs.h ..... /usr/include/machine/_structs.h ...... /usr/include/i386/_structs.h ....... /usr/include/mach/i386/_structs.h ... /usr/include/sys/resource.h .... /usr/include/sys/_structs.h ... /usr/include/machine/endian.h .... /usr/include/i386/endian.h ..... /usr/include/sys/_endian.h ...... /usr/include/libkern/_OSByteOrder.h ....... /usr/include/libkern/i386/_OSByteOrder.h .. /usr/include/alloca.h .. /usr/include/machine/types.h ... /usr/include/i386/types.h . /opt/local/include/apr-1/apu_want.h .. /opt/local/include/apr-1/apu.h .. /opt/local/include/db48/db.h ... /usr/include/sys/types.h .... /usr/include/sys/_structs.h ... /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include/inttypes.h .... /usr/include/inttypes.h ..... /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include/stdint.h ...... /usr/include/stdint.h ... /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include/stddef.h .... /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include/__stddef_max_align_t.h ... /usr/include/stdio.h .... /usr/include/secure/_stdio.h ... /usr/include/unistd.h .... /usr/include/sys/unistd.h .... /usr/include/sys/select.h ..... /usr/include/sys/_structs.h ..... /usr/include/sys/_select.h ... /usr/include/pthread.h .... /usr/include/pthread_impl.h .... /usr/include/sched.h .... /usr/include/time.h ..... /usr/include/_structs.h ...... /usr/include/sys/_structs.h /usr/lib/crt1.10.6.o /var/folders/PR/PR9ZvjydEAmPxO7U5PFnBk+++TM/-Tmp-/conftest-fd40fa.o /opt/local/lib/db46/libdb-4.6.dylib /usr/lib/libSystem.dylib /usr/lib/system/libmathCommon.A.dylib
Another Clang bug found?
BTW:
pete 123 /\ port select --summary Name Selected Options ==== ======== ======= awscli none py27-awscli none clang mp-clang-4.0 mp-clang-3.7 mp-clang-3.9 mp-clang-4.0 none cython cython27 cython27 none db db48 db48 none gcc mp-gcc6 gcc40 gcc42 llvm-gcc42 mp-gcc5 mp-gcc6 none llvm mp-llvm-4.0 mp-llvm-3.7 mp-llvm-3.9 mp-llvm-4.0 none pip pip27 pip27 none python python27 python25-apple python26-apple python27 python36 none python2 python27 python25-apple python26-apple python27 none python3 python36 python36 none
db_select obviously is defective:
port select --set db db46 Selecting 'db46' for 'db' failed: The specified version 'db46' is not valid.
Attachments (5)
Change History (35)
Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
comment:1 follow-up: 3 Changed 7 years ago by kencu (Ken)
mmm. Works here. I'm confused -- I don't see the explanation for your build failure at first look.
$ port -v installed subversion db46 The following ports are currently installed: db46 @4.6.21_10+universal (active) platform='darwin 10' archs='i386 x86_64' date='2016-09-01T21:47:40-0700' subversion @1.9.7_0+universal (active) platform='darwin 10' archs='i386 x86_64' date='2017-08-13T21:26:33-0700'
subversion has a listed dependency on db46
depends_lib port:expat \ port:apr port:apr-util \ port:db46 port:sqlite3 \ port:gettext port:libiconv \ port:serf1 port:cyrus-sasl2 \ port:libmagic port:libcomerr \ port:zlib
my build log shows it is found
configure: building both shared and static libraries checking whether libtool needs -no-undefined... no checking for trang... none checking for doxygen... /opt/local/bin/doxygen checking for Expat... yes checking for socket in -lsocket... no checking for availability of Berkeley DB... yes
Your main.log says you have db46 installed -- maybe there is something wrong with the installation? Do you have the files there?
$ ls -la /opt/local/include/db46/* -r--r--r-- 1 root admin 107147 1 Sep 2016 /opt/local/include/db46/db.h -r--r--r-- 1 root admin 38220 1 Sep 2016 /opt/local/include/db46/db_cxx.h
comment:2 follow-up: 4 Changed 7 years ago by danielluke (Daniel J. Luke)
There are darwin 9-16 subversion versions up at http://packages.macports.org/subversion/ - so there is something unique to your setup that is causing the issue (which may or may not be something we can fix in the port).
port select isn't needed to build subversion, so we don' t h ave to worry about that part.
First I would check to make sure you don't have a bdb installed in /usr/local
If you don't, it would be worth trying to build with trace mode on to see if that makes a difference.
comment:3 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
Your main.log says you have db46 installed -- maybe there is something wrong with the installation? Do you have the files there?
$ ls -la /opt/local/include/db46/* -r--r--r-- 1 root admin 107147 1 Sep 2016 /opt/local/include/db46/db.h -r--r--r-- 1 root admin 38220 1 Sep 2016 /opt/local/include/db46/db_cxx.h
Yes, they exist:
pete 40 /\ l /opt/local/include/db46 total 296 -r--r--r-- 1 macports admin 107142 30 Jun 18:00 db.h -r--r--r-- 1 macports admin 38220 30 Jun 18:00 db_cxx.h
comment:4 follow-up: 5 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to danielluke:
There are darwin 9-16 subversion versions up at http://packages.macports.org/subversion/ - so there is something unique to your setup that is causing the issue (which may or may not be something we can fix in the port).
Two versions of Berkeley DB installed and the system to make *only one* of them available to MacPorts does not work.
port select isn't needed to build subversion, so we don' t h ave to worry about that part.
Right! It's only needed for a proper setup. This is one is not:
pete 263 /\ port select --summary Name Selected Options ==== ======== ======= awscli none py27-awscli none clang mp-clang-4.0 mp-clang-3.7 mp-clang-3.9 mp-clang-4.0 none cython cython27 cython27 none db db48 db48 none gcc mp-gcc6 gcc40 gcc42 llvm-gcc42 mp-gcc5 mp-gcc6 none llvm mp-llvm-4.0 mp-llvm-3.7 mp-llvm-3.9 mp-llvm-4.0 none pip pip27 pip27 none python python27 python25-apple python26-apple python27 python36 none python2 python27 python25-apple python26-apple python27 none python3 python36 python36 none
First I would check to make sure you don't have a bdb installed in /usr/local
There is none. I never needed it for any UNIX tool.
comment:5 follow-up: 6 Changed 7 years ago by danielluke (Daniel J. Luke)
Replying to ballapete:
Replying to danielluke:
There are darwin 9-16 subversion versions up at http://packages.macports.org/subversion/ - so there is something unique to your setup that is causing the issue (which may or may not be something we can fix in the port).
Two versions of Berkeley DB installed and the system to make *only one* of them available to MacPorts does not work.
that's not what port select does.
port select isn't needed to build subversion, so we don' t h ave to worry about that part.
Right! It's only needed for a proper setup.
Nope.
The subversion port tells subversion's configure script to look for bdb include files in ${prefix}/include/db46 and library files in ${prefix}/lib/db46 - so the db46 port needs to be installed but not 'selected'.
I have db48 and db46 installed on my machine (for example) and it builds fine.
First I would check to make sure you don't have a bdb installed in /usr/local
There is none. I never needed it for any UNIX tool.
ok, have you tried building with trace mode on?
comment:6 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to danielluke:
ok, have you tried building with trace mode on?
Yes, I finally performed that and I'll attach the main.log
file right after sending this message.
Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | main.2.log added |
---|
main.log with trace mode on
comment:7 follow-up: 9 Changed 7 years ago by kencu (Ken)
Please tell me what port -v installed db46
shows.
comment:8 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
I now found that it's port echo dependentof:<port name>
and not port echo depof:db48<port name>
. so there are only two ports, apr-util and subversion, that depend on db46. But both can be built as no_bdb
variants. This could make my problem vanish.
comment:9 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
Please tell me what
port -v installed db46
shows.
The following ports are currently installed: db46 @4.6.21_10 (active) platform='darwin 10' archs='x86_64' date='2017-06-30T18:01:20+0200'
comment:10 Changed 7 years ago by kencu (Ken)
OK. The only thing I see is that my version of db46 is built +universal, and yours is not.
comment:11 follow-up: 12 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
comment:12 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to ryandesign:
Replying to ballapete:
db_select obviously is defective:
port select --set db db46 Selecting 'db46' for 'db' failed: The specified version 'db46' is not valid.Not exactly defective; more like deliberately disabled. Remember #47921?
Trying that recipe of forcibly deactivating db46 and db48 leads to an "automatic" re-activation of db46 – and then this error:
DEBUG: /var/db/launchd.db=+ DEBUG: /private/var/db/launchd.db=+ DEBUG: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_subversion/subversion/work/.home/.ccache=+ DEBUG: /opt/local/var/macports/build/.ccache=+ DEBUG: /opt/local/var/macports/sip-workaround=+ DEBUG: /opt/local=? DEBUG: Registry error: db48 not registered as installed & active.
Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | main.3.log added |
---|
Main.log in trace mode with activation of db46
comment:13 follow-up: 14 Changed 7 years ago by danielluke (Daniel J. Luke)
Ok, so it looks like the "subversion build problem" is actually that the deprecated port select --set db db48 (or db_select) which puts a different db.h in /opt/local/include than the one we're pointing the subversion build at.
Can you try simply port select --set db none
?
comment:14 follow-up: 18 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to danielluke:
Can you try simply
port select --set db none
?
Snafu. (That's the title of East Of Eden's second LP, see https://en.wikipedia.org/wiki/East_of_Eden_(band).)
root 286 /\ port select --set db none Selecting 'none' for 'db' failed: The specified version 'none' is not valid. root 287 /\ port select --summary Name Selected Options ==== ======== ======= awscli none py27-awscli none clang mp-clang-4.0 mp-clang-3.7 mp-clang-3.9 mp-clang-4.0 none cython cython27 cython27 none db db48 none gcc mp-gcc6 gcc40 gcc42 llvm-gcc42 mp-gcc5 mp-gcc6 none llvm mp-llvm-4.0 mp-llvm-3.7 mp-llvm-3.9 mp-llvm-4.0 none pip pip27 pip27 none python python27 python25-apple python26-apple python27 python36 none python2 python27 python25-apple python26-apple python27 none python3 python36 python36 none
The select thing did not even notice that db48 was forcibly uninstalled. No, it did! There is only one option left, none, but db48 is still selected, i.e. nothing.
comment:15 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
pete 60 /\ l -AR /opt/local/etc/select total 0 drwxr-xr-x 2 root admin 170 22 Jul 12:52 awscli drwxr-xr-x 2 root admin 272 24 Jul 18:31 clang drwxr-xr-x 2 root admin 204 22 Jul 00:38 cython drwxr-xr-x 2 root admin 136 22 Aug 18:36 db drwxr-xr-x 2 root admin 340 13 Aug 23:48 gcc drwxr-xr-x 2 root admin 272 24 Jul 17:35 llvm drwxr-xr-x 2 root admin 204 4 Jul 21:53 pip drwxr-xr-x 2 root admin 306 22 Jul 09:28 python drwxr-xr-x 2 root admin 272 29 Jun 23:27 python2 drwxr-xr-x 2 root admin 204 22 Jul 09:28 python3 /opt/local/etc/select/awscli: total 24 -rw-r--r-- 1 root admin 63 22 Jul 12:51 base -rw-r--r-- 1 root admin 8 22 Jul 12:51 none -rw-r--r-- 1 root admin 79 22 Jul 12:51 py27-awscli /opt/local/etc/select/clang: total 48 -rw-r--r-- 1 root admin 635 14 Jul 2016 base lrwxr-xr-x 1 root admin 12 22 Jul 00:39 current -> mp-clang-4.0 -rw-r--r-- 1 root admin 241 30 Jun 00:31 mp-clang-3.7 -rw-r--r-- 1 root admin 318 24 Jul 17:07 mp-clang-3.9 -rw-r--r-- 1 root admin 318 24 Jul 18:30 mp-clang-4.0 -rw-r--r-- 1 root admin 68 14 Jul 2016 none /opt/local/etc/select/cython: total 32 -rw-r--r-- 1 root admin 21 30 Jun 21:10 base lrwxr-xr-x 1 root admin 8 22 Jul 00:38 current -> cython27 -rw-r--r-- 1 root admin 141 21 Jul 19:14 cython27 -rw-r--r-- 1 root admin 4 30 Jun 21:10 none /opt/local/etc/select/db: total 16 -rw-r--r--@ 1 root admin 94 22 Jul 12:33 base lrwxr-xr-x 1 root admin 4 22 Jul 12:34 current -> db48 /opt/local/etc/select/gcc: total 64 -rw-r--r-- 1 root admin 62 30 Jun 10:05 base lrwxr-xr-x 1 root admin 7 1 Jul 00:24 current -> mp-gcc6 -rw-r--r-- 1 root admin 90 30 Jun 10:05 gcc40 -rw-r--r-- 1 root admin 90 30 Jun 10:05 gcc42 -rw-r--r-- 1 root admin 110 30 Jun 10:05 llvm-gcc42 -rw-r--r-- 1 root admin 97 13 Aug 21:55 mp-gcc5 -rw-r--r-- 1 root admin 86 13 Aug 23:46 mp-gcc6 -rw-r--r-- 1 root admin 14 30 Jun 10:05 none /opt/local/etc/select/llvm: total 48 -rw-r--r-- 1 root admin 968 14 Jul 2016 base lrwxr-xr-x 1 root admin 11 22 Jul 00:40 current -> mp-llvm-4.0 -rw-r--r-- 1 root admin 737 29 Jun 23:49 mp-llvm-3.7 -rw-r--r-- 1 root admin 812 30 Jun 01:21 mp-llvm-3.9 -rw-r--r-- 1 root admin 812 24 Jul 17:34 mp-llvm-4.0 -rw-r--r-- 1 root admin 120 14 Jul 2016 none /opt/local/etc/select/pip: total 32 -rw-r--r-- 1 root admin 8 4 Jul 21:52 base lrwxr-xr-x 1 root admin 5 4 Jul 21:53 current -> pip27 -rw-r--r-- 1 root admin 2 4 Jul 21:52 none -rw-r--r-- 1 root admin 68 4 Jul 21:52 pip27 /opt/local/etc/select/python: total 56 -rw-r--r-- 1 root admin 363 12 Sep 2016 base lrwxr-xr-x 1 root admin 8 29 Jun 23:27 current -> python27 -rw-r--r-- 1 root admin 26 12 Sep 2016 none -rw-r--r-- 1 root admin 168 12 Sep 2016 python25-apple -rw-r--r-- 1 root admin 183 12 Sep 2016 python26-apple -rw-r--r-- 1 root admin 398 23 Apr 18:55 python27 -rw-r--r-- 1 root admin 371 22 Jul 09:27 python36 /opt/local/etc/select/python2: total 48 -rw-r--r-- 1 root admin 249 16 Aug 2016 base lrwxr-xr-x 1 root admin 8 29 Jun 23:27 current -> python27 -rw-r--r-- 1 root admin 26 16 Aug 2016 none -rw-r--r-- 1 root admin 234 16 Aug 2016 python25-apple -rw-r--r-- 1 root admin 249 16 Aug 2016 python26-apple -rw-r--r-- 1 root admin 141 23 Apr 18:55 python27 /opt/local/etc/select/python3: total 32 -rw-r--r-- 1 root admin 145 30 Jun 16:36 base lrwxr-xr-x 1 root admin 8 1 Jul 00:25 current -> python36 -rw-r--r-- 1 root admin 20 30 Jun 16:36 none -rw-r--r-- 1 root admin 154 22 Jul 09:27 python36
comment:16 follow-up: 19 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
pete 61 /\ cat /opt/local/etc/select/db/base include/db.h include/db_cxx.h lib/libdb.a lib/libdb.dylib lib/libdb_cxx.a lib/libdb_cxx.dylib
comment:17 Changed 7 years ago by danielluke (Daniel J. Luke)
Ok, scanning through #47921 seems to say that installing the current db_select port will clean up any symlinks that were generated by port select (you could also delete these symlinks from $prefix yourself - include/db.h include/db_cxx.h lib/libdb.a lib/libdb.dylib lib/libdb_cxx.a lib/libdb_cxx.dylib)
once those symlinks aren't there, subversion should build OK for you again.
comment:18 follow-up: 21 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ballapete:
root 286 /\ port select --set db none Selecting 'none' for 'db' failed: The specified version 'none' is not valid.
Not sure why you see that... what you should see is:
$ port select --set db none Selecting 'none' for 'db' failed: The specified group 'db' does not exist.
The fact that for you the db group still exists suggests you have old versions of db_select or one or more of the BerkeleyDB ports installed and active.
The select thing did not even notice that db48 was forcibly uninstalled.
That's always been true: if you uninstall the version of the thing that you had selected, the symlinks port select
had created will then be broken. I thought we had a ticket for that but I can't find it. We could improve this by either 1) preventing you from uninstalling something you had selected, or 2) causing the thing you had selected to become unselected automatically when you uninstall it. #43996 may be another way we could fix this.
As was said earlier, the latest version of the db_select port (from two years ago) automatically removes any symlinks that using port select db ...
left behind. So if you have db_select @0.1_3 installed but somehow still have those symlinks, you could remove them by re-installing db_select to get it to run its automatic cleanup again (sudo port -n upgrade --force db_select
). Once it's cleaned up, you can uninstall db_select.
comment:19 follow-up: 20 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ballapete:
pete 61 /\ cat /opt/local/etc/select/db/base include/db.h include/db_cxx.h lib/libdb.a lib/libdb.dylib lib/libdb_cxx.a lib/libdb_cxx.dylib
This file shouldn't exist on your system either, if you have the latest db_select @0.1_3.
comment:20 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to ryandesign:
This file shouldn't exist on your system either, if you have the latest db_select @0.1_3.
I had that version installed…
comment:21 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to ryandesign:
As was said earlier, the latest version of the db_select port (from two years ago) automatically removes any symlinks that using
port select db ...
left behind. So if you have db_select @0.1_3 installed but somehow still have those symlinks, you could remove them by re-installing db_select to get it to run its automatic cleanup again (sudo port -n upgrade --force db_select
). Once it's cleaned up, you can uninstall db_select.
I tried to invoke that command. Before I had deactivated and uninstalled both db46 and 48:
root 292 /\ port -n upgrade --force db_select ---> Computing dependencies for db_select ---> Fetching distfiles for db_select ---> Verifying checksums for db_select ---> Extracting db_select ---> Configuring db_select ---> Building db_select ---> Staging db_select into destroot ---> Deactivating db_select @0.1_3 ---> Cleaning db_select ---> Uninstalling db_select @0.1_3 ---> Cleaning db_select ---> Computing dependencies for db_select ---> Installing db_select @0.1_3 ---> Activating db_select @0.1_3 ---> Cleaning db_select ---> Updating database of binaries ---> Scanning binaries for linking errors ---> Found 24 broken files, matching files to ports ---> Found 5 broken ports, determining rebuild order You can always run 'port rev-upgrade' again to fix errors. The following ports will be rebuilt: python27 @2.7.13 apr-util @1.6.0 serf1 @1.3.8 subversion @1.9.6+tools+unicode_path openldap @2.4.45 Continue? [Y/n]: Y ---> Computing dependencies for db48 ---> Fetching distfiles for db48 ---> Attempting to fetch db-4.8.30.tar.gz from https://distfiles.macports.org/db48 ---> Verifying checksums for db48 ---> Extracting db48 ---> Applying patches to db48 ---> Configuring db48 ---> Building db48 Error: Failed to build db48: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_databases_db48/db48/main.log for details. Error: Problem while installing db48 Error: rev-upgrade failed: Error rebuilding python27 Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Is it OK to attach db48's main.log file here or should I start a new case?
comment:22 follow-up: 24 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
It worked to build and install db48 witch Clang 3.7 instead Clang 3.9 (I wonder why GCC isn't used, is it too reliable?). I then added
50 configure.cppflags-append -H 51 configure.ldflags-append -t
to Portfile to see what configure is performing. It is this:
configure:18891: checking for availability of Berkeley DB configure:18992: /opt/local/bin/clang-mp-3.9 -o conftest -Werror=unknown-warning-option -pipe -Os -arch x86_64 -I/opt/local/include/db46 -I/opt/local/include/apr-1 -I/opt/local/include -I/opt/local/include -H -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10 -L/opt/local/lib -Wl,-headerpad_max_install_names -t -arch x86_64 -L/opt/local/lib/db46 -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib/db46 conftest.c -L/opt/local/lib/db46 -L/opt/local/lib -ldb-4.6 >&5 . /usr/include/string.h .. /usr/include/_types.h ... /usr/include/sys/_types.h .... /usr/include/sys/cdefs.h .... /usr/include/machine/_types.h ..... /usr/include/i386/_types.h .. /usr/include/secure/_string.h ... /usr/include/secure/_common.h . /usr/include/stdlib.h .. /usr/include/Availability.h ... /usr/include/AvailabilityInternal.h .. /usr/include/sys/wait.h ... /usr/include/sys/signal.h .... /usr/include/sys/appleapiopts.h .... /usr/include/machine/signal.h ..... /usr/include/i386/signal.h ...... /usr/include/i386/_structs.h .... /usr/include/sys/_structs.h ..... /usr/include/machine/_structs.h ...... /usr/include/i386/_structs.h ....... /usr/include/mach/i386/_structs.h ... /usr/include/sys/resource.h .... /usr/include/sys/_structs.h ... /usr/include/machine/endian.h .... /usr/include/i386/endian.h ..... /usr/include/sys/_endian.h ...... /usr/include/libkern/_OSByteOrder.h ....... /usr/include/libkern/i386/_OSByteOrder.h .. /usr/include/alloca.h .. /usr/include/machine/types.h ... /usr/include/i386/types.h . /opt/local/include/apr-1/apu_want.h .. /opt/local/include/apr-1/apu.h ***.. /opt/local/include/db48/db.h*** ... /usr/include/sys/types.h .... /usr/include/sys/_structs.h ... /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include/inttypes.h .... /usr/include/inttypes.h ..... /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include/stdint.h ...... /usr/include/stdint.h ... /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include/stddef.h .... /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include/__stddef_max_align_t.h ... /usr/include/stdio.h .... /usr/include/secure/_stdio.h ... /usr/include/unistd.h .... /usr/include/sys/unistd.h .... /usr/include/sys/select.h ..... /usr/include/sys/_structs.h ..... /usr/include/sys/_select.h ... /usr/include/pthread.h .... /usr/include/pthread_impl.h .... /usr/include/sched.h .... /usr/include/time.h ..... /usr/include/_structs.h ...... /usr/include/sys/_structs.h /usr/lib/crt1.10.6.o /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_subversion/subversion/work/.tmp/conftest-e1994d.o /opt/local/lib/db46/libdb-4.6.dylib /usr/lib/libSystem.dylib /usr/lib/system/libmathCommon.A.dylib configure:18992: $? = 0 configure:18992: ./conftest configure:18992: $? = 1 configure: program exited with status 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "subversion" | #define PACKAGE_TARNAME "subversion" | #define PACKAGE_VERSION "1.9.7" | #define PACKAGE_STRING "subversion 1.9.7" | #define PACKAGE_BUGREPORT "http://subversion.apache.org/" | #define PACKAGE_URL "" | #define SVN_SOVERSION 0 | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define SVN_HAVE_SERF 1 | #define SVN_HAVE_MEMCACHE 1 | #define SVN_HAS_ATOMIC_BUILTINS 1 | #define SVN_BINDIR "/opt/local/bin" | #define SVN_LOCALE_DIR "/opt/local/share/locale" | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | /* end confdefs.h. */ | | #include <string.h> | #include <stdlib.h> | #define APU_WANT_DB | #include <apu_want.h> | | int main () | { | int major, minor, patch; | | db_version (&major, &minor, &patch); | | /* Sanity check: ensure that db.h constants actually match the db library */ | if (major != DB_VERSION_MAJOR | || minor != DB_VERSION_MINOR | || patch != DB_VERSION_PATCH) | exit (1); | | /* Block Berkeley DB 6, because (a) we haven't tested with it, (b) 6.0.20 | and newer are under the AGPL, and we want use of AGPL dependencies to be | opt-in. */ | if (major >= 6 && strcmp("unspecified", "yes")) | exit(2); | | /* Run-time check: ensure the library claims to be the correct version. */ | | if (major < 4) | exit (1); | if (major > 4) | exit (0); | | if (minor < 0) | exit (1); | if (minor > 0) | exit (0); | | if (patch >= 14) | exit (0); | else | exit (1); | } | configure:19020: result: no configure:19025: error: Berkeley DB 4.0.14 or 5.x wasn't found.
As you can see, on the command line db48
is visible, but Clang 3.9 is so clever as some MS Windows tool and includes /opt/local/include/db48/db.h
. One more Clang bug, isn't it?
Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | config.2.log added |
---|
config.log with -H and -t
comment:23 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
BTW, by including opt/local/include/db48/db.h
the macros DB_VERSION_MAJOR
, DB_VERSION_MINOR
, and DB_VERSION_PATCH
get #defined as 4
, 8
, and 30
respectively. In /opt/local/include/db46/db.h
we can find:
42 /* 43 * Berkeley DB version information. 44 */ 45 #define DB_VERSION_MAJOR 4 46 #define DB_VERSION_MINOR 6 47 #define DB_VERSION_PATCH 21 48 #define DB_VERSION_STRING "Berkeley DB 4.6.21: (August 24, 2017)"
comment:24 follow-up: 25 Changed 7 years ago by danielluke (Daniel J. Luke)
Replying to ballapete:
. /opt/local/include/apr-1/apu_want.h .. /opt/local/include/apr-1/apu.h ***.. /opt/local/include/db48/db.h***
Does your copy of /opt/local/include/apr-1/apu_want.h reference db48 somehow? The MacPorts port should build against db46 - but if yours is built against db48 it would explain why your subversion build is getting confused.
comment:25 follow-up: 26 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to danielluke:
Replying to ballapete:
. /opt/local/include/apr-1/apu_want.h .. /opt/local/include/apr-1/apu.h ***.. /opt/local/include/db48/db.h***Does your copy of /opt/local/include/apr-1/apu_want.h reference db48 somehow? The MacPorts port should build against db46 - but if yours is built against db48 it would explain why your subversion build is getting confused.
Oh yes, it does!
42 #ifdef APU_WANT_DB 43 44 #if APU_HAVE_DB 45 #include <db48/db.h> 46 #endif 47 48 #undef APU_WANT_DB 49 #endif
comment:26 follow-up: 27 Changed 7 years ago by danielluke (Daniel J. Luke)
Replying to ballapete:
Does your copy of /opt/local/include/apr-1/apu_want.h reference db48 somehow? The MacPorts port should build against db46 - but if yours is built against db48 it would explain why your subversion build is getting confused.
Oh yes, it does!
ok. so maybe that happened when you had db48 'selected'. Can you try removing your apr-util port and re-building it. If it's still linking with db48 we need to figure out why (and fix the apr-util port).
comment:27 follow-up: 28 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Replying to danielluke:
ok. so maybe that happened when you had db48 'selected'. Can you try removing your apr-util port and re-building it. If it's still linking with db48 we need to figure out why (and fix the apr-util port).
Apr-util now has db46
in the C header file.
comment:28 Changed 7 years ago by danielluke (Daniel J. Luke)
Replying to ballapete:
Apr-util now has
db46
in the C header file.
Excellent! Can you confirm that subversion builds for you now?
comment:29 follow-up: 30 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)
Subversion now built.
Uninstalling and installing db_select did not change anything.Success came when I manually removed the whole /opt/local/etc/select/db branch. It still does not exist although db_select is installed.
comment:30 Changed 7 years ago by danielluke (Daniel J. Luke)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | subversion @1.9.7 does not build on Snow Leopard, Mac OS X 10.6.8, because "Berkeley DB 4.0.14 or 5.x wasn't found" → subversion build failure because selected bdb was picked up by apr-util |
Replying to ballapete:
Subversion now built.
Excellent.
Uninstalling and installing db_select did not change anything.Success came when I manually removed the whole /opt/local/etc/select/db branch. It still does not exist although db_select is installed.
That's correct, db_select only exists now to help cleanup after the prior existence of port select for the dbXX ports. You can feel free to uninstall it.
main.log