Ticket #32851 (closed defect: fixed)
logrotate fails to build with clang
| Reported by: | steve@… | Owned by: | ryandesign@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.0.3 |
| Keywords: | clang | Cc: | pixilla@… |
| Port: | logrotate |
Description (last modified by ryandesign@…) (diff)
ld exits with message 'ld: library not found for -lpopt' and a ls returns:
steve-mini:~ root# ls /opt/local/lib/*popt* /opt/local/lib/libpopt.0.dylib /opt/local/lib/libpopt.dylib /opt/local/lib/libpopt.a /opt/local/lib/libpopt.la
Attachments
Change History
comment:1 Changed 18 months ago by ryandesign@…
- Status changed from new to closed
- Description modified (diff)
- Cc ryandesign@… added
- Summary changed from logrotate fails to build to logrotate fails to build when broken bzip2 from Fink is installed
- Resolution set to invalid
- Port set to logrotate
comment:2 Changed 18 months ago by steve@…
- Status changed from closed to reopened
- Resolution invalid deleted
That build log was incorrect, that was the before I removed fink. Attached is the new one with the linker error.
comment:3 Changed 18 months ago by steve@…
The issue is apparent in line 119:
:info:build /Developer/usr/bin/clang -arch x86_64 -g logrotate.o log.o config.o basenames.o -lpopt -L/opt/local/include -o logrotate
The flag should be -L/opt/local/lib instead of -L/opt/local/include. I am uncertain as to the best way to patch the makefile to address this.
comment:4 Changed 18 months ago by ryandesign@…
- Cc ryandesign@… removed
- Status changed from reopened to new
- Keywords clang added
- Owner changed from macports-tickets@… to ryandesign@…
- Summary changed from logrotate fails to build when broken bzip2 from Fink is installed to logrotate fails to build with clang
Thanks. We didn't notice this problem until people started using Xcode 4.2, on which we default to the clang compiler, which does not use the CPATH / LIBRARY_PATH variables that would otherwise have told it where to find popt.
Note: See
TracTickets for help on using
tickets.


The problem is:
You have Fink installed. (Specifically, you have Fink's bzip2 program, but not Fink's bzip2 library, therefore Fink's bzip2 program doesn't work.) It is not supported to have another package manager or files installed by it installed while using MacPorts. Please decide whether you would like to use MacPorts or Fink, and uninstall the other and all software installed by it.