Opened 16 years ago

Closed 14 years ago

#16559 closed defect (worksforme)

Leopard apache2 fails with "ld: library not found for -ldb-4.5" (db45 problem)

Reported by: i@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc:
Port: apache2

Description (last modified by jmroot (Joshua Root))

The apache2 port fails on Leopard with this error:

/opt/local/share/apr-1/build/libtool --silent --mode=link /usr/bin/gcc-4.0 -I/opt/local/include  -O2   -L/opt/local/lib/db44  -L/opt/local/lib -o htpasswd  htpasswd.lo   -L/opt/local/lib -lpcre /opt/local/lib/libaprutil-1.la -ldb-4.5 -lsqlite3 -lexpat -liconv /opt/local/lib/libapr-1.la -lpthread
ld: library not found for -ldb-4.5
collect2: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

I was able to find the required libraries and fix the problem like this:

cd /opt/local/lib
sudo ln -s db45/libdb* .

which links the library files from local/db45/lib into local/lib, where apache2 expects to find them.

Attachments (1)

apache2_db45_install_problem.txt (548 bytes) - added by i@… 16 years ago.
The error code and the workaround

Download all attachments as: .zip

Change History (6)

Changed 16 years ago by i@…

The error code and the workaround

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

Owner: changed from macports-tickets@… to imajes@…
Port: apache2 added

Assigning to maintainer. I don't understand why apache would be trying to link to db45, as it depends on db46 via apr-util.

comment:2 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:3 Changed 15 years ago by jeremy.g.ross@…

I'm encountering this issue after upgrading to Snow Leopard, reinstalling MacPorts, then doing a "port upgrade outdated".

Is this port still supported?

The workaround mentioned above doesn't work for me since I don't have db45 and the db45 port doesn't seem to exist anymore.

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from imajes@… to macports-tickets@…

James Cox (imajes) retires as MacPorts maintainer (see macports-mgr archives)

comment:5 Changed 14 years ago by jmroot (Joshua Root)

Description: modified (diff)
Resolution: worksforme
Status: newclosed

I can't reproduce this.

Note: See TracTickets for help on using tickets.