Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#50146 closed defect (fixed)

p7zip @15.09 won't compile on PPC Leopard, Mac OS X 10.5.8, because of missing /usr/bin/llvm-gcc

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: stuartwesterman (Stuart Westerman)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: haspatch Cc: Schamschula (Marius Schamschula), khepler, kurthindenburg (Kurt Hindenburg)
Port: p7zip

Description

:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_archivers_p7zip/p7zip/work/p7zip_15.09" && /usr/bin/make -w all3'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_archivers_p7zip/p7zip/work/p7zip_15.09" && /usr/bin/make -w all3 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_mports_trunk_dports_archivers_p7zip/p7zip/work/p7zip_15.09'
:info:build mkdir -p bin
:info:build /usr/bin/make -C CPP/7zip/Bundles/Alone all
:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_mports_trunk_dports_archivers_p7zip/p7zip/work/p7zip_15.09/CPP/7zip/Bundles/Alone'
:info:build /usr/bin/llvm-gcc -c -I. -I../../../../C -I../../../myWindows -I../../../include_windows -I../../.. -m64 -O -DENV_MACOSX -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -DENV_UNIX -arch ppc  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -DENV_UNIX -DBREAK_HANDLER -DUNICODE -D_UNICODE -DUNIX_USE_WIN_FILE   ../../../../C/7zCrc.c
:info:build make[1]: /usr/bin/llvm-gcc: Command not found
:info:build make[1]: *** [7zCrc.o] Error 127
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_mports_trunk_dports_archivers_p7zip/p7zip/work/p7zip_15.09/CPP/7zip/Bundles/Alone'
:info:build make: *** [7za] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_mports_trunk_dports_archivers_p7zip/p7zip/work/p7zip_15.09'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_archivers_p7zip/p7zip/work/p7zip_15.09" && /usr/bin/make -w all3 
:info:build Exit code: 2
:error:build Failed to build p7zip: command execution failed
:debug:build Error code: CHILDSTATUS 49214 2

I have:

lrwxr-xr-x 1 root wheel      7  2. Dez 2013  /usr/bin/gcc -> gcc-4.2
-rwxr-xr-x 1 root wheel  93088  5. Feb 2009  /usr/bin/gcc-4.0
-rwxr-xr-x 1 root wheel 105680  7. Jul 2009  /usr/bin/gcc-4.2
-rwxr-xr-x 1 root wheel 369408  5. Feb 2009  /usr/bin/i686-apple-darwin9-gcc-4.0.1
-rwxr-xr-x 1 root wheel 505120  7. Jul 2009  /usr/bin/i686-apple-darwin9-gcc-4.2.1
-rwxr-xr-x 1 root wheel 369408  5. Feb 2009  /usr/bin/powerpc-apple-darwin9-gcc-4.0.1
-rwxr-xr-x 1 root wheel 513344  7. Jul 2009  /usr/bin/powerpc-apple-darwin9-gcc-4.2.1

-rwxr-xr-x 1 root admin     32 17. Jan 2013  /Developer/usr/bin/llvm-gcc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
lrwxr-xr-x 1 root admin     32 17. Jan 2013  /Developer/usr/bin/llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
-rwxrwxr-x 1 root admin 109808 24. Mär 2009  /Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2

Attachments (2)

main.log (11.5 KB) - added by ballapete (Peter "Pete" Dyballa) 9 years ago.
main.log
Portfile.diff (1.5 KB) - added by khepler 9 years ago.
use the right compiler (corrected)

Download all attachments as: .zip

Change History (16)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

p7zip is evidently using a hard coded compiler. It should be changed to be UsingTheRightCompiler.

Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

main.log

comment:2 Changed 9 years ago by Schamschula (Marius Schamschula)

Cc: mschamschula@… added

Cc Me!

comment:3 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

I created a sym-link /usr/bin/llvm-gcc -> /Developer/usr/bin/llvm-gcc-4.2 (ans also /usr/bin/llvm-gcc -> /Developer/usr/bin/llvm-gcc-4.2) which allowed me to have it built. /usr/bin now has these llvm, gcc, and g++ related sym-links and files:

lrwxr-xr-x  1 root   wheel            7  2 Dez  2013 cc -> gcc-4.2
lrwxr-xr-x  1 root   wheel            7  2 Dez  2013 g++ -> g++-4.2
-rwxr-xr-x  1 root   wheel        93088  5 Feb  2009 g++-4.0
-rwxr-xr-x  1 root   wheel       105680  7 Jul  2009 g++-4.2
lrwxr-xr-x  1 root   wheel            7  2 Dez  2013 gcc -> gcc-4.2
-rwxr-xr-x  1 root   wheel        93088  5 Feb  2009 gcc-4.0
-rwxr-xr-x  1 root   wheel       105680  7 Jul  2009 gcc-4.2
-rwxr-xr-x  1 root   wheel       373504  5 Feb  2009 i686-apple-darwin9-g++-4.0.1
-rwxr-xr-x  1 root   wheel       513344  7 Jul  2009 i686-apple-darwin9-g++-4.2.1
-rwxr-xr-x  1 root   wheel       369408  5 Feb  2009 i686-apple-darwin9-gcc-4.0.1
-rwxr-xr-x  1 root   wheel       505120  7 Jul  2009 i686-apple-darwin9-gcc-4.2.1
lrwxr-xr-x  1 root   wheel           31  2 Jan 14:39 llvm-g++ -> /Developer/usr/bin/llvm-g++-4.2
lrwxr-xr-x  1 root   wheel           31  2 Jan 14:39 llvm-gcc -> /Developer/usr/bin/llvm-gcc-4.2
-rwxr-xr-x  1 root   wheel       377616  5 Feb  2009 powerpc-apple-darwin9-g++-4.0.1
-rwxr-xr-x  1 root   wheel       513344  7 Jul  2009 powerpc-apple-darwin9-g++-4.2.1
-rwxr-xr-x  1 root   wheel       369408  5 Feb  2009 powerpc-apple-darwin9-gcc-4.0.1
-rwxr-xr-x  1 root   wheel       513344  7 Jul  2009 powerpc-apple-darwin9-gcc-4.2.1

Is port select --set gcc also manipulating these files, particularly when it sets apple-gcc42?

comment:4 Changed 9 years ago by khepler

When ticket #49788 was applied, the Portfile switched from using makefile.macosx_32bits to makefile.macosx_llvm_64bits. That defeated the compiler override, which means right now no architecture is using the "right" compiler.

Attaching a cross-platform patch.

comment:5 Changed 9 years ago by khepler

Cc: khepler@… added

Cc Me!

Changed 9 years ago by khepler

Attachment: Portfile.diff added

use the right compiler (corrected)

comment:6 Changed 9 years ago by mf2k (Frank Schima)

Cc: stuartwesterman@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to stuartwesterman@…

comment:7 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:8 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Resolution: fixed
Status: newclosed

Thanks - your patch didn't apply cleanly but I think I got it correct. reopen if there are still issues.

r145156

comment:9 Changed 9 years ago by khepler

Builds on Leopard/PPC.

What was wrong with the patch?

comment:10 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

It didn't apply cleanly - not sure if you were using an old Portfile or what.

comment:11 Changed 9 years ago by khepler

Ah, looks like the Portfile was updated half an hour after I submitted the patch.

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

This change adds unnecessary complexity and introduces some regressions.

  • The makefile is being selected based on build_arch, which is incorrect in the case of a universal build. It was correct before because the -m64 was stripped out and our own archflags added.
  • makefile.macosx_gcc_64bits has no significant differences from makefile.macosx_llvm_64bits.
  • The only significant difference in makefile.macosx_gcc_32bits_ppc is that it has a hardcoded -mmacosx-version-min=10.4, which is wrong.
  • makefile.macosx_gcc_32bits_asm also has the hardcoded -mmacosx-version-min=10.4.
  • It also adds an undeclared dependency on nasm.
  • The one possibly useful bit is enabling asm on i386. But this should only be done when i386 is the only arch being built for.

comment:13 Changed 9 years ago by khepler

You are correct; the Portfile half an hour newer than my patch probably would work fine and is certainly simpler.

What does build_arch look like in universal build?

comment:14 in reply to:  13 Changed 9 years ago by jmroot (Joshua Root)

Replying to khepler@…:

You are correct; the Portfile half an hour newer than my patch probably would work fine and is certainly simpler.

Reverted in r145182. If anyone wants to enable asm for i386, please open a new ticket for that.

What does build_arch look like in universal build?

It's always the value that is set in macports.conf. It's not used in universal builds though, universal_archs is.

Anyway, this ticket is resolved now, so we should take further discussion elsewhere.

Note: See TracTickets for help on using tickets.