Opened 10 years ago

Closed 10 years ago

#44039 closed defect (fixed)

gnome-libs doesn't find Berkeley DB during configure

Reported by: jruschme@… Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager)
Port: gnome-libs

Description

Tried to install gnome-libs on MBP running 10.9.3. Installation fails during configuration due to being unable to find db.h (Berekeley db). Command-line tools are correctly installed and /usr/include/db.h is present.

Problem also occurs on a system running 10.7.5, but not on a G4 running 10.5.8. (Compilation fails on 10.5.8 due to code not being updated for libpng >= 1.4.)

Attachments (8)

main.log (72.2 KB) - added by jruschme@… 10 years ago.
config.log (106.5 KB) - added by jruschme@… 10 years ago.
failed-build-libpng.log (78.4 KB) - added by dbevans (David B. Evans) 10 years ago.
Build log showing libpng problem
failed-build-db46.log (158.8 KB) - added by dbevans (David B. Evans) 10 years ago.
Build log showing db46 problem
patch-db46-db185-compat.diff (526 bytes) - added by dbevans (David B. Evans) 10 years ago.
Patch to add +compat185 variant to db46
failed-build-gnome-dump-link-error.log (196.3 KB) - added by dbevans (David B. Evans) 10 years ago.
Build log showing link error
patch-gnome-libs.diff (2.8 KB) - added by dbevans (David B. Evans) 10 years ago.
revised patch with fix for -ldb link error
patch-gnome-libs.2.diff (8.8 KB) - added by dbevans (David B. Evans) 10 years ago.
revised patch with final libpng fixes, dependencies, db46 variant check

Download all attachments as: .zip

Change History (22)

Changed 10 years ago by jruschme@…

Attachment: main.log added

comment:1 Changed 10 years ago by jmroot (Joshua Root)

Keywords: gnome-libs Berkeley DB removed

Please attach the config.log.

Changed 10 years ago by jruschme@…

Attachment: config.log added

comment:2 Changed 10 years ago by jruschme@…

That makes more sense... it's trying to use /lib/cpp (which doesn't exist) for the test.

comment:3 Changed 10 years ago by jmroot (Joshua Root)

Clang is warning about an unused argument, and configure seems to be interpreting any output to stderr as failure. Try removing the line

configure.cppflags-append "-L${prefix}/lib”

from the portfile.

comment:4 Changed 10 years ago by dbevans (David B. Evans)

Attached is a patch to fix the configuration issues, works for me on 10.8. However, build now fails (not surprisingly) due to API problems with current version of libpng. Attaching log for failed build.

Last edited 10 years ago by dbevans (David B. Evans) (previous) (diff)

Changed 10 years ago by dbevans (David B. Evans)

Attachment: failed-build-libpng.log added

Build log showing libpng problem

Changed 10 years ago by dbevans (David B. Evans)

Attachment: failed-build-db46.log added

Build log showing db46 problem

comment:5 Changed 10 years ago by dbevans (David B. Evans)

Attached patch revised to include additional dependencies and libpng API fixes. Build now fails with db46 API issues.

comment:6 Changed 10 years ago by dbevans (David B. Evans)

Looks like it wants db185 compatibility mode. This means that db46 needs to be rebuilt with --enable-compat185 option.

Changed 10 years ago by dbevans (David B. Evans)

Patch to add +compat185 variant to db46

comment:7 Changed 10 years ago by dbevans (David B. Evans)

Patch attached that adds a +compat185 variant to db46. To install db46 with db185 compatibility mode (after applying this patch) use

sudo port install db46 +compat185

This fixes the db46 API issues but fails again during linking due to a missing -ldb

/usr/bin/clang -pipe -Os -fstrict-aliasing -funroll-loops -arch x86_64 -Wall -Wunused -Wl,-headerpad_max_install_names -arch x86_64 -o .libs/gnome-dump-metadata gnome-dump.o -Wl,-framework -Wl,CoreAudio  -L/opt/local/lib -L/opt/local/lib/db46 -L./.libs -lgnome -L../support/.libs -lgnomesupport -lesd -lglib -lintl -lz -lm
Undefined symbols for architecture x86_64:
  "___db185_open", referenced from:
      _main in gnome-dump.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Changed 10 years ago by dbevans (David B. Evans)

Build log showing link error

Changed 10 years ago by dbevans (David B. Evans)

Attachment: patch-gnome-libs.diff added

revised patch with fix for -ldb link error

comment:8 Changed 10 years ago by dbevans (David B. Evans)

gnome-libs patch updated with fix for link error. Now more libpng API issues. Are we having fun yet? Will get back to this later today.

Changed 10 years ago by dbevans (David B. Evans)

Attachment: patch-gnome-libs.2.diff added

revised patch with final libpng fixes, dependencies, db46 variant check

comment:9 Changed 10 years ago by dbevans (David B. Evans)

Patch updated with additional libpng fixes, a missing dependency and adds a check for the db46 +compatdb185 variant before configuration.

Fix to add this variant to db46 committed in r121187.

With these final changes gnome-info builds for me. Note that gnome-libs does not provide a pkg-config file so you make have to include some or all of the following include paths to get your project to build

configure.cppflags-append -I${prefix}/include/gnome-1.0 \
                          -I${prefix}/lib/gnome-libs/include \
                          -I${prefix}/include/gtk-1.2 \
                          -I${prefix}/include/glib-1.2 \
                          -I${prefix}/lib/glib/include

Please test with your app and let me know if this works for you or there are still some problems. If it does work, I'll commit the changes to the port.

Last edited 10 years ago by dbevans (David B. Evans) (previous) (diff)

comment:10 Changed 10 years ago by cooljeanius (Eric Gallager)

(Compilation fails on 10.5.8 due to code not being updated for libpng >= 1.4.)

I think that this might be the one I ran into on 10.6.8, which I fixed in my local gnome-libs Portfile by hacking the autoheader-generated config header. Then again I made some other changes as well, so it might have been something else, I forget...

comment:11 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:12 in reply to:  10 ; Changed 10 years ago by dbevans (David B. Evans)

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

Replying to egall@…:

(Compilation fails on 10.5.8 due to code not being updated for libpng >= 1.4.)

I think that this might be the one I ran into on 10.6.8, which I fixed in my local gnome-libs Portfile by hacking the autoheader-generated config header. Then again I made some other changes as well, so it might have been something else, I forget...

Not sure I understand your comment. The patches attached (but not committed yet) fix the issue of libpng >= 1.4.

comment:13 in reply to:  12 Changed 10 years ago by cooljeanius (Eric Gallager)

Replying to devans@…:

Replying to egall@…:

(Compilation fails on 10.5.8 due to code not being updated for libpng >= 1.4.)

I think that this might be the one I ran into on 10.6.8, which I fixed in my local gnome-libs Portfile by hacking the autoheader-generated config header. Then again I made some other changes as well, so it might have been something else, I forget...

Not sure I understand your comment. The patches attached (but not committed yet) fix the issue of libpng >= 1.4.

Sorry, I was just responding to the OP; I hadn't read the posts in between yet... anyways, I see them now, so sorry for the noise...

comment:14 Changed 10 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: assignedclosed
Version: 2.3.0

Build fixes committed in r121425.

Note: See TracTickets for help on using tickets.