New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #23944 (new defect)

Opened 3 years ago

Last modified 3 months ago

tbb fails to build on PowerPC

Reported by: leducvin@… Owned by: mnick@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: ppc haspatch Cc: raphael@…, ryandesign@…, egall@…
Port: tbb

Description (last modified by jmr@…) (diff)

Using MacOS 10.4.11 on ppc, with Apple gcc 4.0

$ sudo port -d install tbb
DEBUG: Found port in file:///opt/local/var/macports/sources/www.macports.org/files/ports/devel/tbb
DEBUG: Changing to port directory: /opt/local/var/macports/sources/www.macports.org/files/ports/devel/tbb
DEBUG: OS Platform: darwin
DEBUG: OS Version: 8.11.0
DEBUG: Mac OS X Version: 10.4
DEBUG: System Arch: powerpc
DEBUG: setting option os.universal_supported to yes
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: 'universal_variant no' specified, so not adding the default universal variant
DEBUG: Requested variant powerpc is not provided by port tbb.
DEBUG: Requested variant darwin is not provided by port tbb.
DEBUG: Requested variant macosx is not provided by port tbb.
--->  Computing dependencies for tbb
DEBUG: Executing org.macports.main (tbb)
DEBUG: Skipping completed org.macports.fetch (tbb)
DEBUG: Skipping completed org.macports.checksum (tbb)
DEBUG: Skipping completed org.macports.extract (tbb)
DEBUG: Skipping completed org.macports.patch (tbb)
--->  Configuring tbb
DEBUG: Using compiler 'Mac OS X gcc 4.0'
DEBUG: Executing org.macports.configure (tbb)
Error: Target org.macports.configure returned: can't read "arch_flag": no such variable
DEBUG: Backtrace: can't read "arch_flag": no such variable
    while executing
"$procedure $targetname"
Warning: the following items did not execute (for tbb): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Output included in a file (tbb-debug-output.txt) for readability.

Attachments

tbb-debug-output.txt (1.7 KB) - added by leducvin@… 3 years ago.
patch-mac32-tbb-export.def.diff (450 bytes) - added by raphael@… 3 years ago.
Portfile.diff (853 bytes) - added by raphael@… 3 years ago.
patch-macos.inc.diff (984 bytes) - added by raphael@… 3 years ago.
patch-macos.gcc.inc.diff (392 bytes) - added by raphael@… 3 years ago.

Change History

Changed 3 years ago by leducvin@…

comment:1 Changed 3 years ago by leducvin@…

  • Cc leducvin@… added

Cc Me!

comment:2 Changed 3 years ago by jmr@…

  • Keywords build failure, no such variable removed
  • Owner changed from macports-tickets@… to mnick@…
  • Cc leducvin@… removed

Please remember to preview and use WikiFormatting, and to cc the maintainer. You don't need to be in cc when you are the reporter.

comment:3 Changed 3 years ago by jmr@…

  • Keywords tiger added
  • Description modified (diff)

comment:4 Changed 3 years ago by jmr@…

  • Keywords ppc added; tiger removed

The port appears to be i386/x86_64 only.

comment:5 follow-up: ↓ 6 Changed 3 years ago by raphael@…

  • Cc raphael@… added
  • Keywords haspatch added

I can compile tbb on Mac OS X 10.5 for ppc and ppc64 with the attached patches.

Changed 3 years ago by raphael@…

comment:6 in reply to: ↑ 5 ; follow-ups: ↓ 7 ↓ 8 Changed 3 years ago by leducvin@…

Replying to raphael@…:

I can compile tbb on Mac OS X 10.5 for ppc and ppc64 with the attached patches.

Thank you for the patches. Most likely they work, but for some strange reason after applying them, macports is spitting out stuff about using gcc 4.2, while originally it was saying it was using gcc 4.0. I do have both installed.

DEBUG: Found port in file:///opt/local/var/macports/sources/www.macports.org/files/ports/devel/tbb
DEBUG: Changing to port directory: /opt/local/var/macports/sources/www.macports.org/files/ports/devel/tbb
DEBUG: OS Platform: darwin
DEBUG: OS Version: 8.11.0
DEBUG: Mac OS X Version: 10.4
DEBUG: System Arch: powerpc
DEBUG: setting option os.universal_supported to yes
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/www.macports.org/files/ports/_resources/port1.0/variant_descriptions.conf
DEBUG: 'universal_variant no' specified, so not adding the default universal variant
DEBUG: Requested variant powerpc is not provided by port tbb.
DEBUG: Requested variant darwin is not provided by port tbb.
DEBUG: Requested variant macosx is not provided by port tbb.
DEBUG: Executing variant darwin_powerpc provides darwin_powerpc
--->  Computing dependencies for tbb
DEBUG: Executing org.macports.main (tbb)
DEBUG: Skipping completed org.macports.fetch (tbb)
DEBUG: Skipping completed org.macports.checksum (tbb)
DEBUG: Skipping completed org.macports.extract (tbb)
DEBUG: Skipping completed org.macports.patch (tbb)
DEBUG: Skipping completed org.macports.configure (tbb)
--->  Building tbb
DEBUG: Executing org.macports.build (tbb)
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.4'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_www.macports.org_files_ports_devel_tbb/work/tbb22_20090809oss" && /usr/bin/make -j3 tbb tbbmalloc'
cd "./build/macos_ppc64_gcc_cc4.4.2_os10.4.11_release" && sh ../../build/generate_tbbvars.sh macos_ppc64_gcc_cc4.4.2_os10.4.11_release
cd "./build/macos_ppc64_gcc_cc4.4.2_os10.4.11_debug" && sh ../../build/generate_tbbvars.sh macos_ppc64_gcc_cc4.4.2_os10.4.11_debug
/usr/bin/make -C "./build/macos_ppc64_gcc_cc4.4.2_os10.4.11_debug"  -r -f ../../build/Makefile.tbb cfg=debug tbb_root=../..
../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=ppc64 compiler=gcc os=macos runtime=cc4.4.2_os10.4.11
g++ -c -MMD -g -O0 -DTBB_USE_DEBUG -DUSE_PTHREAD -arch ppc64 -fPIC -D__TBB_BUILD=1 -Wall   -I../../src -I../../include ../../src/tbb/concurrent_hash_map.cpp
g++ -c -MMD -g -O0 -DTBB_USE_DEBUG -DUSE_PTHREAD -arch ppc64 -fPIC -D__TBB_BUILD=1 -Wall   -I../../src -I../../include ../../src/tbb/concurrent_queue.cpp
g++ -c -MMD -g -O0 -DTBB_USE_DEBUG -DUSE_PTHREAD -arch ppc64 -fPIC -D__TBB_BUILD=1 -Wall   -I../../src -I../../include ../../src/tbb/concurrent_vector.cpp
cc1plus: error: unrecognized command line option "-arch"
cc1plus: error: unrecognized command line option "-arch"
cc1plus: error: unrecognized command line option "-arch"
make[1]: *** [concurrent_hash_map.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [concurrent_vector.o] Error 1
make[1]: *** [concurrent_queue.o] Error 1
make: *** [tbb] Error 2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_www.macports.org_files_ports_devel_tbb/work/tbb22_20090809oss" && /usr/bin/make -j3 tbb tbbmalloc " returned error 2
DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_www.macports.org_files_ports_devel_tbb/work/tbb22_20090809oss" && /usr/bin/make -j3 tbb tbbmalloc " returned error 2
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 9)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for tbb): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

This seems to be the problem :

cc1plus: error: unrecognized command line option "-arch"

I think macports is using a GNU project gcc (that I installed with macports), not Apple's gcc, which is why the "arch" flag is not recognized. I tried using gcc_select, but it only lets me select between various GNU gcc versions, never Apple's gcc. This probably has nothing to do with the port itself, but any pointers on how to fix this would help greatly. Thanks.

PS sorry about the unnecessary cc.

comment:7 in reply to: ↑ 6 Changed 3 years ago by leducvin@…

Also, I noticed it has wrongly selected ppc64 :

../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=ppc64 compiler=gcc os=macos runtime=cc4.4.2_os10.4.11

comment:8 in reply to: ↑ 6 ; follow-up: ↓ 9 Changed 3 years ago by raphael@…

Replying to leducvin@…:

I think macports is using a GNU project gcc (that I installed with macports), not Apple's gcc, which is why the "arch" flag is not recognized. I tried using gcc_select, but it only lets me select between various GNU gcc versions, never Apple's gcc.

I modified the attached patches so that the port always uses /usr/bin/gcc and /usr/bin/g++. I hope these patches fix your problems.

Changed 3 years ago by raphael@…

Changed 3 years ago by raphael@…

Changed 3 years ago by raphael@…

comment:9 in reply to: ↑ 8 Changed 3 years ago by ryandesign@…

  • Cc ryandesign@… added
  • Summary changed from tbb 2.2-20090809 Build failure with "no such variable" to tbb: "no such variable" on PowerPC

Replying to raphael@…:

I modified the attached patches so that the port always uses /usr/bin/gcc and /usr/bin/g++. I hope these patches fix your problems.

It really needs to be using the values of the variables ${configure.cc} and ${configure.cxx}.

comment:10 in reply to: ↑ description Changed 3 years ago by ryandesign@…

Replying to leducvin@…:

Error: Target org.macports.configure returned: can't read "arch_flag": no such variable

This was fixed in r71975.

Replying to ryandesign@…:

It really needs to be using the values of the variables ${configure.cc} and ${configure.cxx}.

This was fixed in r71980.

comment:11 Changed 2 years ago by jmr@…

  • Summary changed from tbb: "no such variable" on PowerPC to tbb fails to build on PowerPC

comment:12 Changed 3 months ago by egall@…

There's a proposal to add a +universal variant to tbb in #37320, but I'm assuming that this would have to be fixed first before that can go through, right?

Edit: nvm

Last edited 3 months ago by egall@… (previous) (diff)

comment:13 Changed 3 months ago by egall@…

  • Cc egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.