Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install protobuf 3.20.0RC2 for PHP with pecl: utf8_range.h is missing #9654

Closed
mlocati opened this issue Mar 20, 2022 · 4 comments
Closed
Assignees

Comments

@mlocati
Copy link
Contributor

mlocati commented Mar 20, 2022

What version of protobuf and what language are you using?
Version: 3.20.0RC2
Language: PHP

What operating system (Linux, Windows, ...) and version?
Linux, any version

What runtime / compiler are you using (e.g., python version or gcc version)
Installing protobuf via PECL

What did you do?
docker run --rm -it php:7.4-cli-bullseye pecl install protobuf-3.20.0RC2

What did you expect to see
protobuf is compiled

What did you see instead?

downloading protobuf-3.20.0RC2.tgz ...
Starting to download protobuf-3.20.0RC2.tgz (170,608 bytes)
.....................................done: 170,608 bytes
20 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
building in /tmp/pear/temp/pear-build-defaultuserlOBbhj/protobuf-3.20.0RC2
running: /tmp/pear/temp/protobuf/configure --with-php-config=/usr/local/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 pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 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/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20190902
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable Protobuf extension... yes, shared
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... 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

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-defaultuserlOBbhj/protobuf-3.20.0RC2/libtool --mode=compile cc -std=gnu99 -I. -I/tmp/pear/temp/protobuf -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserlOBbhj/protobuf-3.20.0RC2/include -I/tmp/pear/temp/pear-build-defaultuserlOBbhj/protobuf-3.20.0RC2/main -I/tmp/pear/temp/protobuf -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/protobuf/arena.c -o arena.lo
mkdir .libs
 cc -std=gnu99 -I. -I/tmp/pear/temp/protobuf -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserlOBbhj/protobuf-3.20.0RC2/include -I/tmp/pear/temp/pear-build-defaultuserlOBbhj/protobuf-3.20.0RC2/main -I/tmp/pear/temp/protobuf -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/protobuf/arena.c  -fPIC -DPIC -o .libs/arena.o
In file included from /tmp/pear/temp/protobuf/arena.c:33:
/tmp/pear/temp/protobuf/php-upb.h:738:10: fatal error: third_party/utf8_range/utf8_range.h: No such file or directory
  738 | #include "third_party/utf8_range/utf8_range.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:191: arena.lo] Error 1
ERROR: `make' failed
@remicollet
Copy link

same issue

@remicollet
Copy link

Notice, other new sources are there but with bad role

   <file baseinstalldir="/" md5sum="d67a686ee5da62c0778bc0df25a84c75" name="third_party/utf8_range/naive.c" role="doc" />
   <file baseinstalldir="/" md5sum="e7ce760d4b9d68ad47999752382f7b1f" name="third_party/utf8_range/range2-neon.c" role="doc" />
   <file baseinstalldir="/" md5sum="a5cf54462a2fe488d4deef0973e8eef7" name="third_party/utf8_range/range2-sse.c" role="doc" />

Should be "src", not "doc"

@remicollet
Copy link

And the LICENSE file MUST be included as "doc" to respect its terms

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

@mlocati
Copy link
Contributor Author

mlocati commented Apr 2, 2022

This issue has been fixed by #9672, but version 3.20.0 can't still be installed via pecl.
I'll submit a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants