<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - No scandir function available"
href="https://bugs.freedesktop.org/show_bug.cgi?id=77034">77034</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>fontconfig-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>No scandir function available
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>freedesktop@behdad.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>freedesktop-2014@ryandesign.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>library
</td>
</tr>
<tr>
<th>Product</th>
<td>fontconfig
</td>
</tr></table>
<p>
<div>
<pre>I'm the maintainer of fontconfig in MacPorts. I'm trying to update fontconfig
to 2.11.1 but it fails at the configure stage with this error:
checking for posix_fadvise in fcntl.h... no
checking for scandir... configure: error:
*** No scandir function available.
About this problem, the config.log says this:
configure:14021: ccache /usr/bin/clang -arch x86_64 -c -pipe -Os
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing -Werror
-I/opt/local/include
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
conftest.c >&5
clang: error: argument unused during compilation: '-I /opt/local/include'
MacPorts is setting various environment variables at configure time, including:
CC='ccache /usr/bin/clang -arch x86_64'
CFLAGS='-pipe -Os
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'
CPPFLAGS='-I/opt/local/include
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'
The error is due to a combination of factors:
* I am using the clang compiler, which is the only compiler available with the
Apple developer tools on OS X 10.9 and later
* the version of ccache I am using, 3.1.9, although it is the latest version
available, is not fully compatible with clang, in that it erroneously emits the
warning "argument unused during compilation" for any -I flag given (everything
works fine; it's just that this incorrect warning is emitted)
* your configure script is requesting that all warnings be turned into errors,
via the -Werror flag
You should not be distributing scripts where your users will end up using the
-Werror flag. You can use it yourself during development, but you can't predict
what situations every compiler might consider to be an error, especially as
compilers continue to be developed and refined. At MacPorts, we often have to
remove -Werror from projects' configure scripts because newer versions of clang
often consider additional things to be errors.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>