On Sun, Mar 21, 2021 at 6:41 AM Jeffrey Walton <[email protected]> wrote: > > Hi Everyone/Tim, > > I've been testing iOS cross-compiles. It looks like Wget2 is having > trouble with arm64: > > $ echo $CPPFLAGS > -DNDEBUG -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk > > $ echo $CFLAGS > -Wall -g2 -O3 -fPIC -arch arm64 -miphoneos-version-min=6 --sysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk > > $ echo $CXXFLAGS > -Wall -g2 -O3 -fPIC -arch arm64 -miphoneos-version-min=6 > -stdlib=libc++ --sysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk > > $ echo $LDFLAGS > > $ command -v cpp > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cpp > > $ cat config.log > ... > configure:6438: checking how to run the C preprocessor > configure:6508: result: cpp > configure:6528: cpp -DNDEBUG -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk > conftest.c > clang: error: no input files > configure:6528: $? = 1 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "wget2" > | #define PACKAGE_TARNAME "wget2" > | #define PACKAGE_VERSION "1.99.2" > | #define PACKAGE_STRING "wget2 1.99.2" > | #define PACKAGE_BUGREPORT "[email protected]" > | #define PACKAGE_URL "https://savannah.gnu.org/projects/wget" > | #define PACKAGE "wget2" > | #define VERSION "1.99.2" > | /* end confdefs.h. */ > | #ifdef __STDC__ > | # include <limits.h> > | #else > | # include <assert.h> > | #endif > | Syntax error > configure:6528: cpp -DNDEBUG -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk > conftest.c > clang: error: no input files > configure:6528: $? = 1 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "wget2" > | #define PACKAGE_TARNAME "wget2" > | #define PACKAGE_VERSION "1.99.2" > | #define PACKAGE_STRING "wget2 1.99.2" > | #define PACKAGE_BUGREPORT "[email protected]" > | #define PACKAGE_URL "https://savannah.gnu.org/projects/wget" > | #define PACKAGE "wget2" > | #define VERSION "1.99.2" > | /* end confdefs.h. */ > | #ifdef __STDC__ > | # include <limits.h> > | #else > | # include <assert.h> > | #endif > | Syntax error > configure:6558: error: in `/Users/jwalton/wget2-1.99.2': > configure:6560: error: C preprocessor "cpp" fails sanity check > See `config.log' for more details
Thanks Tim and Ryan. It looks like this is an Autotools problem. Autotools should test if ccp works as expected, and avoid cpp if it does not. Autotools should not break the build. Perl works around Apple's cpp: https://github.com/Perl/perl5/blob/blead/hints/darwin.sh#L131. Jeff
