Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#31941 closed defect (fixed)

firefox-x11 7.0.1 fails to build with Lion's /usr/bin/grep

Reported by: matuzalem@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: lion Cc: gary.verhaegen@…, robert@…, macosforge@…, cooljeanius (Eric Gallager)
Port: firefox-x11

Description

build error in firefox-x11, Lion 10.7.2, Xcode 4.2, llvm-gcc-4.2

Attachments (2)

firefox-x11.log (254.3 KB) - added by matuzalem@… 13 years ago.
main.log (1.4 MB) - added by gary.verhaegen@… 13 years ago.
log after installing grep through macports

Download all attachments as: .zip

Change History (15)

Changed 13 years ago by matuzalem@…

Attachment: firefox-x11.log added

comment:1 Changed 13 years ago by mf2k (Frank Schima)

Keywords: Fifefox-x11 fail removed
Owner: changed from macports-tickets@… to jeremyhu@…
Port: firefox-x11 added; Fifefox-x11 removed

comment:2 Changed 13 years ago by mf2k (Frank Schima)

Summary: Fifefox-x11 7.0.1 fails to buildfirefox-x11 7.0.1 fails to build

comment:3 Changed 13 years ago by matuzalem@…

Cc: matuzalem@… added

Cc Me!

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: matuzalem@… removed

The log shows you are using clang, not llvm-gcc-4.2. (The port deliberately disallows the use of llvm-gcc-4.2 and uses clang instead.)

You do not need to Cc yourself when you are the reporter.

comment:5 in reply to:  4 Changed 13 years ago by gary.verhaegen@…

For the sake of completeness and centralization, I want to link from here to this message. Also, installing grep 2.10 from MacPorts instead of the grep 2.5 that comes with Lion did solve part of the problem for me: it went from crashing at the start of the compilation to crashing at the linking phase.

Changed 13 years ago by gary.verhaegen@…

Attachment: main.log added

log after installing grep through macports

comment:6 in reply to:  4 Changed 13 years ago by gary.verhaegen@…

With the "installing grep through macports" partial fix, it looks like this becomes a duplicate of ticket #31788.

comment:7 Changed 13 years ago by gary.verhaegen@…

The missing symbols are referenced from the decode.o and state.o libraries from libtheora, specifically in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_firefox-x11/firefox-x11/work/mozilla-release/media/libtheora/lib/. When forcing the architecture to i386 only using port install firefox-x11 build_arch=i386, it looks like only state.o still fails with the same _oc_state_accel_init_x86 symbol missing as in universal and x86_64 modes.

comment:8 Changed 13 years ago by gary.verhaegen@…

I am now concentrating on the 32bit version; I would guess that the general principles are the same for the 64bit version, but there are fewer missing symbols in the 32bit version. I am not very comfortable with C programming, but I peeked around a bit and here's what I understand of this issue. At the start of the state.c file of libtheora, there are a bunch of includes based on architecture flags. The include for the x86 architecture redefines the function oc_state_accel_init_c to be oc_state_accel_init_x86, which is declared in the included file (x86int.h) but not defined.

Looking around, I did find a definition for oc_state_accel_init_x86 in the x86state.c file (same folder as x86int.h: mozilla-release/media/libtheora/lib/x86). However, as there are no .o files in that directory, my guess would be that the build script somehow forgot to compile them and include them in the linking phase. Modifying the build script to correctly include these files is beyond me, but simply commenting out the redefinition of oc_state_accel_init_c to oc_state_accel_init_x86 allowed me to finish the compilation. My guess is that my version of libtheora will be a bit slower, since it is using a C version instead of a hand-coded x86 assembly version of that initialization function, but I hope everything will nonetheless keep working.

So the problem seems to be with libtheora more than with firefox itself. As an aside, is there any reason for the firefox port to compile its own version of libtheora instead of relying on the existing libtheora port? (which compiles without any problem on my machine)

comment:9 Changed 13 years ago by gary.verhaegen@…

Cc: gary.verhaegen@… added

Cc Me!

comment:10 Changed 13 years ago by robert@…

Cc: robert@… added

Cc Me!

comment:11 Changed 12 years ago by macosforge@…

Cc: macosforge@… added

Cc Me!

comment:12 Changed 12 years ago by jmroot (Joshua Root)

Keywords: lion added
Resolution: fixed
Status: newclosed
Summary: firefox-x11 7.0.1 fails to buildfirefox-x11 7.0.1 fails to build with Lion's /usr/bin/grep

Dependency added in r94254. As mentioned above, the rest is a duplicate of #31788.

comment:13 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.