dhoerl/PhotoScrollerNetwork

libjpeg-turbo - manually compile?

Closed this issue · 4 comments

Hi David,

how did you compile libjpeg? I tried to update it with the current version 1.2, but failed to do so because llvm apparently compiles it, but then it just doesn't work. Did you had any luck with it? Or are you using the gcc binaries of Xcode 4.1?

On 2/28/12 1:17 PM, Peter Steinberger wrote:

Hi David,

how did you compile libjpeg? I tried to update it with the current version 1.2, but failed to do so because llvm apparently compiles it, but then it just doesn't work. Did you had any luck with it? Or are you using the gcc binaries of Xcode 4.1?

The script downloads and builds it for you! Look at the run scripts in
the build phase. All you need is the project, then you run CMD-B to
build it. The downloaded source goes into a folder inside the project.

However, I'm told that just after I did this project that the official
1.2.0 version of the library - the binary distribution - has all the
libraries you would need (ie x86, armv6, armv7)

David

David, thanks for the quick answer.

Are you sure this is included in the product?
The only script I find in the .xcodeproj is ' echo "Hello World" '

Sorry for the confusion. To build libturbojpeg from source, you can download my separate project libjpeg-turbo-builder (it's named something like that). What I do is have a git directory with both this PhotoScrollerNetwork project in it and the libjpeg-turbo-builder. Open the lib builder and issue a CMD-B. It should download the source using svn into a folder in its directory, do a series of builds for whatever architectures you've specified, then it lipos them all together in a libturbojpeg.a library. You can then either link to that directly or copy it into the PhotoScrollerNetwork directory. Alternately you can get the lib turbo installer - but if you go that route linking is a bit more difficult since Xcode apparently does not want to link with anything in /usr/include.

In the end you may need to make minor changes to PhotoScrollerNetwork to get the library linked in. I believe the project now expects the .a file to be found in the local directory and the headers in ../libjpeg-turbo-builder/libjpeg-turbo.

My timing was just a bit off here - the 1.2.0 lib turbo release was issues just days after I had uploaded my project to build to for ARM. That said, if apple offers a new ARM device then you can build for it asap and not have to wait for an official lib turbo release.

That's perfect, thank you!