question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

apk build error: bzlib.h: No such file or directory

See original GitHub issue

os: openSUSE tumlbeweed linux p4a version: git master android ndk version: r17c

I tried to build apk with p4a: p4a apk --private /home/z/pproj/paradox_ssh/ --version=1.7 --bootstrap=sdl2 --local-recipes=./recipes --requirements=python3,kivy-async,openssl,sqlite3,pil,requests,sdl2,plyer --whitelist=./whitelist.txt --permission=CALL_PHONE --permission=INTERNET --orientation=portrait --package=org.spbelect.paradox2 --name="paradox2" --release

The build failed with an error:

/home/u1/.local/share/python-for-android/build/other_builds/freetype/armeabi-v7a__ndk_target_19/freetype/src/bzip2/ftbzip2.c:52:19: fatal error: bzlib.h: No such file or directory #include <bzlib.h> ^ compilation terminated.

full p4a stdout: https://gist.github.com/Fak3/5fca7ea090ddcc78be30571c8f4f91d8

I do have bzlib headers installed:

> rpm -ql libbz2-devel
/usr/include/bzlib.h
/usr/lib64/libbz2.so
/usr/lib64/pkgconfig/bzip2.pc
/usr/share/doc/packages/libbz2-devel
/usr/share/doc/packages/libbz2-devel/CHANGES
/usr/share/licenses/libbz2-devel
/usr/share/licenses/libbz2-devel/LICENSE

But somehow recipe cannot find the headers

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Fak3commented, Jun 10, 2019

Thanks! It worked

1reaction
opacamcommented, Jun 10, 2019

I think that I found what happen here:

The thing is that, for debian os and derivatives, there is a bug because the pkg-config is not distributed alongside the bzip2-devellibbz2-dev (libbz2-devel for openSuse) package, so when we build freetype we don’t get bzip2 support , not your case with openSuse, which it finds the pkg-config and tries to use that (Checking your freetype’s configure.log against mine, I noticed that your compilation is using bzip2 and it clearly fails, but my bzip2 library is never found because of the missing pkg-config file)

See also: https://gist.github.com/Fak3/5684594ac9b3c8a72eff15f8b55e08ff#file-config-log-L896

Could you try if the solution posted at #1857 works for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix R package installation fatal error: bzlib.h
h : No such file or directory. Problem: While installing some R package, you see an error message like. fix-r-package- ...
Read more >
fatal error: bzlib.h: No such file or directory - of Richel Bilderbeek
Install error that can occur when installing Boost. After doing the following, the error pops up: ./bootstrap ./bjam --build-dir=/tmp ...
Read more >
Seeing bzlib.h not found when trying the Bindgen tutorial
toml file and specified the linker, I tried this and still got the same error. Any ideas as to what I can check...
Read more >
centos编译时报错:error: bzlib.h: No such file or directory
centos编译时报错:error: bzlib.h: No such file or directory ... 参考: How to install all the boost development libraries? 解决Boost安装:fatal ...
Read more >
mirroring/HDiffPatch: a C\C++ library and command-line tools ...
( release files build by projects in path HDiffPatch/builds ) ... bzip2 : if the build fails with fatal error: bzlib.h: No such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found