[请问达人]关于php5和libiconv进行交叉编译的有关问题[急]
[请教达人]关于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 中去.
这样编译时就能找到了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics





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

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

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

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 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

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

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

Solarcellsbasedonperovskiteinparticularareagoodexamplethatillustratestheopportunitiesofferedbythenew,computer-aidedtechnology.Themineralpromisesanoutstandingelectricityyield,whichwouldbewellover30percentinamulti-layer
