Opened 12 years ago

Closed 12 years ago

#32851 closed defect (fixed)

logrotate fails to build with clang

Reported by: steve@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang Cc: pixilla (Bradley Giesbrecht)
Port: logrotate

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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 (1)

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

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Description: modified (diff)
Port: logrotate added
Resolution: invalid
Status: newclosed
Summary: logrotate fails to buildlogrotate fails to build when broken bzip2 from Fink is installed

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 12 years ago by steve@…

Attachment: main.log added

Other build log was incorrect.

comment:2 Changed 12 years ago by steve@…

Resolution: invalid
Status: closedreopened

That build log was incorrect, that was the before I removed fink. Attached is the new one with the linker error.

comment:3 Changed 12 years 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 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Keywords: clang added
Owner: changed from macports-tickets@… to ryandesign@…
Status: reopenednew
Summary: logrotate fails to build when broken bzip2 from Fink is installedlogrotate 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 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: pixilla@… added

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.