qiqian / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

compilation failure with gcc 4.0 on OS X 10.5 and earlier #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configure and make on OS X 10.5 or earlier

What is the expected output? What do you see instead?
Expected successful compile but got "error: can't find a register in class 
'BREG' while reloading 'asm'"; see https://trac.macports.org/ticket/32825

What version of the product are you using? On what operating system?
webp 0.1.3, OS X 10.4 or 10.5, Apple gcc 4.0.1, MacPorts 2.0.3

Please provide any additional information below.
It compiles fine on OS X 10.6 with its default Apple gcc 4.2 compiler.

Compiling on OS X 10.5 with the compiler changed from its default gcc-4.0 to 
gcc-4.2 works fine. This is not a usable workaround for OS X 10.4, because OS X 
10.4's Xcode does not include gcc-4.2.

A Stack Overflow post 
(http://stackoverflow.com/questions/4010069/problem-on-mac-cant-find-a-register-
in-class-breg-while-reloading-asm) suggests the problem could be related to 
compiling with "-mdynamic-no-pic" and "-fno-pic" would help. Adding "-fno-pic" 
to CFLAGS does not help. Adding "-mdynamic-no-pic" to CFLAGS gets further on 
Tiger, but then fails with:

:info:build ld: .libs/libwebp.lax/libwebpdecode.a/libwebpdecode_la-buffer.o has 
local relocation entries in non-writable section (__TEXT,__text)
:info:build /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link 
edit command failed

Original issue reported on code.google.com by ryandesi...@gmail.com on 13 Jan 2012 at 2:42

GoogleCodeExporter commented 9 years ago
I'll have to look into this. Building on 10.5 was never tested.

Original comment by jz...@google.com on 13 Jan 2012 at 11:13

GoogleCodeExporter commented 9 years ago
I should add that it only seems to be a problem on Intel Macs. Using gcc-4.0 on 
10.4 or 10.5 on a PowerPC Mac builds fine. So that's a relief. All Intel Macs 
are capable of being upgraded to at least 10.6 so there's little excuse for 
them not to.

Original comment by ryandesi...@gmail.com on 15 Jan 2012 at 2:35

GoogleCodeExporter commented 9 years ago
https://gerrit.chromium.org/gerrit/#change,14337

Addresses this specific issue. The build works with makefile.unix and 
CC=gcc-4.0. The autoconf is broken currently for another reason.

Original comment by jz...@google.com on 18 Jan 2012 at 12:13

GoogleCodeExporter commented 9 years ago
https://gerrit.chromium.org/gerrit/#change,14348

Fixes the dylib build.

Original comment by jz...@google.com on 18 Jan 2012 at 9:18

GoogleCodeExporter commented 9 years ago
Both changes have been merged.

Original comment by jz...@google.com on 18 Jan 2012 at 9:19