Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#35914 closed defect (invalid)

subversion-perlbindings-5.12 configure fails to find Berkeley DB

Reported by: mina.macports@… Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: subversion-perlbindings

Description

Upgrading outdated (after upgrade to mountain lion), fails on subversion-perlbindings:

--->  Configuring subversion-perlbindings-5.12
Error: org.macports.configure for port subversion-perlbindings-5.12 returned: configure failure: command execution failed
Please see the log file for port subversion-perlbindings-5.12 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/main.log
Error: Problem while installing subversion-perlbindings-5.12
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

Logfile contains:

sh-3.2# cat /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/main.log
version:1
:msg:main --->  Computing dependencies for subversion-perlbindings-5.12:info:main .:debug:main subversion-perlbindings-5.12 has no conflicts
:debug:main Searching for dependency: expat
:debug:main Found Dependency: receipt exists for expat
:debug:main Searching for dependency: neon
:debug:main Found Dependency: receipt exists for neon
:debug:main Searching for dependency: apr
:debug:main Found Dependency: receipt exists for apr
:debug:main Searching for dependency: apr-util
:debug:main Found Dependency: receipt exists for apr-util
:debug:main Searching for dependency: db46
:debug:main Found Dependency: receipt exists for db46
:debug:main Searching for dependency: subversion
:debug:main Found Dependency: receipt exists for subversion
:debug:main Searching for dependency: perl5.12
:debug:main Found Dependency: receipt exists for perl5.12
:debug:main Searching for dependency: gettext
:debug:main Found Dependency: receipt exists for gettext
:debug:main Searching for dependency: libiconv
:debug:main Found Dependency: receipt exists for libiconv
:debug:main Searching for dependency: serf1
:debug:main Found Dependency: receipt exists for serf1
:debug:main Searching for dependency: cyrus-sasl2
:debug:main Found Dependency: receipt exists for cyrus-sasl2
:debug:main Searching for dependency: sqlite3
:debug:main Found Dependency: receipt exists for sqlite3
:msg:main 
:debug:main Executing org.macports.main (subversion-perlbindings-5.12)
:debug:main Skipping completed org.macports.archivefetch (subversion-perlbindings-5.12)
:debug:main Skipping completed org.macports.fetch (subversion-perlbindings-5.12)
:debug:main Skipping completed org.macports.checksum (subversion-perlbindings-5.12)
:debug:main Skipping completed org.macports.extract (subversion-perlbindings-5.12)
:debug:main Skipping completed org.macports.patch (subversion-perlbindings-5.12)
:debug:configure configure phase started at Fri Aug 31 20:48:23 EDT 2012
:notice:configure --->  Configuring subversion-perlbindings-5.12
:debug:configure Using compiler 'Mac OS X clang'
:debug:configure Executing proc-pre-org.macports.configure-configure-0
:debug:configure Executing reinplace: /usr/bin/sed s|hardcode_direct=yes|hardcode_direct=no|g < /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/work/subversion-1.7.6/configure >@ file11
:debug:configure Executing org.macports.configure (subversion-perlbindings-5.12)
:debug:configure Environment: CPATH='/opt/local/include' CFLAGS='-O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-O2 -arch x86_64' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.8' CXX='/usr/bin/clang++' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/work/.CC_PRINT_OPTIONS' F90FLAGS='-O2 -m64' LDFLAGS='-L/opt/local/lib -arch x86_64' FCFLAGS='-O2 -m64' OBJC='/usr/bin/clang' INSTALL='/usr/bin/install -c' ac_cv_path_PERL='/opt/local/bin/perl5.12' OBJCFLAGS='-O2 -arch x86_64' FFLAGS='-O2 -m64' CC_PRINT_OPTIONS='YES' CC='/usr/bin/clang'
:debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/work/subversion-1.7.6" && ./configure --prefix=/opt/local --with-berkeley-db=:/opt/local/include/db46:/opt/local/lib/db46:db-4.6 --with-neon=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\${prefix}/share/man --disable-neon-version-check --with-serf=/opt/local --with-sasl=/opt/local'
:debug:configure Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/work/subversion-1.7.6" && ./configure --prefix=/opt/local --with-berkeley-db=:/opt/local/include/db46:/opt/local/lib/db46:db-4.6 --with-neon=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\${prefix}/share/man --disable-neon-version-check --with-serf=/opt/local --with-sasl=/opt/local 
:info:configure configure: Configuring Subversion 1.7.6
:info:configure configure: creating config.nice
:info:configure checking for gcc... /usr/bin/clang
:info:configure checking whether the C compiler works... yes
:info:configure checking for C compiler default output file name... a.out
:info:configure checking for suffix of executables... 
:info:configure checking whether we are cross compiling... no
:info:configure checking for suffix of object files... o
:info:configure checking whether we are using the GNU C compiler... yes
:info:configure checking whether /usr/bin/clang accepts -g... yes
:info:configure checking for /usr/bin/clang option to accept ISO C89... none needed
:info:configure checking whether we are using the GNU C++ compiler... yes
:info:configure checking whether /usr/bin/clang++ accepts -g... yes
:info:configure checking how to run the C preprocessor... /usr/bin/clang -E
:info:configure checking for a sed that does not truncate output... /opt/local/bin/gsed
:info:configure checking build system type... x86_64-apple-darwin12.1.0
:info:configure checking host system type... x86_64-apple-darwin12.1.0
:info:configure checking target system type... x86_64-apple-darwin12.1.0
:info:configure checking for grep that handles long lines and -e... /usr/bin/grep
:info:configure checking for egrep... /usr/bin/grep -E
:info:configure checking whether ln -s works... yes
:info:configure checking for a BSD-compatible install... /usr/bin/install -c
:info:configure configure: Apache Portable Runtime (APR) library configuration
:info:configure checking for APR... yes
:info:configure checking APR version... 1.4.6
:info:configure configure: Apache Portable Runtime Utility (APRUTIL) library configuration
:info:configure checking for APR-util... yes
:info:configure checking APR-UTIL version... 1.4.1
:info:configure checking for pkg-config... /opt/local/bin/pkg-config
:info:configure configure: checking neon library
:info:configure checking neon library version... 0.29.6
:info:configure checking for ANSI C header files... yes
:info:configure checking for sys/types.h... yes
:info:configure checking for sys/stat.h... yes
:info:configure checking for stdlib.h... yes
:info:configure checking for string.h... yes
:info:configure checking for memory.h... yes
:info:configure checking for strings.h... yes
:info:configure checking for inttypes.h... yes
:info:configure checking for stdint.h... yes
:info:configure checking for unistd.h... yes
:info:configure configure: serf library configuration
:info:configure checking serf.h usability... yes
:info:configure checking serf.h presence... yes
:info:configure checking for serf.h... yes
:info:configure checking for serf_context_create in -lserf-1... yes
:info:configure checking whether to look for GSSAPI (Kerberos)... no
:info:configure configure: looking for apr_memcache as part of apr-util
:info:configure checking apr_memcache.h usability... yes
:info:configure checking apr_memcache.h presence... yes
:info:configure checking for apr_memcache.h... yes
:info:configure checking for apr_memcache_create in -laprutil-1... yes
:info:configure checking for Apache module support via DSO through APXS... no
:info:configure ==================================================================
:info:configure WARNING: skipping the build of mod_dav_svn
:info:configure          try using --with-apxs
:info:configure ==================================================================
:info:configure configure: checking sqlite library
:info:configure checking sqlite amalgamation... no
:info:configure checking sqlite3.h usability... yes
:info:configure checking sqlite3.h presence... yes
:info:configure checking for sqlite3.h... yes
:info:configure checking sqlite library version (via header)... okay
:info:configure checking for sqlite3_close in -lsqlite3... yes
:info:configure configure: configuring libtool now
:info:configure checking how to print strings... printf
:info:configure checking for a sed that does not truncate output... (cached) /opt/local/bin/gsed
:info:configure checking for fgrep... /usr/bin/grep -F
:info:configure checking for ld used by /usr/bin/clang... /usr/bin/ld
:info:configure checking if the linker (/usr/bin/ld) is GNU ld... no
:info:configure checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
:info:configure checking the name lister (/usr/bin/nm) interface... BSD nm
:info:configure checking the maximum length of command line arguments... 196608
:info:configure checking whether the shell understands some XSI constructs... yes
:info:configure checking whether the shell understands "+="... yes
:info:configure checking how to convert x86_64-apple-darwin12.1.0 file names to x86_64-apple-darwin12.1.0 format... func_convert_file_noop
:info:configure checking how to convert x86_64-apple-darwin12.1.0 file names to toolchain format... func_convert_file_noop
:info:configure checking for /usr/bin/ld option to reload object files... -r
:info:configure checking for objdump... no
:info:configure checking how to recognize dependent libraries... pass_all
:info:configure checking for dlltool... no
:info:configure checking how to associate runtime and link libraries... printf %s\n
:info:configure checking for ar... ar
:info:configure checking for archiver @FILE support... no
:info:configure checking for strip... strip
:info:configure checking for ranlib... ranlib
:info:configure checking for gawk... gawk
:info:configure checking command to parse /usr/bin/nm output from /usr/bin/clang object... ok
:info:configure checking for sysroot... no
:info:configure checking for mt... no
:info:configure checking if : is a manifest tool... no
:info:configure checking for dsymutil... dsymutil
:info:configure checking for nmedit... nmedit
:info:configure checking for lipo... lipo
:info:configure checking for otool... otool
:info:configure checking for otool64... no
:info:configure checking for -single_module linker flag... yes
:info:configure checking for -exported_symbols_list linker flag... yes
:info:configure checking for -force_load linker flag... yes
:info:configure checking for dlfcn.h... yes
:info:configure checking for objdir... .libs
:info:configure checking if /usr/bin/clang supports -fno-rtti -fno-exceptions... yes
:info:configure checking for /usr/bin/clang option to produce PIC... -fno-common -DPIC
:info:configure checking if /usr/bin/clang PIC flag -fno-common -DPIC works... yes
:info:configure checking if /usr/bin/clang static flag -static works... no
:info:configure checking if /usr/bin/clang supports -c -o file.o... yes
:info:configure checking if /usr/bin/clang supports -c -o file.o... (cached) yes
:info:configure checking whether the /usr/bin/clang linker (/usr/bin/ld) supports shared libraries... yes
:info:configure checking dynamic linker characteristics... darwin12.1.0 dyld
:info:configure checking how to hardcode library paths into programs... immediate
:info:configure checking whether stripping libraries is possible... yes
:info:configure checking if libtool supports shared libraries... yes
:info:configure checking whether to build shared libraries... yes
:info:configure checking whether to build static libraries... yes
:info:configure checking how to run the C++ preprocessor... /usr/bin/clang++ -E
:info:configure checking for ld used by /usr/bin/clang++... /usr/bin/ld
:info:configure checking if the linker (/usr/bin/ld) is GNU ld... no
:info:configure checking whether the /usr/bin/clang++ linker (/usr/bin/ld) supports shared libraries... yes
:info:configure checking for /usr/bin/clang++ option to produce PIC... -fno-common -DPIC
:info:configure checking if /usr/bin/clang++ PIC flag -fno-common -DPIC works... yes
:info:configure checking if /usr/bin/clang++ static flag -static works... no
:info:configure checking if /usr/bin/clang++ supports -c -o file.o... yes
:info:configure checking if /usr/bin/clang++ supports -c -o file.o... (cached) yes
:info:configure checking whether the /usr/bin/clang++ linker (/usr/bin/ld) supports shared libraries... yes
:info:configure checking dynamic linker characteristics... darwin12.1.0 dyld
:info:configure checking how to hardcode library paths into programs... immediate
:info:configure configure: building both shared and static libraries
:info:configure checking whether libtool needs -no-undefined... no
:info:configure checking whether to avoid circular linkage at all costs... no
:info:configure checking for trang... none
:info:configure checking for doxygen... /opt/local/bin/doxygen
:info:configure checking for Expat... yes
:info:configure checking for socket in -lsocket... no
:info:configure checking for availability of Berkeley DB... no
:info:configure configure: error: Berkeley DB 4.0.14 or newer wasn't found.
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/work/subversion-1.7.6" && ./configure --prefix=/opt/local --with-berkeley-db=:/opt/local/include/db46:/opt/local/lib/db46:db-4.6 --with-neon=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\${prefix}/share/man --disable-neon-version-check --with-serf=/opt/local --with-sasl=/opt/local 
:info:configure Exit code: 1
:error:configure org.macports.configure for port subversion-perlbindings-5.12 returned: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
    while executing
"$procedure $targetname"
:info:configure Warning: targets not executed for subversion-perlbindings-5.12: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Please see the log file for port subversion-perlbindings-5.12 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/main.log

I've read several similar-but-different tickets, and already re-installed perl perl5.8 perl5.12 serf serf0 serf1 apr apr-util db46, all to no avail.

Change History (13)

comment:1 Changed 12 years ago by danielluke (Daniel J. Luke)

Ok, so we just need to figure out why (on your system) it's not finding db46, which appears to be installed.

So, when you say you 're-installed' db46, what did you actually do?

What does

% file /opt/local/lib/db46/libdb-4.6.dylib

say?

What does

% otool -L /opt/local/lib/db46/libdb-4.6.dylib

say?

comment:2 Changed 12 years ago by danielluke (Daniel J. Luke)

Owner: changed from macports-tickets@… to dluke@…
Status: newassigned

comment:3 in reply to:  1 Changed 12 years ago by mina.macports@…

Hi

Replying to dluke@…:

So, when you say you 're-installed' db46, what did you actually do?

I ran

port upgrade -cu --force db46

What does

% file /opt/local/lib/db46/libdb-4.6.dylib

say?

/opt/local/lib/db46/libdb-4.6.dylib: Mach-O 64-bit dynamically linked shared library x86_64

What does

% otool -L /opt/local/lib/db46/libdb-4.6.dylib

say?

/opt/local/lib/db46/libdb-4.6.dylib:
        /opt/local/lib/db46/libdb-4.6.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

comment:4 Changed 12 years ago by danielluke (Daniel J. Luke)

ok, inside the build directory there should be a config.log which should shed some light on why the test for BDB is failing.

comment:5 in reply to:  4 Changed 12 years ago by mina.macports@…

Replying to dluke@…:

ok, inside the build directory there should be a config.log which should shed some light on why the test for BDB is failing.

Here's the relevant portion:

configure:17904: checking for availability of Berkeley DB
configure:17976: gcc -o conftest -g -O2    -I/opt/local/include/db46  -I/opt/local/include/apr-1 -I/opt/local/include    -DDARWIN -DSIGPROCMASK_SETS_THREAD_MA
SK -no-cpp-precomp   -L/opt/local/lib -L/opt/local/lib/db46 conftest.c  -L/opt/local/lib -ldb-4.6  >&5
conftest.c: In function 'main':
conftest.c:42: error: 'DB_VERSION_MAJOR' undeclared (first use in this function)
conftest.c:42: error: (Each undeclared identifier is reported only once
conftest.c:42: error: for each function it appears in.)
conftest.c:43: error: 'DB_VERSION_MINOR' undeclared (first use in this function)
conftest.c:44: error: 'DB_VERSION_PATCH' undeclared (first use in this function)
configure:17976: $? = 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.7.6"
| #define PACKAGE_STRING "subversion 1.7.6"
| #define PACKAGE_BUGREPORT "http://subversion.apache.org/"
| #define PACKAGE_URL ""
| #define SVN_NEON_0_26 1
| #define SVN_NEON_0_27 1
| #define SVN_NEON_0_28 1
| #define SVN_HAVE_NEON 1
| #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 HAVE_SERF_H 1
| #define SVN_HAVE_SERF 1
| #define SVN_HAVE_MEMCACHE 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 <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);
|
|   /* 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:17995: result: no
configure:17999: error: Berkeley DB 4.0.14 or newer wasn't found.

Hmm. Notably absent is an #include <db.h> I'd expect to see there.

Perhaps the test intentionally shouldn't load it (the #define APU_WANT_DB #include <apu_want.h> suspiciously looks like it might be a replacement), but its simply not happening - as db.h needs to make it there for these defines its failing on to exist.

On a whim, I took another look at the failing command:

cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/work/subversion-1.7.6" && ./configure --prefix=/opt/local --with-berkeley-db=:/opt/local/include/db46:/opt/local/lib/db46:db-4.6 --with-neon=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\${prefix}/share/man --disable-neon-version-check --with-serf=/opt/local --with-sasl=/opt/local

Tweaked it slightly (specifically --with-berkeley-db=db.h:THEREST...), and it appears to have worked:

cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_subversion-perlbindings/subversion-perlbindings-5.12/work/subversion-1.7.6" && ./configure --prefix=/opt/local --with-berkeley-db=db.h:/opt/local/include/db46:/opt/local/lib/db46:db-4.6 --with-neon=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\${prefix}/share/man --disable-neon-version-check --with-serf=/opt/local --with-sasl=/opt/local
...
...
checking for socket in -lsocket... no
checking for availability of Berkeley DB... yes
checking whether to look for SASL... yes
...
...

I'm not sure however why its not there in the first place, or how this can actually be fixed in the port/configure script to invoke it this way...

comment:6 Changed 12 years ago by danielluke (Daniel J. Luke)

well it does build find on my ML system without that change.

apu_want.h should pull in the correct db.h (since APU_HAVE_DB is defined before including it).

Does your apr-util port have an api_want.h installed that has a section that looks like this?

#ifdef APU_WANT_DB

#if APU_HAVE_DB
#include <db46/db.h>
#endif

#undef APU_WANT_DB
#endif

comment:7 Changed 12 years ago by mina.macports@…

No, my /opt/local/include/apr-1/apu_want.h is slightly different:

#ifdef APU_WANT_DB

#if APU_HAVE_DB
#include <db.h>
#endif

#undef APU_WANT_DB
#endif

Note it includes db.h, not db46/db.h like your copy does

Also worth noting that in both my and your case, the #include of db.h (or db64.h) will only happen when BOTH these defines are enabled:

APU_WANT_DB APU_HAVE_DB

However, in the test C program configure ran (pasted in comment:5, it only defines APU_WANT_DB, not APU_HAVE_DB.....

comment:8 Changed 12 years ago by mina.macports@…

Perhaps in my case, this variant is the culprit:

sh-3.2# port installed apr-util
The following ports are currently installed:
  apr-util @1.4.1_0+no_bdb (active)

comment:9 Changed 12 years ago by danielluke (Daniel J. Luke)

APU_HAVE_DB is defined in apu.h which is included by apu_want.h

So the issue here might be that your apr-util built without the correct path to db.h

you didn't by chance build it with the +no_bdb variant, did you?

comment:10 in reply to:  8 Changed 12 years ago by danielluke (Daniel J. Luke)

Resolution: invalid
Status: assignedclosed

Replying to mina.macports@…:

Perhaps in my case, this variant is the culprit:

sh-3.2# port installed apr-util
The following ports are currently installed:
  apr-util @1.4.1_0+no_bdb (active)

oh yep, that's 100% your fault then. There's a matching +no_bdb variant on the perlbindings port that you can use if you want.

comment:11 Changed 12 years ago by mina.macports@…

Cool - I worked around the problem (temporarily) by manually editing the portfile and using --with-berkeley-db=db.h:XXXX...

Regarding the matching +no_bdb variant you mention - that was actually my first instinct to fix this, but I don't see it:

sh-3.2# port variants subversion-perlbindings
subversion-perlbindings has no variants

comment:12 Changed 12 years ago by danielluke (Daniel J. Luke)

/hint/ subversion-perlbindings isn't the name of the port you installed...

comment:13 Changed 12 years ago by mina.macports@…

I see. subversion-perlbindings-5.12 and subversion-perlbindings are different ports.

Thanks for your help.

Note: See TracTickets for help on using tickets.