Hello Community,
My team uses Jenkins running on an Intel Mac to run our UI Automation scheme for an iOS app. We’ve been using Jenkins successfully for a few years but have run into a new failure that only occurs on a single branch and only in the Jenkins context. I am able to build directly in Xcode and from the command line, both locally on the Jenkins server. Our Bitrise pipelines (running on M1 machines) also all succeed. I’m not sure how useful this error will be and I’ll share anyway, there isn’t any more information above or below in the log that is immediately helpful:
▸ Linking Common
ld: unknown file type in ‘/Users/jenkins/…/DerivedData/Unified/Build/Products/Debug-Test-iphonesimulator/heresdk.framework/heresdk’
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Our app consists of a workspace containing two projects, Common and Unified, and a Pods project. We were using Cocoapods for third-party SDKs (no more pods with this branch but leaving integration as-is for now to simplify CI workflows). The Unified project contains the target used to build the app. All our third-party SDKs are now added through Swift Package Manager with the exception of HERE Maps’ heresdk, Explorer Edition, installed manually (there is no support for installation via a package manager). It is this last framework where our build is failing.
The build portion of the job configuration is an Execute Shell with the following script
#!/bin/bash -l
export PATH="/usr/local/bin:$PATH"
export RBENV_VERSION=3.0.0
export LANG=en_US.UTF-8
function convert_logs_to_junit() {
echo "Writing out JUNIT results"
mkdir -p DerivedData/reports
for log in `ls ./DerivedData/*.log`; do
logName=`basename $log`
logName="${logName%.log}.xml"
cat "$log" | xcpretty -r junit -o "./DerivedData/reports/$logName"
done
}
xcrun simctl shutdown all && xcrun simctl erase all
#make clean
echo "prepare DerivedData folder"
rm -rf DerivedData/Unified
rm -rf DerivedData/TestResults.xcresult
rm -rf DerivedData/TestResults
#new commands
echo "reset xcodebuild.* files"
rm -rf DerivedData/xcodebuild.log
rm -rf DerivedData/reports/xcodebuild.xml
touch DerivedData/xcodebuild.log
touch DerivedData/reports/xcodebuild.xml
echo "make setup"
make setup
wait
echo "make chicago"
make location-chicago-city
#set-simulator-location -c 41.8924171 -87.8682691
wait
echo "build!"
xcodebuild -workspace Unified.xcworkspace test -scheme 'UnifiedUITests' \
-configuration 'Debug-Test' \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 14 Pro Max,OS=latest' \
-resultBundlePath DerivedData/TestResults | tee DerivedData/xcodebuild.log
wait
# convert .log files to the JUNIT xml version
convert_logs_to_junit
wait
I’ve built locally on the server using a UITest makefile target and this Execute Shell script from a local copy.
I don’t know where to begin troubleshooting. Is there a way I can see what environment variables are in play when the Execute Shell script is run?
I’m using the systemInfo output since I don’t have access to the Script Console. If there is other info I can provide, please let me know. Our Jenkins server was set up by a teammate who is sadly no longer with us and the remaining team has very little Jenkins experience, the “we don’t know what what don’t know” bucket is quite large and overflowing.
I’ll be searching and experimenting while I await your suggestions. Thank you in advance!
Jim
Jenkins setup
System Properties
awt.toolkit sun.awt.X11.XToolkit
casc.reload.token jenkins-0
executable-war /usr/share/jenkins/jenkins.war
file.encoding UTF-8
file.separator /
hudson.lifecycle hudson.lifecycle.ExitLifecycle
java.awt.graphicsenv sun.awt.X11GraphicsEnvironment
java.awt.headless true
java.awt.printerjob sun.print.PSPrinterJob
java.class.path /usr/share/jenkins/jenkins.war
java.class.version 55.0
java.home /opt/java/openjdk
java.io.tmpdir /tmp
java.library.path /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
java.runtime.name OpenJDK Runtime Environment
java.runtime.version 11.0.15+10
java.specification.name Java Platform API Specification
java.specification.vendor Oracle Corporation
java.specification.version 11
java.vendor Eclipse Adoptium
java.vendor.url https//adoptium.net/
java.vendor.url.bug https//github.com/adoptium/adoptium-support/issues
java.vendor.version Temurin-11.0.15+10
java.version 11.0.15
java.version.date 2022-04-19
java.vm.compressedOopsMode 32-bit
java.vm.info mixed mode
java.vm.name OpenJDK 64-Bit Server VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Oracle Corporation
java.vm.specification.version 11
java.vm.vendor Eclipse Adoptium
java.vm.version 11.0.15+10
jdk.debug release
jenkins.model.Jenkins.slaveAgentPort 50000
jetty.git.hash 4a0c91c0be53805e3fcffdcdcc9587d5301863db
jna.loaded true
jna.platform.library.path /usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/lib64:/usr/lib:/lib
jnidispatch.path /var/jenkins_home/.cache/JNA/temp/jna17734469411492733629.tmp
line.separator
mail.smtp.sendpartial true
mail.smtps.sendpartial true
org.apache.xml.security.ignoreLineBreaks true
os.arch amd64
os.name Linux
os.version 5.15.128
path.separator :
sun.arch.data.model 64
sun.boot.library.path /opt/java/openjdk/lib
sun.cpu.endian little
sun.cpu.isalist
sun.font.fontmanager sun.awt.X11FontManager
sun.io.unicode.encoding UnicodeLittle
sun.java.command /usr/share/jenkins/jenkins.war --prefix=/jenkins --httpPort=8080
sun.java.launcher SUN_STANDARD
sun.jnu.encoding UTF-8
sun.management.compiler HotSpot 64-Bit Tiered Compilers
sun.os.patch.level unknown
user.dir /
user.home /var/jenkins_home
user.language en
user.name jenkins
user.timezone Etc/UTC
Environment Variables
CASC_JENKINS_CONFIG /var/jenkins_home/casc_configs
COPY_REFERENCE_FILE_LOG /var/jenkins_home/copy_reference_file.log
HOME /var/jenkins_home
HOSTNAME jenkins-0
JAVA_HOME /opt/java/openjdk
JAVA_OPTS -Dcasc.reload.token=jenkins-0
JENKINS_AGENT_PORT tcp://172.20.103.158:50000
JENKINS_AGENT_PORT_50000_TCP tcp://172.20.103.158:50000
JENKINS_AGENT_PORT_50000_TCP_ADDR 172.20.103.158
JENKINS_AGENT_PORT_50000_TCP_PORT 50000
JENKINS_AGENT_PORT_50000_TCP_PROTO tcp
JENKINS_AGENT_SERVICE_HOST 172.20.103.158
JENKINS_AGENT_SERVICE_PORT 50000
JENKINS_AGENT_SERVICE_PORT_AGENT_LISTENER 50000
JENKINS_HOME /var/jenkins_home
JENKINS_INCREMENTALS_REPO_MIRROR https//repo.jenkins-ci.org/incrementals
JENKINS_OPTS --prefix=/jenkins
JENKINS_PORT tcp://172.20.20.30:8080
JENKINS_PORT_8080_TCP tcp://172.20.20.30:8080
JENKINS_PORT_8080_TCP_ADDR 172.20.20.30
JENKINS_PORT_8080_TCP_PORT 8080
JENKINS_PORT_8080_TCP_PROTO tcp
JENKINS_SERVICE_HOST 172.20.20.30
JENKINS_SERVICE_PORT 8080
JENKINS_SERVICE_PORT_HTTP 8080
JENKINS_agent_AGENT_PORT 50000
JENKINS_UC https//updates.jenkins.io
JENKINS_UC_EXPERIMENTAL https//updates.jenkins.io/experimental
JENKINS_VERSION 2.344
KUBERNETES_PORT tcp://172.20.0.1:443
KUBERNETES_PORT_443_TCP tcp://172.20.0.1:443
KUBERNETES_PORT_443_TCP_ADDR 172.20.0.1
KUBERNETES_PORT_443_TCP_PORT 443
KUBERNETES_PORT_443_TCP_PROTO tcp
KUBERNETES_SERVICE_HOST 172.20.0.1
KUBERNETES_SERVICE_PORT 443
KUBERNETES_SERVICE_PORT_HTTPS 443
LANG C.UTF-8
PATH /opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
POD_NAME jenkins-0
PWD /
REF /usr/share/jenkins/ref
SECRETS /secrets/jenkins
SHLVL 0
Plugins
ace-editor 1.1 true
antisamy-markup-formatter 2.7 true
apache-httpcomponents-client-4-api 4.5.13-1.0 true
atlassian-bitbucket-server-integration 3.2.1 true
authentication-tokens 1.4 true
bitbucket 223.vd12f2bca5430 true
bitbucket-filter-project-trait 1.0 true
bitbucket-oauth 0.12 true
bitbucket-push-and-pull-request 2.8.1 true
blueocean 1.25.5 true
blueocean-autofavorite 1.2.5 true
blueocean-bitbucket-pipeline 1.25.5 true
blueocean-commons 1.25.5 true
blueocean-config 1.25.5 true
blueocean-core-js 1.25.5 true
blueocean-dashboard 1.25.5 true
blueocean-display-url 2.4.1 true
blueocean-events 1.25.5 true
blueocean-git-pipeline 1.25.5 true
blueocean-github-pipeline 1.25.5 true
blueocean-i18n 1.25.5 true
blueocean-jwt 1.25.5 true
blueocean-personalization 1.25.5 true
blueocean-pipeline-api-impl 1.25.5 true
blueocean-pipeline-editor 1.25.5 true
blueocean-pipeline-scm-api 1.25.5 true
blueocean-rest 1.25.5 true
blueocean-rest-impl 1.25.5 true
blueocean-web 1.25.5 true
bootstrap4-api 4.6.0-5 true
bootstrap5-api 5.1.3-7 true
bouncycastle-api 2.26 true
branch-api 2.1046.v0ca_37783ecc5 true
caffeine-api 2.9.3-65.v6a_47d0f4d1fe true
checks-api 1.7.4 true
cloudbees-bitbucket-branch-source 773.v4b_9b_005b_562b_ true
cloudbees-disk-usage-simple 0.10 true
cloudbees-folder 6.729.v2b_9d1a_74d673 true
cobertura 1.17 true
code-coverage-api 2.0.4 true
command-launcher 84.v4a_97f2027398 true
configuration-as-code 1414.v878271fc496f true
credentials 1129.vef26f5df883c true
credentials-binding 523.vd859a_4b_122e6 true
data-tables-api 1.11.4-4 true
display-url-api 2.3.6 true
docker-commons 1.19 true
docker-workflow 1.28 true
durable-task 496.va67c6f9eefa7 true
echarts-api 5.3.2-3 true
extended-read-permission 3.2 true
favorite 2.4.1 true
font-awesome-api 6.1.1-1 true
forensics-api 1.14.0 true
generic-webhook-trigger 1.84 true
git 4.11.3 true
git-client 3.11.0 true
git-server 1.11 true
github 1.34.3 true
github-api 1.303-400.v35c2d8258028 true
github-branch-source 1637.vd833b_7ca_7654 true
handlebars 3.0.8 true
handy-uri-templates-2-api 2.1.8-22.v77d5b_75e6953 true
htmlpublisher 1.30 true
http_request 1.15 true
jackson2-api 2.13.3-285.vc03c0256d517 true
jacoco 3.3.2 true
javax-activation-api 1.2.0-3 true
javax-mail-api 1.6.2-6 true
jaxb 2.3.6-1 true
jdk-tool 1.5 true
jenkins-design-language 1.25.5 true
jjwt-api 0.11.5-77.v646c772fddb_0 true
job-dsl 1.79 true
jquery3-api 3.6.0-4 true
jsch 0.1.55.2 true
junit 1119.va_a_5e9068da_d7 true
kubernetes 3636.v84b_a_1dea_6240 true
kubernetes-client-api 5.12.2-193.v26a_6078f65a_9 true
kubernetes-credentials 0.9.0 true
ldap 2.10 true
lockable-resources 2.15 true
mailer 414.vcc4c33714601 true
mask-passwords 3.3 true
matrix-auth 3.1.2 true
matrix-project 771.v574584b_39e60 true
mercurial 2.16.2 true
metrics 4.1.6.2 true
momentjs 1.1.1 true
multibranch-scan-webhook-trigger 1.0.9 true
newrelic-deployment-notifier 1.8 true
okhttp-api 4.9.3-105.vb96869f8ac3a true
pipeline-build-step 2.18 true
pipeline-graph-analysis 195.v5812d95a_a_2f9 true
pipeline-groovy-lib 593.va_a_fc25d520e9 true
pipeline-input-step 448.v37cea_9a_10a_70 true
pipeline-milestone-step 101.vd572fef9d926 true
pipeline-model-api 2.2086.v12b_420f036e5 true
pipeline-model-definition 2.2086.v12b_420f036e5 true
pipeline-model-extensions 2.2086.v12b_420f036e5 true
pipeline-rest-api 2.24 true
pipeline-stage-step 293.v200037eefcd5 true
pipeline-stage-tags-metadata 2.2086.v12b_420f036e5 true
pipeline-stage-view 2.24 true
pipeline-utility-steps 2.12.2 true
plain-credentials 1.8 true
plugin-util-api 2.17.0 true
popper-api 1.16.1-3 true
popper2-api 2.11.5-2 true
prometheus 2.0.11 true
pubsub-light 1.16 true
saml 2.298.vc7a_2b_3958628 true
scm-api 608.vfa_f971c5a_a_e9 true
script-security 1175.v4b_d517d6db_f0 true
slack 608.v19e3b_44b_b_9ff true
snakeyaml-api 1.30.1 true
sonar 2.14 true
sse-gateway 1.25 true
ssh-credentials 277.v95c2fec1c047 true
ssh-slaves 1.814.vc82988f54b_10 true
sshd 3.237.v883d165a_c1d3 true
structs 318.va_f3ccb_729b_71 true
test-results-analyzer 0.3.5 true
token-macro 293.v283932a_0a_b_49 true
trilead-api 1.57.v6e90e07157e1 true
variant 1.4 true
workflow-aggregator 581.v0c46fa_697ffd true
workflow-api 1164.v760c223ddb_32 true
workflow-basic-steps 948.v2c72a_091b_b_68 true
workflow-cps 2725.v7b_c717eb_12ce true
workflow-cps-global-lib 588.v576c103a_ff86 true
workflow-durable-task-step 1146.v1a_d2e603f929 true
workflow-job 1186.v8def1a_5f3944 true
workflow-multibranch 716.vc692a_e52371b_ true
workflow-scm-step 400.v6b_89a_1317c9a_ true
workflow-step-api 625.vd896b_f445a_f8 true
workflow-support 820.vd1a_6cc65ef33 true
Mac Pro
System Version: macOS 14.3 (23D56)
Kernel Version: Darwin 23.3.0