Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

libjpeg-turbo 1.2.0 #11894

Closed
wants to merge 3 commits into from

6 participants

@RuiPereira

libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.

@RuiPereira RuiPereira libjpeg-turbo 1.2.0
libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.
8ecee67
@adamv
Owner

Looks OK to me; other maintainers OK with this?

@jacknagel
Owner

ACK'ed

@adamv
Owner

I'm going to rename to have "lib" in the name, since that appears to be the official name.

@adamv
Owner

Getting a build error: https://gist.github.com/2522104

@RuiPereira

If your nasm the system one? Here's what I get for the object file format (using nasm from homebrew):

checking for object file format of host system... Mach-O64
checking for object file format specifier (NAFLAGS) ... -fmacho64 -DMACHO -D__x86_64__
checking whether the assembler (nasm -fmacho64 -DMACHO -D__x86_64__) works... yes
@adamv
Owner

I had no idea there was a system nasm; hmm.

@RuiPereira

That's why I added it as dependency for building, but I guess that it does not get installed due to the already existing nasm... can it be forced in some way? The system nasm has no macho64 output format:

$ /usr/bin/nasm -hf
(...)
   macho     NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X object files
$ /usr/local/bin/nasm -hf
(...)
    macho32   NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X (i386) object files
    macho64   NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X (x86_64) object files
(...)
    macho     MACHO (short name for MACHO32)

(I used --universal)

@adamv
Owner

which nasm gives me the Homebrew version.

@RuiPereira

MacOS: 10.6.8-i386: does this mean you're in a 32bit architecture? Maybe we just also need to do the autoreconf in those systems and get rid of the if MacOS.prefer_64_bit?

@adamv
Owner

I have a 64-bit CPU (core 2 duo) but running in 32 bit kernel mode. "prefer_64_bit?" is true for this setup, as we still compile 64-bit.

@RuiPereira

Does this fix it? [Edit] Oh, sorry, haven't seen the last remark on our comment... hummmm

@RuiPereira

So, could you show me your output of nasm -hf. Is macho64 there?

@sindresorhus

Anything I can do to make this go along? This would be very useful in a project I'm doing.

@RuiPereira

@sindresorhus could you try to install the formula using
brew install https://raw.github.com/RuiPereira/homebrew/15179/Library/Formula/jpeg-turbo.rb
and tell me if it works?

@sindresorhus

Worked perfectly on my MacBook Pro 3,1 64-bit, Lion:

→ brew install https://raw.github.com/RuiPereira/homebrew/15179/Library/Formula/jpeg-turbo.rb
######################################################################## 100.0%
==> Installing jpeg-turbo dependency: autoconf
==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
######################################################################## 100.0%
==> Patching
patching file bin/autoreconf.in
==> ./configure --prefix=/usr/local/Cellar/autoconf/2.69
==> make install
/usr/local/Cellar/autoconf/2.69: 67 files, 1.9M, built in 12 seconds
==> Installing jpeg-turbo dependency: automake
==> Downloading http://ftpmirror.gnu.org/automake/automake-1.12.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/automake/1.12
==> make install
/usr/local/Cellar/automake/1.12: 129 files, 1.9M, built in 12 seconds
==> Installing jpeg-turbo dependency: libtool
==> Downloading http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libtool/2.4.2 --program-prefix=g --enable-ltdl-install
==> make install
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
/usr/local/Cellar/libtool/2.4.2: 64 files, 2.1M, built in 18 seconds
==> Installing jpeg-turbo dependency: nasm
==> Downloading http://www.nasm.us/pub/nasm/releasebuilds/2.10.01/nasm-2.10.01.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/nasm/2.10.01
==> make everything
==> make install_everything
/usr/local/Cellar/nasm/2.10.01: 44 files, 5.0M, built in 70 seconds
==> Installing jpeg-turbo
==> Downloading http://downloads.sourceforge.net/project/libjpeg-turbo/1.2.0/libjpeg-turbo-1.2.0.tar.gz
######################################################################## 100.0%
==> autoreconf -ivf
==> ./configure --prefix=/usr/local/Cellar/jpeg-turbo/1.2.0
==> make install
==> Caveats
This formula is keg-only, so it was not symlinked into /usr/local.

libjpeg-turbo is not linked to prevent conflicts with the standard libjpeg.

Generally there are no consequences of this for you.
If you build your own software and it requires this formula, you'll need
to add its lib & include paths to your build variables:

    LDFLAGS  -L/usr/local/Cellar/jpeg-turbo/1.2.0/lib
    CPPFLAGS -I/usr/local/Cellar/jpeg-turbo/1.2.0/include
==> Summary
/usr/local/Cellar/jpeg-turbo/1.2.0: 30 files, 1.9M, built in 102 seconds
@adamv adamv was assigned
@RuiPereira

OK great. Not sure what's happening with @adamv installation though, would be good to have someone else with Snow Leopard to try the formula (I'm also on Lion).

@jbeezley

Snow Leopard here. Same problem as @adamv.

@jbeezley

I just looked at BUILDING.txt inside the source. They mention using configure flag '--host x86_64-apple-darwin'. This lets me configure and compile successfully. Maybe try adding that to the formula and test that it doesn't break the Lion build.

@RuiPereira

@jbeezley thanks, it also works well under Lion. @adamv everything seems to work now, should I rebase all the commits?

@springmeyer

+1 to seeing this in homebrew

@adamv
Owner

Still getting a build failure.

@adamv
Owner
checking for nasm... nasm
checking for object file format of host system... Mach-O64
checking for object file format specifier (NAFLAGS) ... -fmacho64 -DMACHO -D__x86_64__
checking whether the assembler (nasm -fmacho64 -DMACHO -D__x86_64__) works... no
configure: error: installation or configuration problem: assembler cannot create object files.
config.log was copied to /Users/adamv/Library/Logs/Homebrew
@RuiPereira

@adamv could you post your config.log? And which is your nasm version?

@adamv
Owner
$ which nasm
/usr/local/bin/nasm
[~/homebrew] (master)
$ nasm -v
NASM version 2.10.01 compiled on Jun 27 2012
[~/homebrew] (master)
$ 
@adamv
Owner

HOMEBREW_VERSION: 0.9.1
HEAD: a7c69e8f1f4f940b3192889a4b631cce7ea0f229
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /Users/adamv/homebrew/Cellar
CPU: dual-core 64-bit core2
OS X: 10.6.8-i386
Xcode: 3.2.6
GCC-4.0: build 5494
GCC-4.2: build 5666
LLVM: build 2335
Clang: 1.7 build 77
MacPorts or Fink? false
X11: /usr/X11
System Ruby: 1.8.7-249
Which Perl:   /usr/bin/perl
Which Python: /Users/adamv/homebrew/Cellar/python/2.7.3/bin/python => /Users/adamv/homebrew/Cellar/python/2.7.3/bin/python2.7
Which Ruby:   /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
@RuiPereira

Your configure is picking /usr/bin/nasm instead of /usr/local/bin/nasm:

configure:22174: found /usr/bin/nasm
configure:22184: result: nasm
configure:22198: checking for object file format of host system
configure:22272: result: Mach-O64
configure:22280: checking for object file format specifier (NAFLAGS) 
configure:22295: result: -fmacho64 -DMACHO -D__x86_64__
configure:22299: checking whether the assembler (nasm -fmacho64 -DMACHO -D__x86_64__) works
configure:22310: nasm -fmacho64 -DMACHO -D__x86_64__ -o conftest.o conftest.asm
nasm: fatal: unrecognised output format `macho64' - use -hf for a list

The system nasm is too old to compile libjpeg-turbo on 64bit systems (2.07 minimum):

$ /usr/bin/nasm -v
NASM version 0.98.40 (Apple Computer, Inc. build 11) compiled on Jan 27 2012

Any idea why the /usr/bin one is taking precedence during installation? Maybe some PATH issue?

@RuiPereira

I was seeing the same problem under my master branch. However after updating from homebrew HEAD, everything works again, maybe 7f3204a fixed it.

@adamv
Owner

Yeah looks like the path issue was breaking here.

@adamv adamv closed this pull request from a commit
@RuiPereira RuiPereira libjpeg-turbo 1.2.0
libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.

Closes #11894.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
5b364d4
@adamv adamv closed this in 5b364d4
@zhangcheng zhangcheng referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@TheAlphaNerd TheAlphaNerd referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@CharlieRoot CharlieRoot referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@petrhosek petrhosek referenced this pull request from a commit
@RuiPereira RuiPereira libjpeg-turbo 1.2.0
libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.

Closes #11894.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
18d0742
@eproxus eproxus referenced this pull request from a commit in eproxus/homebrew
@RuiPereira RuiPereira libjpeg-turbo 1.2.0
libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.

Closes #11894.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
83a56c1
@h10n h10n referenced this pull request from a commit
@RuiPereira RuiPereira libjpeg-turbo 1.2.0
libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.

Closes #11894.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
ee51c0b
@shrop shrop referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@Sharpie Sharpie referenced this pull request from a commit in Sharpie/homebrew
@RuiPereira RuiPereira libjpeg-turbo 1.2.0
libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.

Closes #11894.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
ac84501
@snakeyroc3 snakeyroc3 referenced this pull request from a commit in snakeyroc3/homebrew
@RuiPereira RuiPereira libjpeg-turbo 1.2.0
libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.

Closes #11894.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
ee4a441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 26, 2012
  1. @RuiPereira

    libjpeg-turbo 1.2.0

    RuiPereira authored
    libjpeg-turbo is a derivative of libjpeg that uses
    SIMD instructions (MMX, SSE2, NEON) to accelerate
    baseline JPEG compression and decompression on
    x86, x86-64, and ARM systems.
Commits on May 4, 2012
  1. @RuiPereira
Commits on Jun 8, 2012
  1. @RuiPereira
This page is out of date. Refresh to see the latest.
Showing with 26 additions and 0 deletions.
  1. +26 −0 Library/Formula/jpeg-turbo.rb
View
26 Library/Formula/jpeg-turbo.rb
@@ -0,0 +1,26 @@
+require 'formula'
+
+class JpegTurbo < Formula
+ homepage 'http://www.libjpeg-turbo.org/'
+ url 'http://downloads.sourceforge.net/project/libjpeg-turbo/1.2.0/libjpeg-turbo-1.2.0.tar.gz'
+ md5 '5329fa80953938cb4f097afae55059e2'
+
+ if MacOS.prefer_64_bit?
+ depends_on 'nasm' => :build
+ end
+
+ keg_only "libjpeg-turbo is not linked to prevent conflicts with the standard libjpeg."
+
+ def install
+ args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
+ args << "--host=x86_64-apple-darwin" if MacOS.prefer_64_bit?
+ system "./configure", *args
+ system "make install"
+ end
+
+ def test
+ mktemp do
+ system "#{bin}/jpegtran -crop 500x500+200+500 -transpose -perfect -outfile test.jpg /System/Library/CoreServices/DefaultDesktop.jpg"
+ end
+ end
+end
Something went wrong with that request. Please try again.