New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #32851 (closed defect: fixed)

Opened 18 months ago

Last modified 18 months ago

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

main.log (11.4 KB) - added by steve@… 18 months ago.
Other build log was incorrect.

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

The problem is:

:info:install dyld: Library not loaded: /sw/lib/libbz2.1.dylib
:info:install   Referenced from: /sw/bin/bzip2
:info:install   Reason: Incompatible library version: bzip2 requires version 1.0.1 or later, but libbz2.1.dylib provides version 1.0.0

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.

Changed 18 months ago by steve@…

Other build log was incorrect.

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.

comment:5 Changed 18 months ago by ryandesign@…

  • Cc pixilla@… added

comment:6 Changed 18 months ago by ryandesign@…

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.