Home Backend Development PHP Tutorial [请问达人]关于php5和libiconv进行交叉编译的有关问题[急]

[请问达人]关于php5和libiconv进行交叉编译的有关问题[急]

Jun 13, 2016 pm 01:39 PM
iconv usr with

[请教达人]关于php5和libiconv进行交叉编译的问题[急!!!]
项目要求重新编译php,把iconv库编译进去,我已经安装了iconv库了,但是等到编译php进行configure的时候,却总是说找不到iconv库,以前我没有接触过php的东西,所以实在是没招了,请大侠指教指教,多谢多谢!

我的操作步骤:(mips64平台)

1.安装libiconv-1.11.tar.gz

交叉编译工具已经export过了

./configure --prefix=/usr/local/iconv --host=mipsel-linux
make
make intall

完成这一步会在/usr/local/iconv下生成几个目录,readelf -h检查编译出来的iconv可执行文件是正确的(mips3000,64位)

2.将已经编译出来的库和.h文件拷到编译工具对应的库和include目录下

3.编译php
./configure --host=mipsel-linux --prefix=/usr/local/mips64/ -enable-force-cgi-redirect -enable-fastcgi -enable-sockets -with-gd -with-zlib -with-png -with-iconv-dir=/usr/local/iconv -disable-mbstring -with-xmlrpc -libdir=/usr/local/Cavium_Networks/OCTEON-SDK/tools/mips64-octeon-linux-gnu/sys-root/usr/lib64 -includedir=/usr/local/Cavium_Networks/OCTEON-SDK/tools/mips64-octeon-linux-gnu/sys-root/usr/include

这一步出错:

checking for libiconv in -liconv... no
checking for iconv in -liconv... no
configure: error: iconv not found, in order to build xmlrpc you need the iconv library

如果只是-with-iconv,可以configure过去,而且也能编译出来,但是显示phpinfo的时候iconv总是用的glibc的iconv。。。


------解决方案--------------------
帮你 ddddd
------解决方案--------------------
去掉 -with-xmlrpc,应该可以通过

或者检查一下 pkgconfig 有没有 libiconv.pc
------解决方案--------------------
那不就得了,locate libiconv.pc 一下.

把libiconv.pc 复制到/usr/lib/pkgconfig/

或者把所在path 加到 PKG_CONFIG_PATH 中去.

这样编译时就能找到了

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Recommended essential functions for Chinese processing: Detailed explanation of PHP iconv function Recommended essential functions for Chinese processing: Detailed explanation of PHP iconv function Jun 27, 2023 pm 02:04 PM

In the process of text processing, it is a common requirement to convert strings in different encoding formats. The iconv (InternationalizationConversion) function provided in the PHP language can meet this need very conveniently. This article will introduce the use of iconv function in detail from the following aspects: Definition of iconv function and introduction to common parameters Example demonstration: Convert GBK encoded string to UTF-8 encoded string Example demonstration: Convert UTF

Introduction to iconv command under CentOS Introduction to iconv command under CentOS Dec 29, 2023 pm 07:52 PM

iconv-fencoding[-tencoding][inputfile]...[Function] Converts the contents of a given file from one encoding to another. [Description]-fencoding: Convert characters from encoding to encoding. -tencoding: Convert characters to encoding. -l: List the known set of encoded characters -ofile: Specify the output file -c: Ignore illegal characters in the output -s: Suppress warning messages, but not error messages --verbose: Display progress information -f and -t can The specified legal characters are listed in the command with the -l option. [Example]* List currently supported character encodings

Demystifying the with keyword in Python Demystifying the with keyword in Python Apr 14, 2023 am 11:31 AM

Many of us have seen this snippet over and over again in Python code: with open('Hi.text', 'w') as f: f.write("Hello, there") However, some of us Some people don't know what with is used for and why we need to use it here. In this read, you'll find out about almost any problem that can be solved with. let's start! First, let's consider what we need to do without using the with keyword. In this case we need to open the file first and try to write. Regardless of success or failure, we'd better be

How to cross-compile executable programs of different systems on ubuntu server? How to cross-compile executable programs of different systems on ubuntu server? Mar 06, 2024 pm 01:34 PM

I believe many C programmers have had this question, what if a server has different gcc versions? Will they affect each other? The answer is yes. When we generally use gcc to compile source files, this gcc is the first gcc found in the system environment variable PATH. What if you want to cross-compile programs for different systems? This requires multiple sets of compilation tool chains, and the corresponding tool chains are used to compile the programs of the target system. Default path compiler path: usually placed in the /usr/bin directory. Header file path: System-level header files are usually placed in /usr/include, and standard library header files are generally placed in /usr/local/include. Library path: System dynamic libraries are often located in /u

The ten most commonly used environment variables in Linux The ten most commonly used environment variables in Linux Feb 19, 2024 pm 04:00 PM

The Linux operating system provides a variety of environment variables for configuring and managing system behavior. This article will introduce the 10 most common environment variables in Linux, and give sample code and corresponding analysis. 1. The PATHPATH environment variable determines the directory where the system searches for executable files. When you enter a command in the terminal, the system retrieves the executable file in the directory specified in the PATH variable. Sample code: echo$PATH output:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: /snap/bin parsing

How to use Python's with statement How to use Python's with statement May 25, 2023 pm 05:22 PM

Statement body (with-body): The code block wrapped in the with statement will call the enter() method of the context manager before executing the statement body, and the exit() method will be executed after the statement body is executed. Basic syntax and working principle The syntax format of the with statement is as follows: Listing 1. The syntax format of the with statement withcontext_expression[astarget(s)]: with-body Here contextexpression returns a context manager object, which is not assigned to the as clause. target(s) in, if the as clause is specified, the context will be managed

Chip developed that receives 5G and future 6G four times better Chip developed that receives 5G and future 6G four times better Jul 02, 2024 am 07:09 AM

Interference and overlapping signals are likely to increase in the coming years. After all, it is not just cars that are increasingly turning into radio control centers that monitor their surroundings on the one hand and want to exchange large amount

Better solar cells, transparent technology and more Better solar cells, transparent technology and more Jun 14, 2024 pm 09:12 PM

Solarcellsbasedonperovskiteinparticularareagoodexamplethatillustratestheopportunitiesofferedbythenew,computer-aidedtechnology.Themineralpromisesanoutstandingelectricityyield,whichwouldbewellover30percentinamulti-layer

See all articles