Bug 241179 - graphics/rawtherapee fails to find ccache
Summary: graphics/rawtherapee fails to find ccache
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-10 12:44 UTC by tech-lists
Modified: 2019-10-11 06:56 UTC (History)
2 users (show)

See Also:
mandree: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tech-lists 2019-10-10 12:44:26 UTC
Hi,

context: poudriere amd64 12.1-stable

The build fails to find ccache and fails with the following:

[...]
[00:01:04] /usr/local/bin/ccache /usr/local/bin/g++9  -DAUTO_GDK_FLUSH=0 -DGUIVERSION -DMYFILE_MMAP -DNDEBUG -DSTRICT_MUTEX=1 -DTRACE_MYRWMUTEX=0 -D_DNDEBUG -Irtgui -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libdrm -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/lib -I/usr/local/include/giomm-2.4 -I/usr/local/lib/giomm-2.4/include -I/usr/local/include/glibmm-2.4 -I/usr/local/lib/glibmm-2.4/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include/gtkmm-3.0 -I/usr/local/lib/gtkmm-3.0/include -I/usr/local/include/atkmm-1.6 -I/usr/local/include/pangomm-1.4 -I/usr/local/lib/pangomm-1.4/include -I/usr/local/include/cairomm-1.0 -I/usr/local/lib/cairomm-1.0/include -I/usr/local/include/gtk-3.0/unix-print -I/usr/local/include/gdkmm-3.0 -I/usr/local/lib/gdkmm-3.0/include -I/usr/local/include/libiptcdata -I/usr/local/include/lensfun -I/usr/local/include/librsvg-2.0 -O2 -pipe  -I/usr/local/include -fPIC -flto=16 -O3 -funroll-loops -msse2 -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -nostdinc++ -isystem /usr/include/c++/v1 -Wl,-rpath=/usr/local/lib/gcc9 -isystem /usr/local/include -std=c++11 -mtune=generic -Werror=unused-label -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas -O2 -pipe  -I/usr/local/include -fPIC -flto=16 -O3 -funroll-loops -msse2 -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -nostdinc++ -isystem /usr/include/c++/v1 -Wl,-rpath=/usr/local/lib/gcc9 -isystem /usr/local/include   -O2 -pipe  -I/usr/local/include -fPIC -flto=16 -O3 -funroll-loops -msse2 -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -nostdinc++ -isystem /usr/include/c++/v1 -Wl,-rpath=/usr/local/lib/gcc9 -isystem /usr/local/include -std=c++11 -mtune=generic -Werror=unused-label -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas -MD -MT rtgui/CMakeFiles/rth.dir/bayerpreprocess.cc.o -MF rtgui/CMakeFiles/rth.dir/bayerpreprocess.cc.o.d -o rtgui/CMakeFiles/rth.dir/bayerpreprocess.cc.o -c /wrkdirs/usr/ports/graphics/rawtherapee/work/rawtherapee-5.7/rtgui/bayerpreprocess.cc
[00:01:04] /bin/sh: /usr/local/bin/ccache: not found
[00:01:04] ninja: build stopped: subcommand failed.
[00:01:04] ===> Compilation failed unexpectedly.
[00:01:04] Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
[00:01:04] the maintainer.
[00:01:04] *** Error code 1
[...]

The port can be built with testport in the following way: with the -I option which allows the jail to keep running so one can manually install /usr/ports/devel/ccache. One can then cd ../../graphics/rawthereapee && make && make install and it proceeds normally.
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2019-10-10 18:14:35 UTC
It works for me.  Do you have NO_CCACHE_DEPEND set somewhere in /etc/*.conf or poudriere configuration? 

Be sure *not* to set NO_CCACHE_DEPEND! 

The Makefile only adds ccache to the args if WITH_CCACHE_BUILD is set:

.if "${WITH_CCACHE_BUILD}" == "yes" && !defined(NO_CCACHE) 
CMAKE_ARGS+=    -DCMAKE_C_COMPILER_LAUNCHER=${LOCALBASE}/bin/ccache \
                -DCMAKE_CXX_COMPILER_LAUNCHER=${LOCALBASE}/bin/ccache
.endif
Comment 3 Bryan Drewery freebsd_committer freebsd_triage 2019-10-10 20:11:26 UTC
(In reply to Matthias Andree from comment #2)

Fixed in r514245.

Please don't assume where ccache is installed. There is now a CCACHE_BIN
variable for this purpose.
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2019-10-10 20:49:55 UTC
Bryan, 

not so fast.

Thanks for amending to the framework with CCACHE_BIN and deploying that CCACHE_BIN feature, but it does not help.

The issue is  "ccache not installed into jail", 
and it is NOT "ccache installed but not found".

The _root_ cause is NO_CCACHE_DEPEND as evidenced by the log (I've a copy in my freefall home directory.) 
=> ccache is not added to BUILD_DEPENDS 
=> poudriere does not install ccache

Everything is as intended.

We haven't fixed anything about rawtherapee. 
This is either the user's or poudriere's fault.

If you want to "fix" something then trap the conflict between CCACHE_BUILD and NO_CCACHE_DEPEND in bsd.ccache.mk or poudriere and report it to the user.

Restoring Bug status.
Comment 5 tech-lists 2019-10-11 00:17:37 UTC
(In reply to Matthias Andree from comment #4)

Hello,

After r514245 poudriere was able to build the port successfully. 

I made no changes to any configuration files to make that happen, as I could not find any *.conf file used in the build process that had a NO_CCACHE_DEPEND entry.

The ccache my system uses is ccache-memcached. It has always used this.
Comment 6 Bryan Drewery freebsd_committer freebsd_triage 2019-10-11 03:06:51 UTC
(In reply to Matthias Andree from comment #4)

Right. NO_CCACHE_DEPEND is purposely set here for a Poudriere feature. It is to
support a static version of ccache for memcached support. It installs NOT to
LOCALBASE.

Set the bug to whatever you want but the port was broken.
Comment 7 Bryan Drewery freebsd_committer freebsd_triage 2019-10-11 03:14:42 UTC
(In reply to Bryan Drewery from comment #6)

It was broken in that the framework for CCACHE is using CCACHE_WRAPPER_PATH
(in PATH) rather than CC=LOCALBASE/bin/ccache. So the path to ccache should
have been based on that in some way. I made the same fix to lang/rust back in:

    r464010 | bdrewery | 2018-03-09 13:35:49 -0800 (Fri, 09 Mar 2018) | 2 lines

    Fix WITH_CCACHE_BUILD when using Poudriere's ccache-memcached support.

It's quite silly to fight with another developer over a bug status on something
you don't fully understand.
Comment 8 Matthias Andree freebsd_committer freebsd_triage 2019-10-11 06:56:16 UTC
Update status based on comment #5, which is pretty non-obvious to me. tech-lists@, thanks for the success report.