Opened 6 years ago

Last modified 8 months ago

#46331 assigned defect

libtool contains references to ccache when it was built with ccache

Reported by: ryandesign (Ryan Schmidt) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: chrstphrchvz (Christopher Chavez)
Port: libtool

Description

If my MacPorts installation is configured to use ccache at the time that the libtool port is built and installed, then the installed copy of libtool contains references to ccache and uses ccache when other software uses libtool, even if those other ports have requested that ccache be disabled.

$ grep ccache /opt/local/bin/glibtool
LTCC="ccache /usr/bin/clang"
CC="ccache /usr/bin/clang"
CC="ccache /usr/bin/clang++"

In fact it looks like it contains references to the compiler (clang in this case) as well.

Attachments (2)

main.log (152.6 KB) - added by ryandesign (Ryan Schmidt) 5 years ago.
pdflib main.log
pdflib-universal-buildjobs1.log (204.8 KB) - added by larryv (Lawrence Velázquez) 5 years ago.
log for single-threaded, universal pdflib @7.0.5_2 build

Download all attachments as: .zip

Change History (6)

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

I'm attaching a logfile which shows how pdflib fails to build when libtool was built with ccache (even though the pdflib portfile already says "configure.ccache no". It would be nice if we could fix this somehow. The simplest would be to set "configure.ccache no" in the libtool portfile and increase its revision.

Changed 5 years ago by ryandesign (Ryan Schmidt)

Attachment: main.log added

pdflib main.log

comment:2 Changed 5 years ago by larryv (Lawrence Velázquez)

Status: newassigned

Sorry for taking so long to look into this (to put it mildly).

I agree that there’s something mildly unsettling about the hardcoded references to ccache, but it's not clear to me that they’re the root cause of this build problem. Unfortunately, I’m unable to reproduce the problem with pdflib @7.0.5_2, even though I deleted MacPorts’s ccache…cache…and the build did copy over the “infected” libtool:

% port installed libtool and active
The following ports are currently installed:
  libtool @2.4.6_2+universal (active)
% sudo rm -fR /opt/local/var/macports/build/.ccache
% sudo port build pdflib +universal build.jobs=1
--->  Computing dependencies for pdflib
--->  Fetching distfiles for pdflib
--->  Verifying checksums for pdflib
--->  Extracting pdflib
--->  Applying patches to pdflib
--->  Configuring pdflib
--->  Building pdflib
% ag ccache $(port work pdflib)/PDFlib-Lite-7.0.5/libtool
171:LTCC="ccache /usr/bin/clang"
324:CC="ccache /usr/bin/clang"
504:        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11679:CC="ccache /usr/bin/clang++"
% 

Can you still reproduce this?

Changed 5 years ago by larryv (Lawrence Velázquez)

log for single-threaded, universal pdflib @7.0.5_2 build

comment:3 Changed 8 months ago by chrstphrchvz (Christopher Chavez)

This problem still exists, and I agree it is more generally that whichever compiler commands were specified are getting hardcoded.

comment:4 Changed 8 months ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added
Note: See TracTickets for help on using tickets.