Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366881 - Review Request: ispc - C-based SPMD programming language compiler
Summary: Review Request: ispc - C-based SPMD programming language compiler
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Igor Gnatenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1364618
TreeView+ depends on / blocked
 
Reported: 2016-08-14 03:14 UTC by Luya Tshimbalanga
Modified: 2016-09-04 00:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-31 16:29:24 UTC
ignatenko: fedora-review+


Attachments (Terms of Use)
patch form makefile (deleted)
2016-08-20 18:03 UTC, Luya Tshimbalanga
no flags Details | Diff

Description Luya Tshimbalanga 2016-08-14 03:14:56 UTC
Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-1.fc24.src.rpm
Description: A compiler for a variant of the C programming language, with extensions for "single program, multiple data" (SPMD) programming
Fedora Account System Username: luya

Comment 1 Igor Gnatenko 2016-08-14 08:09:09 UTC
> # Actual source is https://codeload.github.com/ispc/ispc/tar.gz/v1.9.1
> # Due to github structure, use that name below for compilation
> Source0:	https://github.com/ispc/ispc/archive/%{name}-%{version}.tar.gz 
Source0: https://github.com/ispc/ispc/archive/v%{version}/%{name}-%{version}.tar.gz

> install -m 755 -d %{buildroot}/%{_bindir}
> cp -p %{name} %{buildroot}/%{_bindir}
install -Dpm0755 %{name} %{buildroot}%{_bindir}/%{name}

> BuildRequires:	flex-devel https://codeload.github.com/ispc/ispc/tar.gz/v1.9.1
that something strange

> BuildRequires:	bison-devel
I don't think you really need devel subpkg of bison and flex, I think main pkg should be enough

* Missing BuildRequires: gcc-c++
* Missing BuildRequires: make
* CFLAGS and LDFLAGS are not enforced
-> I think %make_build OPT="%{optflags}" LDFLAGS="%{__global_ldflags}" should fix problem

I didn't check other stuff yet due to problems above.

Comment 2 Luya Tshimbalanga 2016-08-14 15:43:48 UTC
(In reply to Igor Gnatenko from comment #1)
> Source0:
> https://github.com/ispc/ispc/archive/v%{version}/%{name}-%{version}.tar.gz

Thanks. That line is updated.

> 
> > install -m 755 -d %{buildroot}/%{_bindir}
> > cp -p %{name} %{buildroot}/%{_bindir}
> install -Dpm0755 %{name} %{buildroot}%{_bindir}/%{name}

Fixed and noted.

 
> > BuildRequires:	flex-devel https://codeload.github.com/ispc/ispc/tar.gz/v1.9.1
> that something strange
Oops!That was an oversight where accidentally pressed middle button mouse. The url is now removed.


> > BuildRequires:	bison-devel
> I don't think you really need devel subpkg of bison and flex, I think main
> pkg should be enough
Devel subpkg replaced by their main packages.


> * Missing BuildRequires: gcc-c++
> * Missing BuildRequires: make
> * CFLAGS and LDFLAGS are not enforced
> -> I think %make_build OPT="%{optflags}" LDFLAGS="%{__global_ldflags}"
> should fix problem
%{optflag} part failed to build so I only use LDFLAGS. Missing BuildRequires gcc-c++ and make added.

Here is the updated
Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-2.fc24.src.rpm

Comment 3 Igor Gnatenko 2016-08-14 16:05:25 UTC
> %{buildroot}/%{_bindir}/%{name}
%{buildroot}%{_bindir}/%{name}

> BuildRequires:	ncurses
there should be something wrong (or you need -devel subpkg of it or you most likely not need it)

> BuildRequires:	clang-devel
does it really require clang-devel for building?

* Still CFLAGS are ignored

Comment 4 Luya Tshimbalanga 2016-08-14 17:26:00 UTC
(In reply to Igor Gnatenko from comment #3)
> > %{buildroot}/%{_bindir}/%{name}
> %{buildroot}%{_bindir}/%{name}

Fixed.

> > BuildRequires:	ncurses
> there should be something wrong (or you need -devel subpkg of it or you most
> likely not need it)
It turned out according to this scratch build
http://koji.fedoraproject.org/koji/watchlogs?taskID=15256857
Added -devel subpkg
 
> > BuildRequires:	clang-devel
> does it really require clang-devel for building?
This scratch build suggested it otherwise it will fail
http://koji.fedoraproject.org/koji/watchlogs?taskID=15256820

> * Still CFLAGS are ignored
Added on the spec

I noticed koji will not properly build SRPM because of missing glibc-devel i686 which needs to be manually installed. I don't know how pull it within the spec file.
http://koji.fedoraproject.org/koji/watchlogs?taskID=15256962
See https://github.com/ispc/ispc/wiki/Building-ispc:-Linux-and-Mac-OS-X

Here is the updated 
Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-3.fc24.src.rpm

Comment 5 Zbigniew Jędrzejewski-Szmek 2016-08-14 19:42:57 UTC
The trick is to require some file which is only provided by glibc-devel.i686. E.g. BuildRequires: /usr/lib/crt1.o.

Comment 6 Luya Tshimbalanga 2016-08-14 21:29:01 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #5)
> The trick is to require some file which is only provided by
> glibc-devel.i686. E.g. BuildRequires: /usr/lib/crt1.o.

Now koji complains about missing
/usr/include/gnu/stubs.h:10:11: fatal error: 'gnu/stubs-64.h' file not found
on x86 architectures

http://koji.fedoraproject.org/koji/taskinfo?taskID=15257891


Using %make_build CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" led to 
clang-3.8: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
/usr/bin/ld: cannot find -lz
clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)

Comment 7 Luya Tshimbalanga 2016-08-15 03:11:24 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #5)
> The trick is to require some file which is only provided by
> glibc-devel.i686. E.g. BuildRequires: /usr/lib/crt1.o.

Disregard comment #6, I figured out the failure. In combination of above, zlib-devel was also needed. 

Using "LDFLAGS="%{__global_ldflags}"" above gave a warning message "clang-3.8: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'". I left those parameters on the make_build line.
http://koji.fedoraproject.org/koji/taskinfo?taskID=15261458

Only using CFLAGS seems to appease the complain from compilation by looking at the log.
http://koji.fedoraproject.org/koji/taskinfo?taskID=15261384

Files are updated
Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-3.fc24.src.rpm

Comment 8 Luya Tshimbalanga 2016-08-19 23:04:33 UTC
Just following up as the updated spec and srpm are posted with recommended changes. See comment #7.

Comment 9 Igor Gnatenko 2016-08-20 07:04:21 UTC
* use gcc-c++ for building (add `gcc` into `%make_build` line)
* replace CFLAGS with CXXFLAGS
* it still ignores CXXFLAGS (Makefile needs patching)
* verbose compilation is not enabled (I mean to show what and how has been executed). Remove `@` in lines like `@$(LEX)`, `@$(CXX)`, etc.
* Trailing dot is missing in description

Comment 10 Luya Tshimbalanga 2016-08-20 18:03:17 UTC
Created attachment 1192486 [details]
patch form makefile

(In reply to Igor Gnatenko from comment #9)
> * use gcc-c++ for building (add `gcc` into `%make_build` line)
Done

> * replace CFLAGS with CXXFLAGS
Done, I add to declare -std=c++11 to remove the error.

> * it still ignores CXXFLAGS (Makefile needs patching)
> * verbose compilation is not enabled (I mean to show what and how has been
> executed). Remove `@` in lines like `@$(LEX)`, `@$(CXX)`, etc.
Patched added. However it led to 3 errors. 

I found a suggestion from llvm-config
# Using http://llvm.org/docs/CommandGuide/llvm-config.html
%make_build gcc 'llvm-config --cppflags --ldflags'

The failure occurred on those lines:
t global scope:
cc1plus: error: unrecognized command line option '-Wno-deprecated-register' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-c99-extensions' [-Werror]
cc1plus: all warnings being treated as errors


> * Trailing dot is missing in description
Added.

Comment 11 Luya Tshimbalanga 2016-08-21 02:38:14 UTC
Files are updated
Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-4.fc24.src.rpm

It seems there is a clash using gcc as builder who complain about some structural errors on module.cpp.

Comment 12 Luya Tshimbalanga 2016-08-23 02:26:57 UTC
So far g++ does not like this syntax on module.cpp:

module.cpp: In member function 'bool Module::writeOutput(Module::OutputType, const char*, const char*, DispatchHeaderInfo*)':
module.cpp:1242:11: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
           if (strcasecmp(suffix, "c") && strcasecmp(suffix, "cc") &&
           ^~
module.cpp:1246:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
             break;
             ^~~~~
module.cpp:1248:11: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
           if (strcasecmp(suffix, "c") && strcasecmp(suffix, "cc") &&
           ^~
module.cpp:1252:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
             break;
             ^~~~~
g++ will complain about these parameters:

cc1plus: error: unrecognized command line option '-Wno-deprecated-register' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-c99-extensions' [-Werror]
cc1plus: all warnings being treated as errors

Which can be disabled with included patch.

clang as compiler does not complain about the issue. Should we keep using gcc or clang in that case? Upstream recommends the latter according to this link: 
https://github.com/ispc/ispc/wiki/Building-ispc:-Linux-and-Mac-OS-X

Perhaps making ispc available on the repo first should be the priority so you can provide the fixes by removing clang as requirement.

Comment 13 Zbigniew Jędrzejewski-Szmek 2016-08-23 03:53:06 UTC
> cc1plus: all warnings being treated as errors

-Werror is a very bad idea. It can be useful in upstream development, where you are using a specific version of the compiler, and want to catch any warnings as they appear. But in a package in a distribution, new warnings will appear as the compiler is updated and becomes smarter, so -Werror will cause constant breakage. Just remove it.

Comment 14 Luya Tshimbalanga 2016-08-23 08:01:54 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #13)
> > cc1plus: all warnings being treated as errors
> 
> -Werror is a very bad idea. It can be useful in upstream development, where
> you are using a specific version of the compiler, and want to catch any
> warnings as they appear. But in a package in a distribution, new warnings
> will appear as the compiler is updated and becomes smarter, so -Werror will
> cause constant breakage. Just remove it.

Done via patch. The compilation no longer failed. It turned out CXXFLAGS and LDFLAGS were unnecessary on %make_build gcc lines as they were already in Makefile. Here is the updated files

Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-4.fc24.src.rpm

and the scratch build result
http://koji.fedoraproject.org/koji/taskinfo?taskID=15347603

Comment 15 Luya Tshimbalanga 2016-08-23 08:03:01 UTC
Err...
These are the right files
Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-5.fc24.src.rpm


and the scratch build result
http://koji.fedoraproject.org/koji/taskinfo?taskID=15347603

Comment 16 Igor Gnatenko 2016-08-23 08:47:36 UTC
> g++ -O2 -I/usr/include   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DNDEBUG -I. -Iobjs/ -I/usr/include -DLLVM_3_8 -Wall -DBUILD_DATE="\"20160823\"" -DBUILD_VERSION="\""no_version_info"\"" -Wno-sign-compare -Wno-unused-function -std=c++11 -fno-rtti -o objs/ast.o -c ast.cpp
as you can see all %{optflags} and %{__global_ldflags} are ignored.

Comment 17 Luya Tshimbalanga 2016-08-23 16:47:49 UTC
Updated files with OPT and LDFLAGS added on %make_build gcc
Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-5.fc24.src.rpm

Scratch build result
http://koji.fedoraproject.org/koji/taskinfo?taskID=15351995

Comment 18 Luya Tshimbalanga 2016-08-23 16:48:42 UTC
..was too quick to press button...
Updated files with OPT and LDFLAGS added on %make_build gcc
Spec URL: https://luya.fedorapeople.org/packages/SPECS/ispc.spec
SRPM URL: https://luya.fedorapeople.org/packages/SRPMS/ispc-1.9.1-6.fc24.src.rpm

Scratch build result
http://koji.fedoraproject.org/koji/taskinfo?taskID=15351995

Comment 19 Igor Gnatenko 2016-08-24 05:44:55 UTC
Now it looks good ;)

Comment 20 Luya Tshimbalanga 2016-08-24 06:55:38 UTC
Thank you Igor!! =)

Comment 21 Gwyn Ciesla 2016-08-24 11:44:41 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/ispc

Comment 22 Fedora Update System 2016-08-26 03:44:37 UTC
ispc-1.9.1-7.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-01fee06612

Comment 23 Fedora Update System 2016-08-26 03:44:47 UTC
ispc-1.9.1-7.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ee40851f3

Comment 24 Fedora Update System 2016-08-26 16:52:31 UTC
ispc-1.9.1-7.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-01fee06612

Comment 25 Fedora Update System 2016-08-27 12:53:55 UTC
ispc-1.9.1-7.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6ee40851f3

Comment 26 Fedora Update System 2016-08-31 16:29:20 UTC
ispc-1.9.1-7.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2016-09-04 00:51:59 UTC
ispc-1.9.1-7.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.