php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63016 Couldn't compile pecl-rar extension
Submitted: 2012-09-05 13:54 UTC Modified: 2017-07-27 03:30 UTC
Votes:6
Avg. Score:3.7 ± 1.4
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:3 (60.0%)
From: m dot gavrilov at citrus-it dot ru Assigned: cataphract (profile)
Status: Closed Package: rar (PECL)
PHP Version: 5.4.6 OS: Cent OS 5.8
Private report: No CVE-ID: None
 [2012-09-05 13:54 UTC] m dot gavrilov at citrus-it dot ru
Description:
------------
# make
/bin/sh /root/rpmbuild/BUILD/rar-3.0.1/libtool --mode=compile cc -DRARDLL -DGUI 
-DSILENT -Wno-write-strings -Wno-logical-op-parentheses -
I/root/rpmbuild/BUILD/rar-3.0.1/unrar -I. -I/root/rpmbuild/BUILD/rar-3.0.1 -
DPHP_ATOM_INC -I/root/rpmbuild/BUILD/rar-3.0.1/include -
I/root/rpmbuild/BUILD/rar-3.0.1/main -I/root/rpmbuild/BUILD/rar-3.0.1 -
I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -
I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -
DHAVE_CONFIG_H  -g -O2   -c /root/rpmbuild/BUILD/rar-3.0.1/rar.c -o rar.lo 
mkdir .libs
 cc -DRARDLL -DGUI -DSILENT -Wno-write-strings -Wno-logical-op-parentheses -
I/root/rpmbuild/BUILD/rar-3.0.1/unrar -I. -I/root/rpmbuild/BUILD/rar-3.0.1 -
DPHP_ATOM_INC -I/root/rpmbuild/BUILD/rar-3.0.1/include -
I/root/rpmbuild/BUILD/rar-3.0.1/main -I/root/rpmbuild/BUILD/rar-3.0.1 -
I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -
I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -
DHAVE_CONFIG_H -g -O2 -c /root/rpmbuild/BUILD/rar-3.0.1/rar.c  -fPIC -DPIC -o 
.libs/rar.o
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
make: *** [rar.lo] Error 1



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-05 14:55 UTC] laruence@php.net
you can simply remove that option in config.m4, then build it agian.

I am not sure where does this option come from. maybe a latest version of 
gcc/clang?
 [2012-09-05 14:55 UTC] laruence@php.net
-Assigned To: +Assigned To: cataphract
 [2012-09-05 16:50 UTC] cataphract@php.net
Which compiler are you using? I don't get any error both in gcc and clang:

glopes@damnation:/tmp$ gcc -Wno-logical-op-parentheses a.c
glopes@damnation:/tmp$ gcc --version
gcc (Debian 4.7.1-7) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

glopes@damnation:/tmp$ clang -Wno-logical-op-parentheses a.c
glopes@damnation:/tmp$ clang --version
Debian clang version 3.1-8 (branches/release_31) (based on LLVM 3.1)
Target: x86_64-pc-linux-gnu
Thread model: posix
 [2012-09-06 04:17 UTC] m dot gavrilov at citrus-it dot ru
> Which compiler are you using?

# gcc -Wno-logical-op-parentheses a.c
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
[root@lnmp-centos BUILD]# gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 [2012-09-10 11:18 UTC] m dot gavrilov at citrus-it dot ru
On what option "-Wno-logical-op-parentheses" is affected?
I remove this option from config.m4 and compile successful also passed all 
regression TESTS.
 [2012-09-11 07:19 UTC] tony2001@php.net
But this option is NOT in config.m4: http://svn.php.net/viewvc/pecl/rar/trunk/config.m4?revision=299933&view=markup
So the question is where did you get it in the first place?
Global CFLAGS maybe?
 [2012-09-11 07:46 UTC] tony2001@php.net
Ok, I see - the option is in the 3.0.1 package, but it was never present in config.m4.
Gustavo, could you upload a new package without that option, please?
 [2016-06-07 18:11 UTC] cmb@php.net
FWIW: apparently, -Wno-logical-op-parentheses is still in master,
see <https://github.com/cataphract/php-rar/blob/master/config.m4#L30>.
 [2017-07-27 03:30 UTC] cataphract@php.net
-Status: Assigned +Status: Closed
 [2017-07-27 03:30 UTC] cataphract@php.net
Should be fixed in 4.0.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 26 14:01:24 2020 UTC