Strange behaviour of trace mode in MacPorts 2.4.3 / 10.13

Ryan Schmidt ryandesign at macports.org
Mon Apr 30 02:02:09 UTC 2018


On Apr 29, 2018, at 20:23, Helmut K. C. Tessarek wrote:

> On 2018-04-29 07:23, Joshua Root wrote:
>> Were dependencies declared on the ports providing those libraries? If
>> not, trace mode was just doing its job.
> 
> $ sudo port build -vst fontforge
> --->  Computing dependencies for fontforge
> --->  Fetching distfiles for fontforge
> --->  Verifying checksums for fontforge
> --->  Extracting fontforge
> --->  Applying patches to fontforge
> --->  Configuring fontforge
> Error: Failed to configure fontforge, consult
> /opt/local/var/macports/build/_Users_kct_data_work_ports_graphics_fontforge/fontforge/work/fontforge-2.0.20170731/config.log
> Warning: The following existing files were hidden from the build system
> by trace mode:
>  /opt/local/bin/pkg-config
>  /opt/local/bin/potrace
>  /opt/local/bin/update-desktop-database
>  /opt/local/bin/wget
>  /var/db/timezone/zoneinfo/America/Toronto
> Error: Failed to configure fontforge: configure failure: command
> execution failed
> Error: See
> /opt/local/var/macports/logs/_Users_kct_data_work_ports_graphics_fontforge/fontforge/main.log
> for details.
> Error: Follow https://guide.macports.org/#project.tickets to report a bug.
> Error: Processing of port fontforge failed
> 
> In the config.log I can see this:
> 
> configure:20386: checking for zlib.h
> configure:20386: result: yes
> configure:20404: checking for GLIB
> configure:20472: result: no
> configure:20474: error: in
> `/opt/local/var/macports/build/_Users_kct_data_work_ports_graphics_fontforge/fontforge/work/fontforge-2.0.20170731':
> configure:20476: error: The pkg-config script could not be found or is
> too old.  Make sure it
> is in your PATH or set the PKG_CONFIG environment variable to the full
> path to pkg-config.
> 
> Alternatively, you may set the environment variables GLIB_CFLAGS
> and GLIB_LIBS to avoid the need to call pkg-config.
> See the pkg-config man page for more details.
> 
> To get pkg-config, see <http://pkg-config.freedesktop.org/>.
> See `config.log' for more details
> 
> Hmm, so the trace mode hides /opt/local/bin/pkg-config, but then
> complains that pkg-config is too old.
> 
> What? Really? Hmmm. Double Hmmm.

Nothing hmm. The port doesn't declare a dependency on pkgconfig, therefore trace mode hides the pkg-config executable from the build system. The build system needs pkg-config however, so it errors. Add a dependency on pkgconfig, and anything else it needs. This is one of the primary purposes of trace mode: to help you identify dependencies you've forgotten to add.


> Btw, glib is in /opt/local/lib:
> 
> $ ls *glib*
> libglib-2.0.0.dylib libglib-2.0.a       libglib-2.0.dylib

I'm sure it is. But the build probably needs pkg-config to find it there.




More information about the macports-dev mailing list