Bug 426251

Summary: Review Request: tbb - the library that abstracts low-level threading details
Product: [Fedora] Fedora Reporter: Petr Machata <pmachata>
Component: Package ReviewAssignee: Mamoru TASAKA <mtasaka>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: cz172638, fedora-package-review, mnewsome, mtasaka, notting, orion
Target Milestone: ---Flags: mtasaka: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-13 18:20:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Machata 2007-12-19 16:20:31 UTC
Spec URL: http://people.redhat.com/pmachata/tbb/tbb.spec
SRPM URL: http://people.redhat.com/pmachata/tbb/tbb-2.0-1.20070927.fc8.src.rpm
Description:
Threading Building Blocks (TBB) is a C++ runtime
library that abstracts the low-level threading details necessary for
optimal multi-core performance. It uses common C++ templates and
coding style to eliminate tedious threading implementation work.

TBB requires fewer lines of code to achieve parallelism than other
threading models. The applications you write are portable across
platforms. Since the library is also inherently scalable, no code
maintenance is required as more processor cores become available.

Comment 1 Petr Machata 2007-12-19 16:34:52 UTC
rpmlint warns that the devel subpackage doesn't contain any documentation.  The
available documentation is made up from four rather hefty pdf files, so I
decided to put it into the subpackage of its own (tbb-doc).

Also note that I install the doc files under their original names, that are
basically a series of numbers, and only symlink them with human readable names.
I'm pointing this out because the intuitive urge to preserve original filenames
may well be just my own; will appreciate any feedback on this topic.

Comment 2 Dan HorĂ¡k 2007-12-19 17:44:15 UTC
The URL tag looks a bit strange - http://flex.sf.net

And I agree with the solution you have chosen for the doc files. It is easy both
to find what is where and to check e.g. for new versions on the Intel site under
its original name.

Comment 3 Petr Machata 2007-12-19 19:13:06 UTC
(In reply to comment #2)
> The URL tag looks a bit strange
Ouch, that must have been this famous cut'n'paste problem :)

Updated spec is on original address.  I also added two more patches that fix
build issues (parallelism & trivial testsuite compilation problem).


Comment 4 Mamoru TASAKA 2008-01-30 18:39:56 UTC
Doesn't build.
http://koji.fedoraproject.org/koji/taskinfo?taskID=384728

- Source must be given with full URL
- Please bump release number every time you modify your spec file
  to avoid confusion.
- Now we recommend %defattr(-,root,root,-)
- Doesn't this support ppc/ppc64 archs?

Comment 5 Petr Machata 2008-02-08 17:13:03 UTC
(In reply to comment #4)
> Doesn't build.
> http://koji.fedoraproject.org/koji/taskinfo?taskID=384728
Problems with GCC 4.3.  Release 2 of tbb package contains a patch that fixes the
syntactic part of the build problem; and does the build in debug mode, to work
around the semantic part of the build problem.  I'm communicating with upstream
to provide definitive solution to issues with GCC 4.3.
http://koji.fedoraproject.org/koji/taskinfo?taskID=403569

> - Source must be given with full URL
Fixed.

> - Please bump release number every time you modify your spec file
>   to avoid confusion.
Done.

> - Now we recommend %defattr(-,root,root,-)
Fixed.

> - Doesn't this support ppc/ppc64 archs?
No, it doesn't.  Per upstream report they are working on that, but are not quite
there yet.

Comment 7 Mamoru TASAKA 2008-02-09 16:31:51 UTC
For 2.0-2.20070927:

* no-ldconfig-symlink
  - From rpmlint *rpm:
------------------------------------------------------------
tbb.i386: E: no-ldconfig-symlink /usr/lib/libtbbmalloc.so.2.0
tbb.i386: E: no-ldconfig-symlink /usr/lib/libtbb.so.2.0
------------------------------------------------------------
    This is because the symlink name does not match the SONAME
    of the library it points to.
------------------------------------------------------------
$ objdump --headers --private-headers libtbb.so.2.0 | grep SONAME
  SONAME      libtbb_debug.so.2
------------------------------------------------------------
    and this is because from build.log:
------------------------------------------------------------
   100  g++  concurrent_hash_map.o concurrent_queue.o concurrent_vector.o
itt_notify.o cache_aligned_allocator.o pipeline.o queuing_mutex.o
queuing_rw_mutex.o spin_rw_mutex.o spin_mutex.o task.o tbb_misc.o mutex.o   
-lpthread -lrt -ldl  -fPIC -o libtbb_debug.so.2.0.014 -shared -m32
-Wl,-soname=libtbb_debug.so.2
   310  + install -D -m 755 libtbb_debug.so
/var/tmp/tbb-2.0-2.20070927.fc9-root-mockbuild//usr/lib/libtbb.so.2.0
   311  + ln -s libtbb.so.2.0
/var/tmp/tbb-2.0-2.20070927.fc9-root-mockbuild//usr/lib/libtbb.so.2
------------------------------------------------------------
    you have to actually change the soname of the library.

* Compilation flags
  - Fedora specific compilation flags are not correctly honored.
------------------------------------------------------------
    58  make[1]: Entering directory
`/builddir/build/BUILD/tbb20_20070927oss_src/build/obj_debug'
    59  ../../build/Makefile.tbb:38: CONFIG: cfg=debug arch=ia32 compiler=gcc
os=linux runtime=cc4.3.0_libc2.7.90_ker
nel2.6.18
    60  g++  -c -MMD -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-siz
e=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DTBB_DO_ASSERT
-DDO_ITT_NOTIFY -DUSE_PTHREAD -g -O0
 -m32 -fPIC -Wall -Werror -I../../src/tbb -I../../include -I../../src
../../src/tbb/concurrent_hash_map.cpp
------------------------------------------------------------
     Here the compilation flag "-O2" is replaced by the latter "-O0" flag.

* Timestamps
  - When using "cp" or "install" commands, please add "-p" option
    to keep timestamps on installed files.


Comment 8 Petr Machata 2008-02-11 17:31:42 UTC
(In reply to comment #7)
> * no-ldconfig-symlink

Good catch, I didn't realize this would happen.  It's fixed now.

> * Compilation flags

I can't give up on -O0, because anything above that screws the build.  (I.e.
either triggers a bug in gcc, or an undefined behavior in tbb, not sure who the
culprit is here).  When upstream have their GCC 4.3 support ready, I'll turn the
optimizations back on, i.e. will do the release build instead of the debug
build.  I made a note about this in the spec file.

> * Timestamps
>   - When using "cp" or "install" commands, please add "-p" option
>     to keep timestamps on installed files.

Fixed.

New sources:
http://people.redhat.com/pmachata/tbb/tbb.spec
http://people.redhat.com/pmachata/tbb/tbb-2.0-3.20070927.fc8.src.rpm

Comment 9 Petr Machata 2008-02-11 19:08:23 UTC
In case you need to inspect logs, this is the koji task for last spec iteration:
http://koji.fedoraproject.org/koji/taskinfo?taskID=416087

Comment 10 Mamoru TASAKA 2008-02-12 15:21:53 UTC
For 2.0-3:

* SourceURL
  - The correct one seems:
    http://threadingbuildingblocks.org/uploads/77/84/2.0/%{sourcefilename}
                                                 ^^^^^

* Timestamps
  - Please also change the following line (-p option needed)
-----------------------------------------------------------
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
-----------------------------------------------------------

Other things are okay.
-----------------------------------------------------------
   This package (tbb) is APPROVED by me
------------------------------------------------------------

Comment 11 Petr Machata 2008-02-13 11:50:31 UTC
(In reply to comment #10)
> * SourceURL

Actually both of them are, upstream probably updated the link shortly after I
fetched the sources.  The old one is still active, but I updated the link to
newer version as you suggest.

> * Timestamps

Fixed.

> Other things are okay.

Thanks!

Comment 12 Petr Machata 2008-02-13 11:53:27 UTC
New Package CVS Request
=======================
Package Name: tbb
Short Description: the library that abstracts low-level threading details
Owners: pmachata
Branches: F-8
InitialCC: 
Cvsextras Commits: yes

Comment 13 Kevin Fenzi 2008-02-13 17:31:17 UTC
cvs done.

Comment 14 Petr Machata 2008-02-13 18:20:20 UTC
initial build complete:
http://koji.fedoraproject.org/koji/taskinfo?taskID=423994

thanks everyone!

Comment 15 Orion Poplawski 2010-07-19 22:24:38 UTC
I would like to see this in EPEL 6.  Can maintain there if needed.

Comment 16 Orion Poplawski 2010-08-11 23:36:56 UTC
Package Change Request
======================
Package Name: tbb
New Branches: EL6 EL5
Owners: orion
InitialCC:

Comment 17 Petr Machata 2010-08-12 14:36:26 UTC
Sure, go ahead. As you have, I see :)
(Was OOO a couple weeks, is why I'm only answering now.)

Comment 18 Jason Tibbitts 2010-08-12 14:50:28 UTC
Git done (by process-git-requests).

Comment 19 Jiri Kastner 2015-04-30 20:21:25 UTC
Package Change Request
======================
Package Name: tbb
New Branches: el6
Owners: jkastner pmachata
InitialCC:

Comment 20 Gwyn Ciesla 2015-05-01 11:11:39 UTC
tbb is in RHEL as of 6.4.