Opened 15 years ago

Last modified 3 years ago

#23944 assigned defect

tbb fails to build on PowerPC

Reported by: leducvin@… Owned by:
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: powerpc haspatch Cc: raphael-st (Raphael Straub), ryandesign (Ryan Carsten Schmidt), cooljeanius (Eric Gallager)
Port: tbb

Description (last modified by jmroot (Joshua Root))

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 (7)

tbb-debug-output.txt (1.7 KB) - added by leducvin@… 15 years ago.
patch-mac32-tbb-export.def.diff (450 bytes) - added by raphael-st (Raphael Straub) 15 years ago.
Portfile.diff (853 bytes) - added by raphael-st (Raphael Straub) 15 years ago.
patch-macos.inc.diff (984 bytes) - added by raphael-st (Raphael Straub) 15 years ago.
patch-macos.gcc.inc.diff (392 bytes) - added by raphael-st (Raphael Straub) 15 years ago.
patch-tbb-older-malloc.diff (1.2 KB) - added by barracuda156 3 years ago.
A slight modification that makes TBB build on PPC
Tiger_main.log (35.5 KB) - added by barracuda156 3 years ago.
Tiger still fails though.

Download all attachments as: .zip

Change History (26)

Changed 15 years ago by leducvin@…

Attachment: tbb-debug-output.txt added

comment:1 Changed 15 years ago by leducvin@…

Cc: leducvin@… added

Cc Me!

comment:2 Changed 15 years ago by jmroot (Joshua Root)

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

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 15 years ago by jmroot (Joshua Root)

Description: modified (diff)
Keywords: tiger added

comment:4 Changed 15 years ago by jmroot (Joshua Root)

Keywords: ppc added; tiger removed

The port appears to be i386/x86_64 only.

comment:5 Changed 15 years ago by raphael-st (Raphael Straub)

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 15 years ago by raphael-st (Raphael Straub)

comment:6 in reply to:  5 ; Changed 15 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 15 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 ; Changed 15 years ago by raphael-st (Raphael Straub)

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 15 years ago by raphael-st (Raphael Straub)

Attachment: Portfile.diff added

Changed 15 years ago by raphael-st (Raphael Straub)

Attachment: patch-macos.inc.diff added

Changed 15 years ago by raphael-st (Raphael Straub)

Attachment: patch-macos.gcc.inc.diff added

comment:9 in reply to:  8 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Summary: tbb 2.2-20090809 Build failure with "no such variable"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 14 years ago by ryandesign (Ryan Carsten Schmidt)

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 14 years ago by jmroot (Joshua Root)

Summary: tbb: "no such variable" on PowerPCtbb fails to build on PowerPC

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

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 12 years ago by cooljeanius (Eric Gallager) (previous) (diff)

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

Cc: egall@… added

Cc Me!

comment:14 Changed 11 years ago by mf2k (Frank Schima)

Owner: changed from mnick@… to macports-tickets@…

mnick has retired.

comment:15 Changed 10 years ago by mf2k (Frank Schima)

Keywords: powerpc added; ppc removed

Unify powerpc keywords.

comment:16 Changed 10 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to sean@…

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

Owner: sean@… deleted
Status: newassigned

Changed 3 years ago by barracuda156

Attachment: patch-tbb-older-malloc.diff added

A slight modification that makes TBB build on PPC

comment:18 Changed 3 years ago by barracuda156

After blacklisting clang in Portfile and making above change in the patch, TBB has built through completion. (I do not guarantee it works at the moment.)

comment:19 Changed 3 years ago by barracuda156

On Tiger tbb fails:

In file included from ../../src/tbbmalloc/proxy.cpp:163:
../../src/tbbmalloc/proxy_overload_osx.h: In constructor 'DoMallocReplacement::DoMallocReplacement()':
../../src/tbbmalloc/proxy_overload_osx.h:137: error: 'struct malloc_introspection_t' has no member named 'zone_locked'
../../src/tbbmalloc/proxy_overload_osx.h:153: error: 'struct malloc_zone_t' has no member named 'memalign'
../../src/tbbmalloc/proxy_overload_osx.h:154: error: 'struct malloc_zone_t' has no member named 'free_definite_size'
../../src/tbbmalloc/proxy_overload_osx.h:159: error: 'malloc_default_purgeable_zone' was not declared in this scope
../../src/tbbmalloc/proxy_overload_osx.h: At global scope:
../../src/tbbmalloc/proxy_overload_osx.h:84: warning: 'boolean_t impl_zone_enable_discharge_checking(malloc_zone_t*)' defined but not used
../../src/tbbmalloc/proxy_overload_osx.h:89: warning: 'void impl_zone_disable_discharge_checking(malloc_zone_t*)' defined but not used
../../src/tbbmalloc/proxy_overload_osx.h:90: warning: 'void impl_zone_discharge(malloc_zone_t*, void*)' defined but not used
../../src/tbbmalloc/proxy_overload_osx.h:115: warning: 'size_t impl_pressure_relief(_malloc_zone_t*, size_t)' defined but not used
make[1]: *** [proxy.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_tbb/tbb/work/oneapi-src-oneTBB-eca91f1/build/macports_release'
make: *** [tbbmalloc] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_tbb/tbb/work/oneapi-src-oneTBB-eca91f1'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_tbb/tbb/work/tbb-2020.3" && /usr/bin/make -j1 -w tbb tbbmalloc tbbproxy compiler=gcc stdlib=libstdc++ tbb_build_prefix=macports use_proxy=1 arch=ppc32 
Exit code: 2

And the patch above does not help.

Last edited 3 years ago by barracuda156 (previous) (diff)

Changed 3 years ago by barracuda156

Attachment: Tiger_main.log added

Tiger still fails though.

Note: See TracTickets for help on using tickets.