php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74812 When installing pam via pecl it fails during compilation
Submitted: 2017-06-25 12:52 UTC Modified: 2017-06-26 09:01 UTC
From: shrenik dot bhura at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: PAM (PECL)
PHP Version: 7.0.20 OS: Ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: shrenik dot bhura at gmail dot com
New email:
PHP Version: OS:

 

 [2017-06-25 12:52 UTC] shrenik dot bhura at gmail dot com
Description:
------------
When installing pam via pecl it fails during compilation

# php -version
PHP 7.0.18-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.18-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies





Test script:
---------------
pecl install pam

Actual result:
--------------
# pecl install pam
downloading pam-1.0.3.tgz ...
Starting to download pam-1.0.3.tgz (6,671 bytes)
.....done: 6,671 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
building in /tmp/pear/temp/pear-build-rootRY5vyo/pam-1.0.3
running: /tmp/pear/temp/pam/configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for PAM support... yes, shared
checking for pam_start in -lpam... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootRY5vyo/pam-1.0.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/pam -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootRY5vyo/pam-1.0.3/include -I/tmp/pear/temp/pear-build-rootRY5vyo/pam-1.0.3/main -I/tmp/pear/temp/pam -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/pam/pam.c -o pam.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/pam -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootRY5vyo/pam-1.0.3/include -I/tmp/pear/temp/pear-build-rootRY5vyo/pam-1.0.3/main -I/tmp/pear/temp/pam -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/pam/pam.c  -fPIC -DPIC -o .libs/pam.o
/tmp/pear/temp/pam/pam.c: In function ‘zif_pam_auth’:
/tmp/pear/temp/pam/pam.c:251:36: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
    ZVAL_STRING(status, error_msg, 0);
                                    ^
/tmp/pear/temp/pam/pam.c:251:4: error: ‘ZVAL_STRING’ undeclared (first use in this function)
    ZVAL_STRING(status, error_msg, 0);
    ^
/tmp/pear/temp/pam/pam.c:251:4: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/temp/pam/pam.c:256:40: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [-Wincompatible-pointer-types]
  if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **)&server) == SUCCESS && Z_TYPE_PP(server) == IS_ARRAY) {
                                        ^
In file included from /usr/include/php/20151012/Zend/zend.h:36:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /tmp/pear/temp/pam/pam.c:26:
/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: expected ‘zend_string * {aka struct _zend_string *}’ but argument is of type ‘char *’
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/tmp/pear/temp/pam/pam.c:256:6: error: too many arguments to function ‘zend_hash_find’
  if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **)&server) == SUCCESS && Z_TYPE_PP(server) == IS_ARRAY) {
      ^
In file included from /usr/include/php/20151012/Zend/zend.h:36:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /tmp/pear/temp/pam/pam.c:26:
/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/tmp/pear/temp/pam/pam.c:256:102: warning: implicit declaration of function ‘Z_TYPE_PP’ [-Wimplicit-function-declaration]
  if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **)&server) == SUCCESS && Z_TYPE_PP(server) == IS_ARRAY) {
                                                                                                      ^
/tmp/pear/temp/pam/pam.c:257:22: warning: implicit declaration of function ‘Z_ARRVAL_PP’ [-Wimplicit-function-declaration]
   if (zend_hash_find(Z_ARRVAL_PP(server), "REMOTE_ADDR", sizeof("REMOTE_ADDR"), (void **)&remote_addr) == SUCCESS && Z_TYPE_PP(remote_addr) == IS_STRING) {
                      ^
/tmp/pear/temp/pam/pam.c:257:22: warning: passing argument 1 of ‘zend_hash_find’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/include/php/20151012/Zend/zend.h:36:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /tmp/pear/temp/pam/pam.c:26:
/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: expected ‘const HashTable * {aka const struct _zend_array *}’ but argument is of type ‘int’
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/tmp/pear/temp/pam/pam.c:257:43: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [-Wincompatible-pointer-types]
   if (zend_hash_find(Z_ARRVAL_PP(server), "REMOTE_ADDR", sizeof("REMOTE_ADDR"), (void **)&remote_addr) == SUCCESS && Z_TYPE_PP(remote_addr) == IS_STRING) {
                                           ^
In file included from /usr/include/php/20151012/Zend/zend.h:36:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /tmp/pear/temp/pam/pam.c:26:
/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: expected ‘zend_string * {aka struct _zend_string *}’ but argument is of type ‘char *’
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/tmp/pear/temp/pam/pam.c:257:7: error: too many arguments to function ‘zend_hash_find’
   if (zend_hash_find(Z_ARRVAL_PP(server), "REMOTE_ADDR", sizeof("REMOTE_ADDR"), (void **)&remote_addr) == SUCCESS && Z_TYPE_PP(remote_addr) == IS_STRING) {
       ^
In file included from /usr/include/php/20151012/Zend/zend.h:36:0,
                 from /usr/include/php/20151012/main/php.h:36,
                 from /tmp/pear/temp/pam/pam.c:26:
/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                              ^
/tmp/pear/temp/pam/pam.c:258:34: warning: implicit declaration of function ‘Z_STRVAL_PP’ [-Wimplicit-function-declaration]
    pam_set_item(pamh, PAM_RHOST, Z_STRVAL_PP(remote_addr));
                                  ^
/tmp/pear/temp/pam/pam.c:258:34: warning: passing argument 3 of ‘pam_set_item’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/include/security/pam_appl.h:18:0,
                 from /tmp/pear/temp/pam/pam.c:30:
/usr/include/security/_pam_types.h:172:1: note: expected ‘const void *’ but argument is of type ‘int’
 pam_set_item(pam_handle_t *pamh, int item_type, const void *item);
 ^
/tmp/pear/temp/pam/pam.c:266:36: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
    ZVAL_STRING(status, error_msg, 0);
                                    ^
/tmp/pear/temp/pam/pam.c:277:37: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
     ZVAL_STRING(status, error_msg, 0);
                                     ^
/tmp/pear/temp/pam/pam.c: In function ‘zif_pam_chpass’:
/tmp/pear/temp/pam/pam.c:315:36: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
    ZVAL_STRING(status, error_msg, 0);
                                    ^
/tmp/pear/temp/pam/pam.c:315:4: error: ‘ZVAL_STRING’ undeclared (first use in this function)
    ZVAL_STRING(status, error_msg, 0);
    ^
/tmp/pear/temp/pam/pam.c:324:36: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
    ZVAL_STRING(status, error_msg, 0);
                                    ^
/tmp/pear/temp/pam/pam.c:334:36: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
    ZVAL_STRING(status, error_msg, 0);
                                    ^
Makefile:194: recipe for target 'pam.lo' failed
make: *** [pam.lo] Error 1
ERROR: `make' failed


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-26 09:01 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2017-06-26 09:01 UTC] cmb@php.net
Basically, this is a duplicate of bug #74396.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Nov 24 04:01:23 2020 UTC