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

Make failed #3

Closed
philmacdonald opened this issue Jul 14, 2015 · 11 comments
Closed

Make failed #3

philmacdonald opened this issue Jul 14, 2015 · 11 comments
Assignees

Comments

@philmacdonald
Copy link

All the modules compile fine except for this one:

libtool: compile: cc -I. -I/tmp/pear/temp/pecl_http -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-frd-opsDznPSo/pecl_http-2.5.0/include -I/tmp/pear/temp/pear-build-frd-opsDznPSo/pecl_http-2.5.0/main -I/tmp/pear/temp/pecl_http -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/php5/ext/raphf -I/usr/include/php5/ext/propro -I/usr/include/php5/ext/hash -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/pecl_http/php_http_querystring.c -fPIC -DPIC -o .libs/php_http_querystring.o
/tmp/pear/temp/pecl_http/php_http_querystring.c: In function 'php_http_querystring_xlate':
/tmp/pear/temp/pecl_http/php_http_querystring.c:89:8: error: 'PHP_ICONV_ERR_SUCCESS' undeclared (first use in this function)
if (PHP_ICONV_ERR_SUCCESS != php_iconv_string(key.str, key.len-1, &xkey, &xlen, oe, ie)) {
^
/tmp/pear/temp/pecl_http/php_http_querystring.c:89:8: note: each undeclared identifier is reported only once for each function it appears in
make: *** [php_http_querystring.lo] Error 1
ERROR: `make' failed

Any ideas what dependency is missing? Already installed all dependencies listed on the PECL page. This is on OpenSUSE x64 13.1 with PHP 5.6.9 on pecl_http 2.5.0

@m6w6 m6w6 self-assigned this Jul 15, 2015
@m6w6
Copy link
Owner

m6w6 commented Jul 15, 2015

Do you install pecl/http the first time?
I never had a report like this one, it's been looking like that for years.

@philmacdonald
Copy link
Author

First time installation it always fails to compile at this point and the installation fails.

-------- Original message --------
From: Michael Wallner notifications@github.com
Date: 15/07/2015 07:09 (GMT+00:00)
To: m6w6/ext-http ext-http@noreply.github.com
Cc: Phillip Macdonald phillip.macdonald@fraudscreen.co.uk
Subject: Re: [ext-http] Make failed (#3)

Do you install pecl/http the first time?
I never had a report like this one, it's been looking like that for years.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-121501833.

@m6w6
Copy link
Owner

m6w6 commented Jul 15, 2015

Is ext/iconv on SuSE provided as shared module? /usr/lib/php*/*/iconv.so?

@m6w6
Copy link
Owner

m6w6 commented Jul 15, 2015

Could you try the following:

pecl download pecl_http
pecl bundle pecl_http-2.5.0.tgz
cd pecl_http
patch -p1 <<EOF
diff --git a/php_http_querystring.c b/php_http_querystring.c
index d265748..d72337f 100644
--- a/php_http_querystring.c
+++ b/php_http_querystring.c
@@ -16,6 +16,9 @@
 #include <ext/spl/spl_array.h>

 #ifdef PHP_HTTP_HAVE_ICONV
+#      ifndef HAVE_ICONV
+#              define HAVE_ICONV 1
+#      endif
 #      undef PHP_ATOM_INC
 #      include <ext/iconv/php_iconv.h>
 #endif
EOF
pecl install -f package.xml

@philmacdonald
Copy link
Author

When I run that it fails here:

patch -p1 <<EOF

diff --git a/php_http_querystring.c b/php_http_querystring.c
index d265748..d72337f 100644
--- a/php_http_querystring.c
+++ b/php_http_querystring.c
@@ -16,6 +16,9 @@
#include <ext/spl/spl_array.h>

#ifdef PHP_HTTP_HAVE_ICONV
+# ifndef HAVE_ICONV
+# define HAVE_ICONV 1
+# endif

undef PHP_ATOM_INC

include <ext/iconv/php_iconv.h>

#endif
EOF
patching file php_http_querystring.c
Hunk #1 FAILED at 16.
1 out of 1 hunk FAILED -- saving rejects to file php_http_querystring.c.rej

@philmacdonald
Copy link
Author

Also, the iconv path for me is /usr/lib64/php5/extensions/iconv.so

@m6w6
Copy link
Owner

m6w6 commented Jul 15, 2015

Okay, then please try to put this # define HAVE_ICONV 1 into that #ifdef by hand.

@philmacdonald
Copy link
Author

patch -p1 <<EOF

diff --git a/php_http_querystring.c b/php_http_querystring.c
index d265748..d72337f 100644
--- a/php_http_querystring.c
+++ b/php_http_querystring.c
@@ -16,6 +16,9 @@
#include <ext/spl/spl_array.h>

#ifdef PHP_HTTP_HAVE_ICONV
+# define HAVE_ICONV 1
+# ifndef HAVE_ICONV
+# define HAVE_ICONV 1
+# endif

undef PHP_ATOM_INC

include <ext/iconv/php_iconv.h>

#endif
EOF
patching file php_http_querystring.c
patch: **** malformed patch at line 15: #endif

patch -p1 <<EOF

diff --git a/php_http_querystring.c b/php_http_querystring.c
index d265748..d72337f 100644
--- a/php_http_querystring.c
+++ b/php_http_querystring.c
@@ -16,6 +16,9 @@
#include <ext/spl/spl_array.h>

#ifdef PHP_HTTP_HAVE_ICONV
+# define HAVE_ICONV 1

undef PHP_ATOM_INC

include <ext/iconv/php_iconv.h>

#endif
EOF
patching file php_http_querystring.c
patch: **** malformed patch at line 12:

Not sure if that's just me making syntax errors though.

@m6w6
Copy link
Owner

m6w6 commented Jul 16, 2015

No :), just edit php_http_querystring.c by hand, so that it looks like:

#ifdef PHP_HTTP_HAVE_ICONV
#   ifndef HAVE_ICONV
#       define HAVE_ICONV 1
#   endif
#   undef PHP_ATOM_INC
#   include <ext/iconv/php_iconv.h>
#endif

@philmacdonald
Copy link
Author

Excellent, that worked. Thanks a lot!

@m6w6
Copy link
Owner

m6w6 commented Jul 16, 2015

Thank you for verifying!

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

No branches or pull requests

2 participants