Page MenuHomePhabricator

scripts: add MACHO dylib checking to symbol-check.py
ClosedPublic

Authored by PiRK on Apr 5 2023, 13:33.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCc1833b06772c: scripts: add MACHO dylib checking to symbol-check.py
Summary

This is a backport of core#17863

Depends on D13578

Test Plan

gitian build

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22995
Build 45610: Build Diff
Build 45609: arc lint + arc unit

Event Timeline

revert return ok simplifications because it would prevent printing all issues and make debbugging harder

Use f-strings.

Tail of the build log:

[14:10:07] :		 [Ant JUnit report watcher] Watching paths:
[14:10:07] :		 [Ant JUnit report watcher] /home/teamcity/buildAgent/work/jailed-build/results/artifacts/junit/*.xml
[14:10:08]E:	 [Step 1/1] Build gitian-osx failed with exit code 1
[14:10:07]i:	 [Step 1/1] ##teamcity[buildProblem timestamp='2023-04-05T14:10:07.201' description='Build gitian-osx failed with exit code 1']
[14:10:07] :	 [Step 1/1]  * [new branch]          master                 -> master
[14:10:07] :	 [Step 1/1] --- Building for bullseye amd64 ---
[14:10:07] :	 [Step 1/1] Stopping target if it is up
[14:10:07] :	 [Step 1/1] Error response from daemon: No such container: gitian-target
[14:10:07] :	 [Step 1/1] Error: No such container: gitian-target
[14:10:07] :	 [Step 1/1] Making a new image copy
[14:10:07] :	 [Step 1/1] Starting target
[14:10:07] :	 [Step 1/1] Checking if target is up.
[14:10:07] :	 [Step 1/1] Preparing build environment
[14:10:07] :	 [Step 1/1] Updating apt-get repository (log in var/install.log)
[14:10:07] :	 [Step 1/1] Installing additional packages (log in var/install.log)
[14:10:07] :	 [Step 1/1] Upgrading system, may take a while (log in var/install.log)
[14:10:07] :	 [Step 1/1] Creating package manifest
[14:10:07] :	 [Step 1/1] Creating build script (var/build-script)
[14:10:07] :	 [Step 1/1] Running build script (log in var/build.log)
[14:10:07] :	 [Step 1/1] ./bin/gbuild:23:in `system!': failed to run on-target setarch x86_64 bash -x < var/build-script > var/build.log 2>&1 (RuntimeError)
[14:10:07] :	 [Step 1/1] 	from ./bin/gbuild:185:in `build_one_configuration'
[14:10:07] :	 [Step 1/1] 	from ./bin/gbuild:339:in `block (2 levels) in <main>'
[14:10:07] :	 [Step 1/1] 	from ./bin/gbuild:334:in `each'
[14:10:07] :	 [Step 1/1] 	from ./bin/gbuild:334:in `block in <main>'
[14:10:07] :	 [Step 1/1] 	from ./bin/gbuild:332:in `each'
[14:10:07] :	 [Step 1/1] 	from ./bin/gbuild:332:in `<main>'
[14:10:07] :	 [Step 1/1] Build gitian-osx failed with exit code 1
[14:10:07]W:	 [Step 1/1] + RESULT=1
[14:10:07]W:	 [Step 1/1] + pushd /home/teamcity/infra
[14:10:07]W:	 [Step 1/1] + docker-compose stop apt-cache-proxy
[14:10:07] :	 [Step 1/1] ~/infra ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[14:10:07]W:	 [Step 1/1] Stopping abc-apt-cache-proxy ... 
[14:10:18]W:	 [Step 1/1]  [1A [2K
[14:10:18] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[14:10:18]W:	 [Step 1/1] Stopping abc-apt-cache-proxy ...  [32mdone [0m
[14:10:18]W:	 [Step 1/1]  [1B+ popd
[14:10:18]W:	 [Step 1/1] + exit 1
[14:10:18]W:	 [Step 1/1] Process exited with code 1
[14:10:18]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
[14:10:18] :	 [Step 1/1] Waiting for 1 service processes to complete
[14:10:18]E:	 [Step 1/1] Ant JUnit report watcher
[14:10:18]E:		 [Ant JUnit report watcher] No reports found for paths:
[14:10:18]E:		 [Ant JUnit report watcher] /home/teamcity/buildAgent/work/jailed-build/results/artifacts/junit/*.xml
[14:10:18]E:	 [Step 1/1] Step Command Line failed
[14:10:19]E: Ant JUnit report watcher
[14:10:19]E:	 [Ant JUnit report watcher] No reports found for paths:
[14:10:19]E:	 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[14:10:19]E:	 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[14:10:19] : Publishing internal artifacts (5s)
[14:10:24] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[14:10:24] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[14:10:19]W: Publishing artifacts (7s)
[14:10:19] :	 [Publishing artifacts] Collecting files to publish: [+:results/**/junit_results*.xml, +:bitcoin-abc/abc-ci-builds/gitian-osx/gitian-results => gitian-osx.tar.gz]
[14:10:19]W:	 [Publishing artifacts] Artifacts path 'results/**/junit_results*.xml' not found
[14:10:19] :	 [Publishing artifacts] Creating archive gitian-osx.tar.gz
[14:10:19] :		 [Creating archive gitian-osx.tar.gz] Creating /home/teamcity/buildAgent/temp/buildTmp/TarPreprocessor1965215985859963284/gitian-osx.tar.gz
[14:10:19] :		 [Creating archive gitian-osx.tar.gz] Archive was created, file size 209.65 KB (214689 bytes)
[14:10:25] :	 [Publishing artifacts] Publishing 1 file using [ArtifactsCachePublisher]: bitcoin-abc/abc-ci-builds/gitian-osx/gitian-results => gitian-osx.tar.gz
[14:10:25] :	 [Publishing artifacts] Publishing 1 file using [WebPublisher]: bitcoin-abc/abc-ci-builds/gitian-osx/gitian-results => gitian-osx.tar.gz
[14:10:27] : Build finished
Fabien requested changes to this revision.Apr 5 2023, 14:11
Fabien added a subscriber: Fabien.

It's failing, back to your queue

This revision now requires changes to proceed.Apr 5 2023, 14:11
PiRK edited the summary of this revision. (Show Details)

set OTOOL env

Tail of the build log:

[15:19:26] :	 [Step 1/1]  * [new tag]             phabricator/diff/39281 -> phabricator/diff/39281
[15:19:26] :	 [Step 1/1]  * [new tag]             phabricator/diff/39288 -> phabricator/diff/39288
[15:19:26] :	 [Step 1/1]  * [new tag]             phabricator/diff/39289 -> phabricator/diff/39289
[15:19:26] :	 [Step 1/1]  * [new tag]             phabricator/diff/39297 -> phabricator/diff/39297
[15:19:26] :	 [Step 1/1]  * [new tag]             phabricator/diff/8992  -> phabricator/diff/8992
[15:19:26] :	 [Step 1/1]  * [new tag]             phabricator/diff/8993  -> phabricator/diff/8993
[15:19:26] :	 [Step 1/1]  * [new branch]          master                 -> master
[15:19:26] :	 [Step 1/1] --- Building for bullseye amd64 ---
[15:19:26] :	 [Step 1/1] Stopping target if it is up
[15:19:26] :	 [Step 1/1] Making a new image copy
[15:19:26] :	 [Step 1/1] Starting target
[15:19:26] :	 [Step 1/1] Checking if target is up.
[15:19:26] :	 [Step 1/1] Preparing build environment
[15:19:26] :	 [Step 1/1] Updating apt-get repository (log in var/install.log)
[15:19:26] :	 [Step 1/1] Installing additional packages (log in var/install.log)
[15:19:26] :	 [Step 1/1] Upgrading system, may take a while (log in var/install.log)
[15:19:26] :	 [Step 1/1] Creating package manifest
[15:19:26] :	 [Step 1/1] Creating build script (var/build-script)
[15:19:26] :	 [Step 1/1] Running build script (log in var/build.log)
[15:19:26] :	 [Step 1/1] ./bin/gbuild:23:in `system!': failed to run on-target setarch x86_64 bash -x < var/build-script > var/build.log 2>&1 (RuntimeError)
[15:19:26] :	 [Step 1/1] 	from ./bin/gbuild:185:in `build_one_configuration'
[15:19:26] :	 [Step 1/1] 	from ./bin/gbuild:339:in `block (2 levels) in <main>'
[15:19:26] :	 [Step 1/1] 	from ./bin/gbuild:334:in `each'
[15:19:26] :	 [Step 1/1] 	from ./bin/gbuild:334:in `block in <main>'
[15:19:26] :	 [Step 1/1] 	from ./bin/gbuild:332:in `each'
[15:19:26] :	 [Step 1/1] 	from ./bin/gbuild:332:in `<main>'
[15:19:26] :	 [Step 1/1] Build gitian-osx failed with exit code 1
[15:19:26] :	 [Step 1/1] ~/infra ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[15:19:26]W:	 [Step 1/1] + RESULT=1
[15:19:26]W:	 [Step 1/1] + pushd /home/teamcity/infra
[15:19:26]W:	 [Step 1/1] + docker-compose stop apt-cache-proxy
[15:19:26]W:	 [Step 1/1] Stopping abc-apt-cache-proxy ... 
[15:19:37] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[15:19:37]W:	 [Step 1/1]  [1A [2K
[15:19:37]W:	 [Step 1/1] Stopping abc-apt-cache-proxy ...  [32mdone [0m
[15:19:37]W:	 [Step 1/1]  [1B+ popd
[15:19:37]W:	 [Step 1/1] + exit 1
[15:19:37]W:	 [Step 1/1] Process exited with code 1
[15:19:37]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
[15:19:37] :	 [Step 1/1] Waiting for 1 service processes to complete
[15:19:37]E:	 [Step 1/1] Ant JUnit report watcher
[15:19:37]E:		 [Ant JUnit report watcher] No reports found for paths:
[15:19:37]E:		 [Ant JUnit report watcher] /home/teamcity/buildAgent/work/jailed-build/results/artifacts/junit/*.xml
[15:19:37]E:	 [Step 1/1] Step Command Line failed
[15:19:38]E: Ant JUnit report watcher
[15:19:38]E:	 [Ant JUnit report watcher] No reports found for paths:
[15:19:38]E:	 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[15:19:38]E:	 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[15:19:38] : Publishing internal artifacts (1s)
[15:19:38] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[15:19:38] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[15:19:38]W: Publishing artifacts (2s)
[15:19:38] :	 [Publishing artifacts] Collecting files to publish: [+:results/**/junit_results*.xml, +:bitcoin-abc/abc-ci-builds/gitian-osx/gitian-results => gitian-osx.tar.gz]
[15:19:38]W:	 [Publishing artifacts] Artifacts path 'results/**/junit_results*.xml' not found
[15:19:38] :	 [Publishing artifacts] Creating archive gitian-osx.tar.gz
[15:19:38] :		 [Creating archive gitian-osx.tar.gz] Creating /home/teamcity/buildAgent/temp/buildTmp/TarPreprocessor5384394280961160930/gitian-osx.tar.gz
[15:19:38] :		 [Creating archive gitian-osx.tar.gz] Archive was created, file size 212.11 KB (217202 bytes)
[15:19:40] :	 [Publishing artifacts] Publishing 1 file using [ArtifactsCachePublisher]: bitcoin-abc/abc-ci-builds/gitian-osx/gitian-results => gitian-osx.tar.gz
[15:19:40] :	 [Publishing artifacts] Publishing 1 file using [WebPublisher]: bitcoin-abc/abc-ci-builds/gitian-osx/gitian-results => gitian-osx.tar.gz
[15:19:41] : Build finished
PiRK planned changes to this revision.Apr 5 2023, 15:41

MACHO_ALLOWED_LIBRARIES += {'CFNetwork', 'Security', 'SystemConfiguration'}

This revision is now accepted and ready to land.Apr 5 2023, 16:39