Compiling transcode on OSX
We're trying to sort out why transcode isn't compiling on OSX:
From: achurch@achurch.org (Andrew Church) To: transcode-devel@exit1.org Subject: Re: [transcode-devel] Re: Compiling transcode Date: Fri, 27 Apr 2007 08:52:42 JST X-WWMF-Version: 3.2.20070423.2@fries Reply-To: transcode Developers Mailing List <transcode-devel@exit1.org>
gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_REENTRANT -DLINUX -I.. -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -no-cpp-precomp -D_INTL_REDIRECT_MACROS -MT tcmemcpy.lo -MD -MP -MF .deps/tcmemcpy.Tpo -c tcmemcpy.c -fno-common -DPIC -o .libs/ tcmemcpy.o /var/tmp//ccMwDlN6.s:43:missing or invalid immediate expression `0b111' taken as 0
What version of binutils are you using? (Sorry if you already mentioned this--I haven't had a chance to review the thread.) This looks like a case of an outdated assembler version not being able to parse binary constants.
I responded I don't know how to determine what OSX is using natively. How is that done? I then installed the port of FSF's binutils, reconfigured transcode and recompiled, but the build failed in exactly the same way. How do I know if the FSF binutils is being used?
/var/tmp//ccMwDlN6.s:206:Alignment too large: 15. assumed.
This should only happen on x86 if you're compiling to a.out, which is ancient, or (again) if your assembler is too old. (On the other hand, the use of .balign rather than .align here would avoid such potential trouble, and I'll look into making that change on CVS HEAD when I have a chance.)
Note that you can disable assembler code entirely by passing --disable-mmx to ./configure (but this can slow transcode down considerably depending on what you do with it).
I responded I tried to compile with --disable-mmx, and also --disable-sse and --disable-sse2, individually and collectively, and it had absolutely no effect on the build -- it fails in exactly the same way. Suggestions would be much appreciated. Dave
I installed the binutils port (version 2.17), and macports says it's active -- but when I issue x:~# as -v Apple Computer, Inc. version cctools-622.5.obj~13, GNU assembler version 1.38 This looks like the native assembler version. Is there a way to actually activate the port? Dave
David Liontooth wrote:
I installed the binutils port (version 2.17), and macports says it's active -- but when I issue
x:~# as -v Apple Computer, Inc. version cctools-622.5.obj~13, GNU assembler version 1.38
This looks like the native assembler version. Is there a way to actually activate the port? On my Linux machines, /usr/bin/as is part of binutils:
list-files binutils | grep bin /usr/bin /usr/bin/size /usr/bin/ld /usr/bin/strip /usr/bin/ranlib /usr/bin/objdump /usr/bin/ar /usr/bin/addr2line /usr/bin/c++filt /usr/bin/nm /usr/bin/objcopy /usr/bin/gprof /usr/bin/strings /usr/bin/as /usr/bin/readelf On OSX, the binutils port doesn't include bin/as: Port binutils contains: /opt/local/bin/gaddr2line /opt/local/bin/gar /opt/local/bin/gc++filt /opt/local/bin/gnm /opt/local/bin/gobjcopy /opt/local/bin/gobjdump /opt/local/bin/granlib /opt/local/bin/greadelf /opt/local/bin/gsize /opt/local/bin/gstrings /opt/local/bin/gstrip /opt/local/i386-apple-darwin8.9.1/bin/ar /opt/local/i386-apple-darwin8.9.1/bin/nm /opt/local/i386-apple-darwin8.9.1/bin/objdump /opt/local/i386-apple-darwin8.9.1/bin/ranlib /opt/local/i386-apple-darwin8.9.1/bin/strip transcode and presumably other packages ask for bin/as. It doesn't look like it's ported? Dave
On Apr 30, 2007, at 15:13, David Liontooth wrote:
David Liontooth wrote:
I installed the binutils port (version 2.17), and macports says it's active -- but when I issue
x:~# as -v Apple Computer, Inc. version cctools-622.5.obj~13, GNU assembler version 1.38
This looks like the native assembler version. Is there a way to actually activate the port?
On my Linux machines, /usr/bin/as is part of binutils:
list-files binutils | grep bin /usr/bin /usr/bin/size /usr/bin/ld /usr/bin/strip /usr/bin/ranlib /usr/bin/objdump /usr/bin/ar /usr/bin/addr2line /usr/bin/c++filt /usr/bin/nm /usr/bin/objcopy /usr/bin/gprof /usr/bin/strings /usr/bin/as /usr/bin/readelf
On OSX, the binutils port doesn't include bin/as:
Port binutils contains: /opt/local/bin/gaddr2line /opt/local/bin/gar /opt/local/bin/gc++filt /opt/local/bin/gnm /opt/local/bin/gobjcopy /opt/local/bin/gobjdump /opt/local/bin/granlib /opt/local/bin/greadelf /opt/local/bin/gsize /opt/local/bin/gstrings /opt/local/bin/gstrip /opt/local/i386-apple-darwin8.9.1/bin/ar /opt/local/i386-apple-darwin8.9.1/bin/nm /opt/local/i386-apple-darwin8.9.1/bin/objdump /opt/local/i386-apple-darwin8.9.1/bin/ranlib /opt/local/i386-apple-darwin8.9.1/bin/strip
transcode and presumably other packages ask for bin/as. It doesn't look like it's ported?
You can read the binutils portfile yourself ("port cat binutils | less") and see that it's not doing anything special -- it's not like it's deliberately excluding gas. Upon further investigation, I see that the configure script provided with binutils simply does not build gas on Darwin (i.e. Mac OS X): *-*-darwin*) noconfigdirs="$noconfigdirs ld gas gdb gprof" noconfigdirs="$noconfigdirs sim target-rda" noconfigdirs="$noconfigdirs ${libgcj}" ;; I do not know why they do this, or whether you would get a working gas by simply taking it out of the noconfigdirs list. You could give it a try and let us know.
On May 1, 2007, at 12:18 PM, Ryan Schmidt wrote:
Upon further investigation, I see that the configure script provided with binutils simply does not build gas on Darwin (i.e. Mac OS X):
*-*-darwin*) noconfigdirs="$noconfigdirs ld gas gdb gprof" noconfigdirs="$noconfigdirs sim target-rda" noconfigdirs="$noconfigdirs ${libgcj}" ;;
I do not know why they do this, or whether you would get a working gas by simply taking it out of the noconfigdirs list. You could give it a try and let us know.
judging by the manpages, Apple uses variants of as(1)[1] very different to gnu's. (the same goes for ld(1) [2]) - gnu binutils's as/ld/... probably can't handle Mach-O binaries and/or universal binaries. [1] http://developer.apple.com/documentation/Darwin/Reference/ ManPages/man1/as.1.html [2] http://developer.apple.com/documentation/Darwin/Reference/ ManPages/man1/ld.1.html Regards, Elias Pipping
participants (3)
-
David Liontooth
-
Elias Pipping
-
Ryan Schmidt