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

Debug build from sources fails with error : use of undeclared identifier 'memset' #2040

Closed
eldk opened this issue Feb 2, 2018 · 3 comments
Closed
Labels

Comments

@eldk
Copy link
Contributor

eldk commented Feb 2, 2018

Description

In Android Studio, up to date, with ndk 16.1.4479499, and Fresco lib sources from master branch, to last commit (yesterday), build fails with :

./jpeg/jpeg_codec.cpp:180:3: error: use of undeclared identifier 'memset'; did you mean 'wmemset'?
  memset(&dinfo, 0, sizeof(struct jpeg_decompress_struct));

(...) and few more errors (...)

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':imagepipeline:ndk_build_imagepipeline'.
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':static-webp:ndk_build_static-webp'.

Reproduction

Try to build again

  • Fresco version: master to 06fe371
  • Platform version: debug build for api 24 - Android 6.0
@eldk eldk changed the title Debug build from sources fails with use of undeclared identifier 'memset' Debug build from sources fails with error : use of undeclared identifier 'memset' Feb 2, 2018
@lambdapioneer
Copy link
Contributor

Thanks for the bug report @eldk!

Looks like both copies of jpeg_codec are missing #include <string.h>. I'd guess that previous NDK versions just did not care enough about this.

Can you check if adding those lines to the file might solve the problem? I don't have that NDK version ready at the moment - but otherwise I'll have a look on Monday :)

@eldk
Copy link
Contributor Author

eldk commented Feb 2, 2018

Hello,
I'm switching back to ndk 15c now.
I will test if it should be a temporary workaround.
I will check if #include <string.h> solves it.
Thanks,
Eric

eldk added a commit to eldk/fresco that referenced this issue Feb 2, 2018
…ier memset

ndk : 16.1.4479499
android-studio : 3.01
solves : facebook#2040
eldk added a commit to eldk/fresco that referenced this issue Feb 2, 2018
facebook-github-bot pushed a commit that referenced this issue Feb 5, 2018
Summary:
ndk : 16.1.4479499
android-studio : 3.01
solves : #2040

Thanks lambdapioneer
Closes #2043

Reviewed By: oprisnik

Differential Revision: D6899099

Pulled By: lambdapioneer

fbshipit-source-id: 211bab2e14637853dce978ca246ebd436a05d5ed
@eldk
Copy link
Contributor Author

eldk commented Feb 6, 2018

Thanks @lambdapioneer

@eldk eldk closed this as completed Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants