Skip to content
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

Update build.sh for repeatable builds of libwebrtc-magic.a #51

Merged
merged 2 commits into from
Jan 8, 2017

Conversation

cantstopthesignal
Copy link
Contributor

Modify build.sh to perform a mostly self contained build of webrtc at
the tested commit id. Some pre-requisites must be installed before or
after a missing tool failure is encountered, e.g. pkg-config on mac or
webrtc/src/build/install-build-deps.sh on linux.

Tested: linux and mac builds worked from clean virtual machines. Demos
and tests passed.

Modify build.sh to perform a mostly self contained build of webrtc at
the tested commit id. Some pre-requisites must be installed before or
after a missing tool failure is encountered, e.g. pkg-config on mac or
webrtc/src/build/install-build-deps.sh on linux.

Tested: linux and mac builds worked from clean virtual machines. Demos
and tests passed.
@cantstopthesignal
Copy link
Contributor Author

Hi arlolra, thank you for the helpful build instructions! I was able to get repeatable builds working from clean checkouts with this patch (Chrome 52 at the same webrtc commit as before). I plan to take a look at Chrome >= 55 sometime soon.

@cantstopthesignal
Copy link
Contributor Author

Here's a commit for the recompiled binaries generated from this point, but for security purposes I figure you would prefer not accepting binary patches. So just FYI: cantstopthesignal@f4c11e1

Copy link
Collaborator

@arlolra arlolra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this done!

'webrtcsessiondescriptionfactory.h',
+ 'test/fakeaudiocapturemodule.cc',
+ 'test/fakeaudiocapturemodule.h',
+ 'fakefieldtrial.cc',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just add '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default', to the 'dependencies' like in libjingle_peerconnection_jni instead of providing our own.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done -- this worked great, thanks!

libtool -static -o libwebrtc-magic.a -filelist filelist
strip -S -x -o libwebrtc-magic.a libwebrtc-magic.a
else
ar crs libwebrtc-magic.a $(find . -name '*.o' -not -name '*.main.o' -not -name 'dump_syms_regtest.o')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's dump_syms_regtest.o coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, that was left in from a previous attempt. It is not needed in the current way of building

popd

echo "Building webrtc ..."
pushd $WEBRTC_SRC
ninja -C out/$CONFIG
export GYP_DEFINES="include_tests=0 include_examples=0"
python webrtc/build/gyp_webrtc webrtc/api/api.gyp || exit 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, I forgot this change results in the Undefined symbols for ... webrtc::field_trial::FindFullName. Sorry :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem!

@arlolra
Copy link
Collaborator

arlolra commented Dec 9, 2016

I plan to take a look at Chrome >= 55 sometime soon.

I imagine that'll be slightly more involved, but looking forward to seeing what you come up with :)

1. Remove dump_syms_regtest.o reference
2. Add field_trial_default dependency instead of creating a new cc file
Copy link
Contributor Author

@cantstopthesignal cantstopthesignal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a new commit which addresses your review feedback, thanks!

popd

echo "Building webrtc ..."
pushd $WEBRTC_SRC
ninja -C out/$CONFIG
export GYP_DEFINES="include_tests=0 include_examples=0"
python webrtc/build/gyp_webrtc webrtc/api/api.gyp || exit 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem!

'webrtcsessiondescriptionfactory.h',
+ 'test/fakeaudiocapturemodule.cc',
+ 'test/fakeaudiocapturemodule.h',
+ 'fakefieldtrial.cc',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done -- this worked great, thanks!

@arlolra arlolra merged commit 3620917 into keroserene:master Jan 8, 2017
@arlolra
Copy link
Collaborator

arlolra commented Jan 8, 2017

Great, thanks! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants