which carthage: /usr/local/bin/carthagecarthage version: 0.29.0xcodebuild -version: Xcode 10.0, Build version 10L176w--no-build? no--no-use-binaries? no--use-submodules? no--cache-builds? yes--new-resolver? noActual outcome
When building in Xcode 10, the Copy Frameworks script phase fails with the error:
Environment variable not set:
EXPANDED_CODE_SIGN_IDENTITY
Expected outcome
Carthage should be able to find the EXPANDED_CODE_SIGN_IDENTITY environment variable but it isn't being set by xcodebuild.
I just hit this very issue trying to compile tests for PMHTTP.
Full set of environment variables provided to the shell script
export ACTION=build
export ALTERNATE_GROUP=staff
export ALTERNATE_MODE=u+w,go-w,a+rX
export ALTERNATE_OWNER=eridius
export ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
export ALWAYS_SEARCH_USER_PATHS=NO
export ALWAYS_USE_SEPARATE_HEADERMAPS=NO
export APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer
export APPLE_INTERNAL_DIR=/AppleInternal
export APPLE_INTERNAL_DOCUMENTATION_DIR=/AppleInternal/Documentation
export APPLE_INTERNAL_LIBRARY_DIR=/AppleInternal/Library
export APPLE_INTERNAL_TOOLS=/AppleInternal/Developer/Tools
export APPLICATION_EXTENSION_API_ONLY=NO
export APPLY_RULES_IN_COPY_FILES=NO
export ARCHS=x86_64
export ARCHS_STANDARD=x86_64
export ARCHS_STANDARD_32_64_BIT="x86_64 i386"
export ARCHS_STANDARD_32_BIT=i386
export ARCHS_STANDARD_64_BIT=x86_64
export ARCHS_STANDARD_INCLUDING_64_BIT=x86_64
export AVAILABLE_PLATFORMS="appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator"
export BITCODE_GENERATION_MODE=marker
export BUILD_ACTIVE_RESOURCES_ONLY=NO
export BUILD_COMPONENTS="headers build"
export BUILD_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products
export BUILD_ROOT=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products
export BUILD_STYLE=
export BUILD_VARIANTS=normal
export BUILT_PRODUCTS_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug
export CACHE_ROOT=/var/folders/bg/mvwkzdvx2gj0ymqcd_8_4vp00000gn/C/com.apple.DeveloperTools/10.0-10L176w/Xcode
export CARTHAGE=/opt/local/bin/carthage
export CCHROOT=/var/folders/bg/mvwkzdvx2gj0ymqcd_8_4vp00000gn/C/com.apple.DeveloperTools/10.0-10L176w/Xcode
export CHMOD=/bin/chmod
export CHOWN=/usr/sbin/chown
export CLANG_CXX_LANGUAGE_STANDARD=gnu++0x
export CLANG_CXX_LIBRARY=libc++
export CLANG_ENABLE_MODULES=YES
export CLANG_ENABLE_OBJC_ARC=YES
export CLANG_MODULES_BUILD_SESSION_FILE=/Users/eridius/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation
export CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING=YES
export CLANG_WARN_BOOL_CONVERSION=YES
export CLANG_WARN_COMMA=YES
export CLANG_WARN_CONSTANT_CONVERSION=YES
export CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS=YES
export CLANG_WARN_DIRECT_OBJC_ISA_USAGE=YES_ERROR
export CLANG_WARN_EMPTY_BODY=YES
export CLANG_WARN_ENUM_CONVERSION=YES
export CLANG_WARN_INFINITE_RECURSION=YES
export CLANG_WARN_INT_CONVERSION=YES
export CLANG_WARN_NON_LITERAL_NULL_CONVERSION=YES
export CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF=YES
export CLANG_WARN_OBJC_LITERAL_CONVERSION=YES
export CLANG_WARN_OBJC_ROOT_CLASS=YES_ERROR
export CLANG_WARN_RANGE_LOOP_ANALYSIS=YES
export CLANG_WARN_STRICT_PROTOTYPES=YES
export CLANG_WARN_SUSPICIOUS_MOVE=YES
export CLANG_WARN_UNREACHABLE_CODE=YES
export CLANG_WARN__DUPLICATE_METHOD_MATCH=YES
export CLASS_FILE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/JavaClasses
export CLEAN_PRECOMPS=YES
export CLONE_HEADERS=NO
export CODESIGNING_FOLDER_PATH=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug/PMHTTPTests.xctest
export CODE_SIGNING_ALLOWED=YES
export CODE_SIGN_INJECT_BASE_ENTITLEMENTS=YES
export COLOR_DIAGNOSTICS=NO
export COMBINE_HIDPI_IMAGES=YES
export COMPILER_INDEX_STORE_ENABLE=Default
export COMPOSITE_SDK_DIRS=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/CompositeSDKs
export COMPRESS_PNG_FILES=NO
export CONFIGURATION=Debug
export CONFIGURATION_BUILD_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug
export CONFIGURATION_TEMP_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug
export CONTENTS_FOLDER_PATH=PMHTTPTests.xctest/Contents
export COPYING_PRESERVES_HFS_DATA=NO
export COPY_HEADERS_RUN_UNIFDEF=NO
export COPY_PHASE_STRIP=NO
export COPY_RESOURCES_FROM_STATIC_FRAMEWORKS=YES
export CP=/bin/cp
export CREATE_INFOPLIST_SECTION_IN_BINARY=NO
export CURRENT_ARCH=undefined_arch
export CURRENT_PROJECT_VERSION=1
export CURRENT_VARIANT=normal
export DEAD_CODE_STRIPPING=NO
export DEBUGGING_SYMBOLS=YES
export DEBUG_INFORMATION_FORMAT=dwarf
export DEFAULT_COMPILER=com.apple.compilers.llvm.clang.1_0
export DEFAULT_KEXT_INSTALL_PATH=/System/Library/Extensions
export DEFINES_MODULE=NO
export DEPLOYMENT_LOCATION=NO
export DEPLOYMENT_POSTPROCESSING=NO
export DEPLOYMENT_TARGET_CLANG_ENV_NAME=MACOSX_DEPLOYMENT_TARGET
export DEPLOYMENT_TARGET_CLANG_FLAG_NAME=mmacosx-version-min
export DEPLOYMENT_TARGET_LD_ENV_NAME=MACOSX_DEPLOYMENT_TARGET
export DEPLOYMENT_TARGET_LD_FLAG_NAME=macosx_version_min
export DEPLOYMENT_TARGET_SETTING_NAME=MACOSX_DEPLOYMENT_TARGET
export DEPLOYMENT_TARGET_SUGGESTED_VALUES="10.6 10.7 10.8 10.9 10.10 10.11 10.12 10.13 10.14"
export DERIVED_FILES_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/DerivedSources
export DERIVED_FILE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/DerivedSources
export DERIVED_SOURCES_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/DerivedSources
export DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode-beta.app/Contents/Developer/Applications
export DEVELOPER_BIN_DIR=/Applications/Xcode-beta.app/Contents/Developer/usr/bin
export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer
export DEVELOPER_FRAMEWORKS_DIR=/Applications/Xcode-beta.app/Contents/Developer/Library/Frameworks
export DEVELOPER_FRAMEWORKS_DIR_QUOTED=/Applications/Xcode-beta.app/Contents/Developer/Library/Frameworks
export DEVELOPER_LIBRARY_DIR=/Applications/Xcode-beta.app/Contents/Developer/Library
export DEVELOPER_SDK_DIR=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
export DEVELOPER_TOOLS_DIR=/Applications/Xcode-beta.app/Contents/Developer/Tools
export DEVELOPER_USR_DIR=/Applications/Xcode-beta.app/Contents/Developer/usr
export DEVELOPMENT_LANGUAGE=English
export DOCUMENTATION_FOLDER_PATH=PMHTTPTests.xctest/Contents/Resources/English.lproj/Documentation
export DO_HEADER_SCANNING_IN_JAM=NO
export DSTROOT=/tmp/PMHTTP.dst
export DT_TOOLCHAIN_DIR=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export DWARF_DSYM_FILE_NAME=PMHTTPTests.xctest.dSYM
export DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT=NO
export DWARF_DSYM_FOLDER_PATH=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug
export EMBEDDED_CONTENT_CONTAINS_SWIFT=NO
export EMBEDDED_PROFILE_NAME=embedded.provisionprofile
export EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE=NO
export ENABLE_BITCODE=NO
export ENABLE_DEFAULT_HEADER_SEARCH_PATHS=YES
export ENABLE_HEADER_DEPENDENCIES=YES
export ENABLE_ON_DEMAND_RESOURCES=NO
export ENABLE_STRICT_OBJC_MSGSEND=YES
export ENABLE_TESTABILITY=YES
export EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS=".DS_Store .svn .git .hg CVS"
export EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES="*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
export EXECUTABLES_FOLDER_PATH=PMHTTPTests.xctest/Contents/Executables
export EXECUTABLE_FOLDER_PATH=PMHTTPTests.xctest/Contents/MacOS
export EXECUTABLE_NAME=PMHTTPTests
export EXECUTABLE_PATH=PMHTTPTests.xctest/Contents/MacOS/PMHTTPTests
export FILE_LIST=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/Objects/LinkFileList
export FIXED_FILES_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/FixedFiles
export FRAMEWORKS_FOLDER_PATH=PMHTTPTests.xctest/Contents/Frameworks
export FRAMEWORK_FLAG_PREFIX=-framework
export FRAMEWORK_SEARCH_PATHS="/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug /Users/eridius/Dev/PMHTTP/Carthage/Build/Mac/ "
export FRAMEWORK_VERSION=A
export FULL_PRODUCT_NAME=PMHTTPTests.xctest
export GCC3_VERSION=3.3
export GCC_C_LANGUAGE_STANDARD=gnu99
export GCC_DYNAMIC_NO_PIC=NO
export GCC_INLINES_ARE_PRIVATE_EXTERN=YES
export GCC_NO_COMMON_BLOCKS=YES
export GCC_OPTIMIZATION_LEVEL=0
export GCC_PFE_FILE_C_DIALECTS="c objective-c c++ objective-c++"
export GCC_PREPROCESSOR_DEFINITIONS="DEBUG=1 "
export GCC_TREAT_WARNINGS_AS_ERRORS=NO
export GCC_VERSION=com.apple.compilers.llvm.clang.1_0
export GCC_VERSION_IDENTIFIER=com_apple_compilers_llvm_clang_1_0
export GCC_WARN_64_TO_32_BIT_CONVERSION=YES
export GCC_WARN_ABOUT_RETURN_TYPE=YES_ERROR
export GCC_WARN_UNDECLARED_SELECTOR=YES
export GCC_WARN_UNINITIALIZED_AUTOS=YES_AGGRESSIVE
export GCC_WARN_UNUSED_FUNCTION=YES
export GCC_WARN_UNUSED_VARIABLE=YES
export GENERATE_MASTER_OBJECT_FILE=NO
export GENERATE_PKGINFO_FILE=NO
export GENERATE_PROFILING_CODE=NO
export GENERATE_TEXT_BASED_STUBS=NO
export GID=20
export GROUP=staff
export HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT=YES
export HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES=YES
export HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS=YES
export HEADERMAP_INCLUDES_PROJECT_HEADERS=YES
export HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES=YES
export HEADERMAP_USES_VFS=NO
export HEADER_SEARCH_PATHS="/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug/include "
export HIDE_BITCODE_SYMBOLS=YES
export HOME=/Users/eridius
export ICONV=/usr/bin/iconv
export INFOPLIST_EXPAND_BUILD_SETTINGS=YES
export INFOPLIST_FILE=Tests/Info.plist
export INFOPLIST_OUTPUT_FORMAT=same-as-input
export INFOPLIST_PATH=PMHTTPTests.xctest/Contents/Info.plist
export INFOPLIST_PREPROCESS=NO
export INFOSTRINGS_PATH=PMHTTPTests.xctest/Contents/Resources/English.lproj/InfoPlist.strings
export INLINE_PRIVATE_FRAMEWORKS=NO
export INSTALLHDRS_COPY_PHASE=NO
export INSTALLHDRS_SCRIPT_PHASE=NO
export INSTALL_DIR=/tmp/PMHTTP.dst
export INSTALL_GROUP=staff
export INSTALL_MODE_FLAG=u+w,go-w,a+rX
export INSTALL_OWNER=eridius
export INSTALL_ROOT=/tmp/PMHTTP.dst
export JAVAC_DEFAULT_FLAGS="-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8"
export JAVA_APP_STUB=/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
export JAVA_ARCHIVE_CLASSES=YES
export JAVA_ARCHIVE_TYPE=JAR
export JAVA_COMPILER=/usr/bin/javac
export JAVA_FOLDER_PATH=PMHTTPTests.xctest/Contents/Resources/Java
export JAVA_FRAMEWORK_RESOURCES_DIRS=Resources
export JAVA_JAR_FLAGS=cv
export JAVA_SOURCE_SUBDIR=.
export JAVA_USE_DEPENDENCIES=YES
export JAVA_ZIP_FLAGS=-urg
export JIKES_DEFAULT_FLAGS="+E +OLDCSO"
export KASAN_DEFAULT_CFLAGS="-DKASAN=1 -fsanitize=address -mllvm -asan-globals-live-support -mllvm -asan-force-dynamic-shadow"
export KEEP_PRIVATE_EXTERNS=NO
export LD_DEPENDENCY_INFO_FILE=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/Objects-normal/undefined_arch/PMHTTPTests_dependency_info.dat
export LD_GENERATE_MAP_FILE=NO
export LD_MAP_FILE_PATH=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/PMHTTPTests-LinkMap-normal-undefined_arch.txt
export LD_NO_PIE=NO
export LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER=YES
export LD_RUNPATH_SEARCH_PATHS=" @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks"
export LEGACY_DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
export LEX=lex
export LIBRARY_FLAG_NOSPACE=YES
export LIBRARY_FLAG_PREFIX=-l
export LIBRARY_KEXT_INSTALL_PATH=/Library/Extensions
export LIBRARY_SEARCH_PATHS="/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug "
export LINKER_DISPLAYS_MANGLED_NAMES=NO
export LINK_FILE_LIST_normal_x86_64=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/Objects-normal/x86_64/PMHTTPTests.LinkFileList
export LINK_WITH_STANDARD_LIBRARIES=YES
export LOCALIZED_RESOURCES_FOLDER_PATH=PMHTTPTests.xctest/Contents/Resources/English.lproj
export LOCALIZED_STRING_MACRO_NAMES="NSLocalizedString CFLocalizedString"
export LOCAL_ADMIN_APPS_DIR=/Applications/Utilities
export LOCAL_APPS_DIR=/Applications
export LOCAL_DEVELOPER_DIR=/Library/Developer
export LOCAL_LIBRARY_DIR=/Library
export LOCROOT=/Users/eridius/Dev/PMHTTP
export LOCSYMROOT=/Users/eridius/Dev/PMHTTP
export MACH_O_TYPE=mh_bundle
export MACOSX_DEPLOYMENT_TARGET=10.10
export MAC_OS_X_PRODUCT_BUILD_VERSION=17F77
export MAC_OS_X_VERSION_ACTUAL=101305
export MAC_OS_X_VERSION_MAJOR=101300
export MAC_OS_X_VERSION_MINOR=1305
export METAL_LIBRARY_FILE_BASE=default
export METAL_LIBRARY_OUTPUT_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug/PMHTTPTests.xctest/Contents/Resources
export MODULE_CACHE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
export MTL_ENABLE_DEBUG_INFO=YES
export NATIVE_ARCH=i386
export NATIVE_ARCH_32_BIT=i386
export NATIVE_ARCH_64_BIT=x86_64
export NATIVE_ARCH_ACTUAL=x86_64
export NO_COMMON=YES
export OBJECT_FILE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/Objects
export OBJECT_FILE_DIR_normal=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/Objects-normal
export OBJROOT=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex
export ONLY_ACTIVE_ARCH=YES
export OS=MACOS
export OSAC=/usr/bin/osacompile
export PACKAGE_TYPE=com.apple.package-type.bundle.unit-test
export PASCAL_STRINGS=YES
export PATH=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/usr/local/bin:/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
export PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES="/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode-beta.app/Contents/Developer/Headers /Applications/Xcode-beta.app/Contents/Developer/SDKs /Applications/Xcode-beta.app/Contents/Developer/Platforms"
export PBDEVELOPMENTPLIST_PATH=PMHTTPTests.xctest/Contents/pbdevelopment.plist
export PER_ARCH_OBJECT_FILE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/Objects-normal/undefined_arch
export PER_VARIANT_OBJECT_FILE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/Objects-normal
export PKGINFO_FILE_PATH=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/PkgInfo
export PKGINFO_PATH=PMHTTPTests.xctest/Contents/PkgInfo
export PLATFORM_DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode-beta.app/Contents/Developer/Applications
export PLATFORM_DEVELOPER_BIN_DIR=/Applications/Xcode-beta.app/Contents/Developer/usr/bin
export PLATFORM_DEVELOPER_LIBRARY_DIR=/Applications/Xcode-beta.app/Contents/Developer/Library
export PLATFORM_DEVELOPER_SDK_DIR=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
export PLATFORM_DEVELOPER_TOOLS_DIR=/Applications/Xcode-beta.app/Contents/Developer/Tools
export PLATFORM_DEVELOPER_USR_DIR=/Applications/Xcode-beta.app/Contents/Developer/usr
export PLATFORM_DIR=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform
export PLATFORM_DISPLAY_NAME=macOS
export PLATFORM_NAME=macosx
export PLATFORM_PREFERRED_ARCH=x86_64
export PLATFORM_PRODUCT_BUILD_VERSION=10L176w
export PLIST_FILE_OUTPUT_FORMAT=same-as-input
export PLUGINS_FOLDER_PATH=PMHTTPTests.xctest/Contents/PlugIns
export PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR=YES
export PRECOMP_DESTINATION_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/PrefixHeaders
export PRESERVE_DEAD_CODE_INITS_AND_TERMS=NO
export PRIVATE_HEADERS_FOLDER_PATH=PMHTTPTests.xctest/Contents/PrivateHeaders
export PRODUCT_BUNDLE_IDENTIFIER=com.postmates.PMHTTPTests
export PRODUCT_MODULE_NAME=PMHTTPTests
export PRODUCT_NAME=PMHTTPTests
export PRODUCT_SETTINGS_PATH=/Users/eridius/Dev/PMHTTP/Tests/Info.plist
export PRODUCT_SPECIFIC_LDFLAGS="-framework XCTest"
export PRODUCT_TYPE=com.apple.product-type.bundle.unit-test
export PRODUCT_TYPE_FRAMEWORK_SEARCH_PATHS=" /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks"
export PROFILING_CODE=NO
export PROJECT=PMHTTP
export PROJECT_DERIVED_FILE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/DerivedSources
export PROJECT_DIR=/Users/eridius/Dev/PMHTTP
export PROJECT_FILE_PATH=/Users/eridius/Dev/PMHTTP/PMHTTP.xcodeproj
export PROJECT_NAME=PMHTTP
export PROJECT_TEMP_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build
export PROJECT_TEMP_ROOT=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex
export PUBLIC_HEADERS_FOLDER_PATH=PMHTTPTests.xctest/Contents/Headers
export RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS=YES
export REMOVE_CVS_FROM_RESOURCES=YES
export REMOVE_GIT_FROM_RESOURCES=YES
export REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES=YES
export REMOVE_HG_FROM_RESOURCES=YES
export REMOVE_SVN_FROM_RESOURCES=YES
export REZ_COLLECTOR_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/ResourceManagerResources
export REZ_OBJECTS_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build/ResourceManagerResources/Objects
export REZ_SEARCH_PATHS="/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug "
export SCAN_ALL_SOURCE_FILES_FOR_INCLUDES=NO
export SCRIPTS_FOLDER_PATH=PMHTTPTests.xctest/Contents/Resources/Scripts
export SCRIPT_INPUT_FILE_0=/Users/eridius/Dev/PMHTTP/PMJSON
export SCRIPT_INPUT_FILE_1=/Users/eridius/Dev/PMHTTP/CocoaAsyncSocket
export SCRIPT_INPUT_FILE_COUNT=2
export SCRIPT_INPUT_FILE_LIST_COUNT=0
export SCRIPT_OUTPUT_FILE_COUNT=0
export SCRIPT_OUTPUT_FILE_LIST_COUNT=0
export SDKROOT=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
export SDK_DIR=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
export SDK_DIR_macosx10_14=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
export SDK_NAME=macosx10.14
export SDK_NAMES=macosx10.14
export SDK_PRODUCT_BUILD_VERSION=18A293s
export SDK_VERSION=10.14
export SDK_VERSION_ACTUAL=101400
export SDK_VERSION_MAJOR=101400
export SDK_VERSION_MINOR=1400
export SED=/usr/bin/sed
export SEPARATE_STRIP=NO
export SEPARATE_SYMBOL_EDIT=NO
export SET_DIR_MODE_OWNER_GROUP=YES
export SET_FILE_MODE_OWNER_GROUP=NO
export SHALLOW_BUNDLE=NO
export SHARED_DERIVED_FILE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug/DerivedSources
export SHARED_FRAMEWORKS_FOLDER_PATH=PMHTTPTests.xctest/Contents/SharedFrameworks
export SHARED_PRECOMPS_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PrecompiledHeaders
export SHARED_SUPPORT_FOLDER_PATH=PMHTTPTests.xctest/Contents/SharedSupport
export SKIP_INSTALL=YES
export SOURCE_ROOT=/Users/eridius/Dev/PMHTTP
export SRCROOT=/Users/eridius/Dev/PMHTTP
export STRINGS_FILE_OUTPUT_ENCODING=UTF-16
export STRIP_BITCODE_FROM_COPIED_FILES=NO
export STRIP_INSTALLED_PRODUCT=YES
export STRIP_PNG_TEXT=NO
export STRIP_STYLE=non-global
export STRIP_SWIFT_SYMBOLS=YES
export SUPPORTED_PLATFORMS="iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos macosx"
export SUPPORTS_TEXT_BASED_API=NO
export SWIFT_COMPILATION_MODE=singlefile
export SWIFT_OPTIMIZATION_LEVEL=-Onone
export SWIFT_PLATFORM_TARGET_PREFIX=macosx
export SWIFT_VERSION=4.0
export SYMROOT=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products
export SYSTEM_ADMIN_APPS_DIR=/Applications/Utilities
export SYSTEM_APPS_DIR=/Applications
export SYSTEM_CORE_SERVICES_DIR=/System/Library/CoreServices
export SYSTEM_DEMOS_DIR=/Applications/Extras
export SYSTEM_DEVELOPER_APPS_DIR=/Applications/Xcode-beta.app/Contents/Developer/Applications
export SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode-beta.app/Contents/Developer/usr/bin
export SYSTEM_DEVELOPER_DEMOS_DIR="/Applications/Xcode-beta.app/Contents/Developer/Applications/Utilities/Built Examples"
export SYSTEM_DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer
export SYSTEM_DEVELOPER_DOC_DIR="/Applications/Xcode-beta.app/Contents/Developer/ADC Reference Library"
export SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR="/Applications/Xcode-beta.app/Contents/Developer/Applications/Graphics Tools"
export SYSTEM_DEVELOPER_JAVA_TOOLS_DIR="/Applications/Xcode-beta.app/Contents/Developer/Applications/Java Tools"
export SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR="/Applications/Xcode-beta.app/Contents/Developer/Applications/Performance Tools"
export SYSTEM_DEVELOPER_RELEASENOTES_DIR="/Applications/Xcode-beta.app/Contents/Developer/ADC Reference Library/releasenotes"
export SYSTEM_DEVELOPER_TOOLS=/Applications/Xcode-beta.app/Contents/Developer/Tools
export SYSTEM_DEVELOPER_TOOLS_DOC_DIR="/Applications/Xcode-beta.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools"
export SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR="/Applications/Xcode-beta.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools"
export SYSTEM_DEVELOPER_USR_DIR=/Applications/Xcode-beta.app/Contents/Developer/usr
export SYSTEM_DEVELOPER_UTILITIES_DIR=/Applications/Xcode-beta.app/Contents/Developer/Applications/Utilities
export SYSTEM_DOCUMENTATION_DIR=/Library/Documentation
export SYSTEM_KEXT_INSTALL_PATH=/System/Library/Extensions
export SYSTEM_LIBRARY_DIR=/System/Library
export TAPI_VERIFY_MODE=ErrorsOnly
export TARGETED_DEVICE_FAMILY=1,2,3,4
export TARGETNAME=PMHTTPTests
export TARGET_BUILD_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Products/Debug
export TARGET_NAME=PMHTTPTests
export TARGET_TEMP_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build
export TEMP_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build
export TEMP_FILES_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build
export TEMP_FILE_DIR=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex/PMHTTP.build/Debug/PMHTTPTests.build
export TEMP_ROOT=/Users/eridius/Library/Developer/Xcode/DerivedData/PMHTTP-geyaepqhzubesigkrzsytdfljvoa/Build/Intermediates.noindex
export TEST_FRAMEWORK_SEARCH_PATHS=" /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks"
export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault
export TOOLCHAIN_DIR=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO
export UID=501
export UNLOCALIZED_RESOURCES_FOLDER_PATH=PMHTTPTests.xctest/Contents/Resources
export UNSTRIPPED_PRODUCT=NO
export USER=eridius
export USER_APPS_DIR=/Users/eridius/Applications
export USER_LIBRARY_DIR=/Users/eridius/Library
export USE_DYNAMIC_NO_PIC=YES
export USE_HEADERMAP=YES
export USE_HEADER_SYMLINKS=NO
export VALIDATE_PRODUCT=NO
export VALID_ARCHS="i386 x86_64"
export VERBOSE_PBXCP=NO
export VERSIONING_SYSTEM=apple-generic
export VERSIONPLIST_PATH=PMHTTPTests.xctest/Contents/version.plist
export VERSION_INFO_BUILDER=eridius
export VERSION_INFO_FILE=PMHTTPTests_vers.c
export VERSION_INFO_STRING=""@(#)PROGRAM:PMHTTPTests PROJECT:PMHTTP-1""
export WRAPPER_EXTENSION=xctest
export WRAPPER_NAME=PMHTTPTests.xctest
export WRAPPER_SUFFIX=.xctest
export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO
export XCODE_APP_SUPPORT_DIR=/Applications/Xcode-beta.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION=10L176w
export XCODE_VERSION_ACTUAL=1000
export XCODE_VERSION_MAJOR=1000
export XCODE_VERSION_MINOR=1000
export XPCSERVICES_FOLDER_PATH=PMHTTPTests.xctest/Contents/XPCServices
export YACC=yacc
export _WRAPPER_CONTENTS_DIR=/Contents
export _WRAPPER_PARENT_PATH=/..
export _WRAPPER_RESOURCES_DIR=/Resources
export arch=undefined_arch
export variant=normal
This happens when compiling for macOS. Compiling for iOS Simulator worked just fine.
I definitely have the correct identities on my build machine, running security find-identity -p codesigning confirms that.
It appears the change here is Xcode 10 simply omits environment variables that otherwise were set to empty strings. Building the same target (for macOS) in Xcode 9.4 includes
export EXPANDED_CODE_SIGN_IDENTITY=
export EXPANDED_CODE_SIGN_IDENTITY_NAME=
export EXPANDED_PROVISIONING_PROFILE=
I just realized that same thing: previously they were all empty strings. Xcode 10 must be stripping them then.
I'm not super familiar with all of Carthage's flags so I'm not sure if this would be a breaking change, but does anyone know if an optional check for the environment variable would be okay? It sure seems like it would be given the code that throws the error.
It sure appears as though the issue is getEnvironmentVariable requires the variable to exist. If there's a variant that accepts nil variables then using it should be sufficient (well, and using flatMap instead of map).
I'm going to submit a PR with an updated getEnvironmentVariable to work around the issue temporarily. I'll let you know when the fork is up @kballard.
@kballard āļø
I just added some notes as to why I went with that solution, we can discuss code-specific stuff on the PR. But I think the conversation as to why this is happening should stay on the issue.
Hello,
I opened a Radar for this, please dupe it.
https://bugreport.apple.com/web/?problemID=40843445
http://www.openradar.me/radar?id=4981376604438528
Until we hear that this is intentional as @jdhealy suggested try with
EXPANDED_CODE_SIGN_IDENTITY='' carthage copy-frameworks
Not setting blank environment variables seems like a perfectly fine build system change IMO. Any build script that's fine with the variable being blank should have been accepting it not being set anyway. This change certainly should slim down the build log for shell script phases that log environment variables.
Any build script that's fine with the variable being blank should have been accepting it not being set anyway.
Apparently Carthage is not fine with that and did output a meaningful error.
I am fine with the change but we're just waiting to know if the change in xcodebuild is intentional or not.
Does this work for now: EXPANDED_CODE_SIGN_IDENTITY='' carthage copy-frameworks ?
@blender duped.
Updating the script in Build Phases to EXPANDED_CODE_SIGN_IDENTITY='' carthage copy-frameworks did work š
Until we hear back from Apple that it's an intentional change, that's a perfectly acceptable workaround. I'll try to get someone attending WWDC to ask one of the Xcode engineers during a lab.
Even if it was unintentional, Carthage shouldnāt be requiring the blank variable to exist because clearly Xcode doesnāt guarantee that itās always set (they obviously have no unit tests to ensure itās set and no internal projects that rely on it being set). The old behavior of always setting it may have just been happenstance.
Even if Xcode does change course here, thereās simply no need for Carthage to be strict here.
@kballard I'm with you. See my review on the PR.
@kballard For users calling carthage copy-frameworks outside of Xcode (admittedly, a small fraction), that error is worthwhile in being a signpost in whatās necessary to add to achieve (for what most is the goal) of ensuring that code signing happens.
Within the scope off an Xcode build script phase, I agree with you, thereās not much utility in being strict.
With that in mind, we could consider modifying the the PR to check XCODE_PRODUCT_BUILD_VERSION in one of two ways:
EXPANDED_CODE_SIGN_IDENTITY not being setThe only other scenario I could think of (not even worth considering, honestly) is if EXPANDED_CODE_SIGN_IDENTITY gets accidentally unset by a line in the script phase (but, yeah, I see virtually zero chance of this accident actually occurring in practice).
@jdhealy If you want to warn people about invoking copy-frameworks outside of Xcode, then I'd look for some variable that Xcode is guaranteed to set and use that as a signal for "are we being invoked by Xcode?" If that variable is omitted, then you can check for and warn about other missing variables too. If that variable is present, then treat missing variables the same as if they're simply blank.
Which is to say, I would not maintain a map of "what Xcode versions omit variables?" because that simply doesn't matter.
The scenario of someone deleting EXPANDED_CODE_SIGN_IDENTITY in a shell script phase is very unlikely to ever come up, and if it does, Carthage should respect the developer's wishes.
@kballard yeah, I think alike. Thatās āway twoā of checking XCODE_PRODUCT_BUILD_VERSION (checking if itās set to anything) and what I implemented in #2476.
FYI Response from Apple https://bugreport.apple.com/web/?problemID=40843445
We have determined that this is an issue for you to resolve.
Thereās no difference between an empty and unset environment variable; the code shouldnāt depend on the build system to log empty/unset variables.
Please let us know whether the issue is resolved for you by updating your bug report
Given that, I think we should treat unset environment variables as an empty string.
Callers should be responsible for erroring they're missing an environment variable that they require.
What do you think, @jdhealy?
FYI the report is not closed. I argued a little and they are evaluating
Issue now closed.
This issue behaves as intended based on the following:
Each shell can handle the notion of set/unset differently, so relying on that behavior is not stable. In nearly all cases, the evaluation of $MY_VAR is identical whether the var is empty or unset. Also, it looks like Carthage is already making the appropriate change.
We are now closing this bug report.
If you have questions about the resolution, or if this is still a critical issue for you, then please update your bug report with that information.
Please be sure to regularly check new Apple releases for any updates that might affect this issue.
Given that, I think we should treat unset environment variables as an empty string.
For the majority case, an unset environment variable (either ātruly unsetā or "" ā unset coalescing by Xcode) should error ā especially for paths like FRAMEWORKS_FOLDER_PATH.
Only select cases (like EXPANDED_CODE_SIGN_IDENTITY) would have "" as an appropriate fallback for unset.
The case where "" is coalesced into unset by Xcode is the minority case.
@jdhealy @kballard @clayellis Please confirm we're going with this one: https://github.com/Carthage/Carthage/pull/2476 and I'll merge
@blender Looks good to me š
Fixed by #2476.
Most helpful comment
FYI Response from Apple https://bugreport.apple.com/web/?problemID=40843445