[MacPorts] #49764: babl @0.1.14 should not require clang-3.4

MacPorts noreply at macports.org
Tue Nov 24 15:06:12 PST 2015


#49764: babl @0.1.14 should not require clang-3.4
--------------------------+----------------------
  Reporter:  braumann@…   |      Owner:  devans@…
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  powerpc
      Port:  babl         |
--------------------------+----------------------

Comment (by braumann@…):

 Replying to [comment:8 jeremyhu@…]:
 > ...
 > I believe clang-3.4 should be usable for compiling C code for
 darwin/ppc.
 > ...

 I have made some tests.

 I called this one-liner on my 10.5.8 PPC:

 {{{
 $ printf '#include<stdio.h> \n int main(void) {fprintf(stderr,"Hello,
 world\\n");}' | clang-mp-3.4 -arch ppc -xc -o out.exe -
 }}}
 unfortunately leads to
 {{{
 clang(65051) malloc: *** error for object 0xa082a708: Non-aligned pointer
 being freed
 *** set a breakpoint in malloc_error_break to debug
 ...
 MORE THAN 100 REPETITIONS OF SIMILAR ERROR MESSAGES FOLLOW
 ...
 ld: absolute address to symbol ___stderrp in a different linkage unit not
 supported in _main from
 /var/folders/fH/fHv2DgyLHvS8wcc5wmXwHU+++TM/-Tmp-/--d552c5.o
 collect2: ld returned 1 exit status
 clang: error: linker (via gcc) command failed with exit code 1 (use -v to
 see invocation)
 }}}

 However, calling
 {{{
 $ printf '#include<stdio.h> \n int main(void) {fprintf(stderr,"Hello,
 world\\n");}' | clang-mp-3.4 -arch i386 -xc -o out.exe -
 }}}

 I get a less repetition of "Non-aligned pointer being freed" message:

 {{{
 clang(65075) malloc: *** error for object 0xa082a708: Non-aligned pointer
 being freed
 *** set a breakpoint in malloc_error_break to debug
 ...
 ONLY ABOUT 20 REPETITIONS OF THIS ERROR FOLLOW
 ...
 }}}

 Anyway, this time with the i386 architecture switch an executable out.exe
 is being produced using mp-clang-3.4 on 10.5.8 32bit PPC, which can be
 transferred to a 10.6.8 x86_64 platform, where "Hello, world" is being
 printed when out.exe is executed.

 Looking from the other side, calling

 {{{
 $ printf '#include<stdio.h> \n int main(void) {fprintf(stderr,"Hello,
 world\\n");}' | clang-mp-3.4 -arch ppc -xc -o out.exe -
 }}}

 on a 10.6.8 x86_64 the following error is returned complaining about a
 missing assembler (no idea how to install it):

 {{{
 /usr/llvm-gcc-4.2/bin/../libexec/gcc/powerpc-apple-darwin10/4.2.1/as:
 assembler (/usr/bin/../libexec/as/ppc/as or
 /usr/bin/../local/libexec/as/ppc/as) for architecture ppc not installed
 Installed assemblers are:
 /usr/bin/../libexec/as/x86_64/as for architecture x86_64
 /usr/bin/../libexec/as/i386/as for architecture i386
 /usr/bin/../libexec/as/arm/as for architecture arm
 clang: error: assembler (via gcc) command failed with exit code 1 (use -v
 to see invocation)
 }}}

 Anyway, this works on 10.6.8:

 {{{
 $ printf '#include<stdio.h> \n int main(void) {fprintf(stderr,"Hello,
 world\\n");}' | clang-mp-3.4 -arch i386 -xc -o out.exe -
 }}}
 and
 {{{
 $ printf '#include<stdio.h> \n int main(void) {fprintf(stderr,"Hello,
 world\\n");}' | clang-mp-3.4 -arch x86_64 -xc -o out.exe -
 }}}
 {{{
 $ ./out.exe
 Hello, world
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/49764#comment:10>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list