#14102 closed defect (fixed)
fontconfig build fails if "head" is missing or unusable
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | Cc: | ||
Port: |
Description
If the /usr/bin/head
program is missing or unusable, or if an unusable head
program is listed first in the PATH
, fontconfig fails to build with this unintuitive error:
$ sudo port upgrade fontconfig ---> Building fontconfig with target all Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_fontconfig/work/fontconfig-2.5.0" && make all " returned error 2 Command output: fcaliastail.h:520:2: error: #endif without #if fcaliastail.h:522: error: only weak aliases are supported in this configuration fcaliastail.h:523:2: error: #endif without #if fcaliastail.h:525: error: only weak aliases are supported in this configuration fcaliastail.h:526:2: error: #endif without #if fcaliastail.h:528: error: only weak aliases are supported in this configuration fcaliastail.h:529:2: error: #endif without #if fcaliastail.h:531: error: only weak aliases are supported in this configuration fcaliastail.h:532:2: error: #endif without #if fcaliastail.h:534: error: only weak aliases are supported in this configuration fcaliastail.h:535:2: error: #endif without #if fcaliastail.h:537: error: only weak aliases are supported in this configuration fcaliastail.h:538:2: error: #endif without #if fcaliastail.h:540: error: only weak aliases are supported in this configuration fcaliastail.h:541:2: error: #endif without #if fcaliastail.h:543: error: only weak aliases are supported in this configuration fcaliastail.h:544:2: error: #endif without #if fcaliastail.h:546: error: only weak aliases are supported in this configuration fcaliastail.h:547:2: error: #endif without #if fcaliastail.h:549: error: only weak aliases are supported in this configuration fcaliastail.h:550:2: error: #endif without #if fcaliastail.h:552: error: only weak aliases are supported in this configuration fcaliastail.h:553:2: error: #endif without #if fcaliastail.h:555: error: only weak aliases are supported in this configuration fcaliastail.h:556:2: error: #endif without #if fcaliastail.h:557:2: error: #endif without #if make[3]: *** [fcatomic.lo] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Error: Unable to upgrade port: 1 $
/usr/bin/head
might be unusable if the user manually installed an old version of libwww-perl, which would have tried to install /usr/bin/HEAD
, which, on a case-insensitive filesystem like the default Mac HFS+ filesystem, would have collided with and overwritten /usr/bin/head
.
Another head
program might be in the user's PATH
if the user installed libwww-perl to another prefix that's in their PATH
before /usr/bin
.
This problem was reported on macports-users in January 2007 and in this ticket in June 2007 and on someone's blog in November 2007 and on macports-users in December 2007 and in this ticket in January 2008.
It would be nice if there were a more-intelligible error message for this situation.
Change History (5)
comment:1 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
I filed a bug with the developers of fontconfig. Maybe they'll change fontconfig to emit a better error message, or to avoid the problem altogether.
In the process of researching that bug, I found out how I could probably make a one-line change to fontconfig to work around the problem (change "head -1
" to "sed -n 1p
" in src/makealias
). I'm now torn as to whether I should do this, since doing so would mean the user would continue to have a broken head
program on their system which could just cause problems for them further down the road.
comment:3 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
comment:4 Changed 16 years ago by nox@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added a sensible error message if
/usr/bin/head
is missing or unusable in r33541. This doesn't yet help the other situation where an unusablehead
is found elsewhere.