-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lha: fix implicit function declarations #9197
Conversation
How about updating the port to a newer upstream commit instead? In this commit they changed it so that it only tries to use private macOS functions if iconv is not available, which the port already declares a dependency on. |
Travis Build #15315 Passed. Lint results
Port lha success on xcode10.3. Log |
The port was already updated to the latest upstream commit, which descends from the one you linked to. Could something not be configuring as expected? |
Oh. I assumed based on the port version "1.14i-ac20081023" that it was a version from October 23, 2008. But indeed it already uses the latest commit which is from October 4, 2019 and does include the fix I mentioned. It should only go down this code path if There are no other occurrences of Using a version of MacPorts base containing the fix proposed in macports/macports-base#217 I see these additional messages after the configure phase:
These are the checks for |
No they are two different things. After running configure my config.h contains:
I think it's specifically checking for the "iconv" function, which would only be available with a system copy of iconv or libiconv; in a third-party libiconv installation, the function is instead named "libiconv". These differences are supposed to be transparent to the program as long as it includes the headers properly; maybe that's not being done in the configure test here. |
I posted an upstream fix for those conftest.c issues here -- jca02266/lha#18 |
There are actually two separate problems that got triggered by Xcode 12's decision to make -Werror,-Wimplicit-function-declaration the default: * The configure script has problems. Some of these can be fixed with an autoreconf run, but the non-HEAD version of the code needs other adjustments to work with modern autoconf. However there are a couple other problems which I opened an upstream PR for already: jca02266/lha#18 * There is also a build issue. macports already has a fix for that: macports/macports-ports#9197 However the simplest thing to do for the moment is to just disable the warning via $CFLAGS which allows the code to build as-is
There are actually two separate problems that got triggered by Xcode 12's decision to make -Werror,-Wimplicit-function-declaration the default: * The configure script has problems. Some of these can be fixed with an autoreconf run, but the non-HEAD version of the code needs other adjustments to work with modern autoconf. However there are a couple other problems which I opened an upstream PR for already: jca02266/lha#18 * There is also a build issue. macports already has a fix for that: macports/macports-ports#9197 However the simplest thing to do for the moment is to just disable the warning via $CFLAGS which allows the code to build as-is Closes #66361. Signed-off-by: FX Coudert <fxcoudert@gmail.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
Should upstream still consider adding private function declarations, for those not using (lib)iconv? |
macOS includes iconv as far back as Mac OS X 10.6, probably earlier, so I suspect the fallback code that uses private macOS functions will only be used on ancient OS versions. The code was added in June 2002. At that time Mac OS X 10.1 was the most recent version. Maybe it did not include iconv. When the code was originally added in jca02266/lha@4ccf94a, it did include the prototypes of the private functions. The prototypes were removed in jca02266/lha@0b2a218 in July 2002 but the commit message doesn't really explain why. You could suggest that they re-add them. |
The only reason I can think of to stick with private OS/X-specific APIs for converting filenames is if they help somehow with HFS's use of NFD-normalized unicode... although I don't know if those APIs do anything special in that regard (and it's thankfully disappearing from the world anyway since APFS stores non-normalized UTF-8 filenames like a normal UNIX fllesystem, albeit one that's case-insensitive by default) If it's just doing basic UTF-8 <-> UTF-16 conversion you'd be better off just sticking with iconv I would say. |
Fixes: https://trac.macports.org/ticket/61535
Description
Not sure whether this is the best way to accommodate private API usage.
Tested on
macOS 10.15.7
Xcode 12.2 command line tools
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?