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

meson: use library() and fix external builds #768

Merged
merged 2 commits into from
Dec 29, 2020

Conversation

1480c1
Copy link
Contributor

@1480c1 1480c1 commented Dec 16, 2020

Use library() so the --default-library flag will have an effect, fixes #557 and an issue in #613

also fixes #752

@1480c1 1480c1 force-pushed the library branch 2 times, most recently from 410410a to d1b557c Compare December 17, 2020 18:19
@1480c1
Copy link
Contributor Author

1480c1 commented Dec 17, 2020

I guess github actions is updating their stuff

@1480c1 1480c1 force-pushed the library branch 4 times, most recently from c1f203a to 54924bd Compare December 22, 2020 01:28
@kylophone
Copy link
Collaborator

kylophone commented Dec 23, 2020

@1480c1, finally got around to testing this. Sorry for the delay! Can we please keep the vmaf tool statically linked by default? Other than that, I think this looks good. Thanks for the fixes.

@1480c1
Copy link
Contributor Author

1480c1 commented Dec 23, 2020

Can we please keep the vmaf tool statically linked by default?

since we are using library() instead of both_libraries(), the object doesn't have a static library associated with it by default, the user would need to choose to create, and thus link, a static library through the --default-library static flag. In the case where they use --default-library both, I believe meson will choose the shared library by default, I am not sure if there's a way to detect if the object returned has a static version in a both scenario and link to it, maybe best that could be done would be to have a different path if default-library is both

@kylophone
Copy link
Collaborator

kylophone commented Dec 23, 2020

, I believe meson will choose the shared library by default, I am not sure if there's a way to dete

Hmm, I see. I guess just updating the build docs include "use --default-library static if desired" is reasonable. Also we'll want to update this in our CI runners to make sure that the artifacts we're uploading are statically linked.

@1480c1
Copy link
Contributor Author

1480c1 commented Dec 23, 2020

I am currently testing a way to detect the default_library option and choosing the static version when applied, do hold before merging

@1480c1 1480c1 marked this pull request as draft December 23, 2020 22:27
@kylophone
Copy link
Collaborator

I am currently testing a way to detect the default_library option and choosing the static version when applied, do hold before merging

Yep, will stand by.

@1480c1
Copy link
Contributor Author

1480c1 commented Dec 23, 2020

changing link_with : libvmaf to link_with : get_option('default_library') == 'both' ? libvmaf.get_static_lib() : libvmaf now results with

--default-library ninja test libvmaf ldd libvmaf/build/tools/vmaf
none OK .so /code/vmaf/libvmaf/build/tools/../src/libvmaf.so.1
static OK .a no *vmaf.so*
shared OK .so /code/vmaf/libvmaf/build/tools/../src/libvmaf.so.1
both OK .a and .so no *vmaf.so*

So I guess the only thing left would be, do we want static to be the default option on none, or the current shared?

@1480c1
Copy link
Contributor Author

1480c1 commented Dec 24, 2020

I'm going to set the default to doing both to match what we previously had

this allows for the `--default-library` flag to actually have an effect

Netflix#557
Netflix#613

Signed-off-by: Christopher Degawa <[email protected]>
@1480c1 1480c1 marked this pull request as ready for review December 24, 2020 01:26
@1480c1
Copy link
Contributor Author

1480c1 commented Dec 24, 2020

@kylophone ready for review

@kylophone kylophone merged commit aa422ef into Netflix:master Dec 29, 2020
@kylophone
Copy link
Collaborator

Alright, I've tested and merged. Thanks for being patient!

@1480c1 1480c1 deleted the library branch December 29, 2020 19:24
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.

external builds fail due to undef ref to embedded model symbols create dynamic link library of libvmaf
2 participants