Cross compiling libpng for ARM Linux with Neon and Zlib

libpng is the standard software library for creating .png image files. It can be built for arm with NEON SIMD support. Cross compiling it for ARM is reasonably straight forward. Its only dependency is zlib which configure can have problems finding.

Before building libpng you will first need to compile zlib.

Then download the libpng source from here, un-zip it etc. and then run confgure as follows:

In the above command replace:

a.) the path to your zlib include files (probably inside the install directory the the zlib build installed to)
b.) the path to your zlib lib files
c.) The path to the directory into which you want all of the output files installed
d.) change the compiler names (if different from arm-linux-gnueabi-gcc etc.)

Once configure completes you make & install:

Now copy the files from the output directory to your ARM device.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *