php links against system libxml instead of version specified by ./configure --with-libxml-dircompiling PHP...
What was the difference between a Games Console and a Home Computer?
What were the problems on the Apollo 11 lunar module?
"This used to be my phone number"
I have found a mistake on someone's code published online: what is the protocol?
Practical example in using (homotopy) type theory
We get more abuse than anyone else
How did Jayne know when to shoot?
What happens if a company buys back all of its shares?
Should I have shared a document with a former employee?
Difference between c++14 and c++17 using: `*p++ = *p`
Is it legal for a supermarket to refuse to sell an adult beer if an adult with them doesn’t have their ID?
How much water can a ship take on before sinking?
Why jet engines sound louder on the ground than inside the aircraft?
Pauli exclusion principle - black holes
Does unblocking power bar outlets through short extension cords increase fire risk?
Did Hitler say this quote about homeschooling?
How can electric field be defined as force per charge, if the charge makes its own, singular electric field?
Locked-up DOS computer beeped on keypress. What mechanism caused that?
What causes a rotating object to rotate forever without external force—inertia, or something else?
How fast does a character need to move to be effectively invisible?
Term “console” in game consoles
Arithmetics in LuaLaTeX
When is the Circle of Dreams druid's Walker in Dreams feature used?
is 1hr 15 minutes enough time to change terminals at Manila?
php links against system libxml instead of version specified by ./configure --with-libxml-dir
compiling PHP fails cause of libpcreExecute file with certain PHP versionError while building Linux kernel for versatile boardHow do I upgrade PHP on CentOS 6.7 for CiviCRM 4.7 / WordPress?php: compiling with openssl, ftp, ldap, curl support in debian gnu/linuxHow can DYLD_LIBRARY_PATH be unset for launchd processes?Problem with 2 php version and opensslCompilation with make: link to libraryWithout root, how to make programs use a specific PHP version instead of the default?Issue trying to compile libXres
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I'm trying to build php-5.5.33 from source on a Debian 8 system; configure
and make
both run successfully, but when I run make install
I get the following error:
Installing PEAR environment: /usr/local/lib/php/
/usr/src/www/php/php-5.5.33/sapi/cli/php: symbol lookup error: /usr/src/www/php/php-5.5.33/sapi/cli/php: undefined symbol: __xmlFree
Makefile:390: recipe for target 'install-pear-installer' failed
make[1]: *** [install-pear-installer] Error 127
Makefile:393: recipe for target 'install-pear' failed
make: *** [install-pear] Error 2
Upon seeing this I ran (from dir /usr/src/www/php/php-5.5.33
) ldd sapi/cli/php
and saw the following (I've omitted most of the output):
libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007efd9c207000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007efd9bea0000)
I was surprised to see this as I had used the --with-libxml-dir
and --with-xsl
options to specify the location of my locally installed, from source into /usr/local, version of libxml2-2.9.3 and libxslt-1.1.28. Also, configure seemed to have picked up this version because there were numerous instances in the output where it said:
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... yes
Now, the make install
error I listed above actually makes sense, as the symbol __xmlFree
is not present in the system's /usr/lib/x86_64-linux-gnu/libxml2.so.2
, as running readelf -s /usr/lib/x86_64-linux-gnu/libxml2.so | grep -i __xmlfree
finds no matches. However, my locally installed version does contain this symbol:
$ readelf -s /usr/local/lib/libxml2.so.2 | grep -i __xmlfree
1409: 00000000000e0b5c 35 FUNC GLOBAL DEFAULT 12 __xmlFree
5249: 00000000000e0b5c 35 FUNC GLOBAL DEFAULT 12 __xmlFree
What is confusing is why sapi/cli/php
is linking against a different version of libxml2 than what I have specified to configure
. Note, my /etc/ld.so.conf
is as follows:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
...and that I have consolidated the /etc/ld.so.conf.d
dir down to a single file that looks like this:
$ cat /etc/ld.so.conf.d/libs.conf
/usr/local/lib
/usr/lib/x86_64-linux-gnu/libfakeroot
...and I have also run ldconfig
after installing libxml2 and libxslt and prior to build php. Here is my full configure
that I used:
./configure --prefix=/usr/local
CFLAGS="-O2 -mtune=native -funroll-loops -fPIC"
--with-libdir=lib
--with-apxs2=/usr/local/apache2/bin/apxs
--disable-debug
--disable-short-tags
--enable-libgcc
--enable-shared=yes
--enable-calendar
--enable-exif
--enable-ftp
--enable-gd-native-ttf
--enable-mbstring
--enable-shmop
--enable-soap
--enable-sockets
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
--with-bz2
--with-curl=/usr/local
--with-freetype-dir
--with-gd
--with-gnu-ld
--with-iconv-dir=/usr/local
--with-jpeg-dir=/usr/local
--with-ldap=/usr/local
--with-libxml-dir=/usr/local
--with-mcrypt
--with-mhash
--with-openssl
--with-openssl-dir=/usr/local
--with-pear
--with-pcre-regex=/usr/local
--with-pcre-dir=/usr/local
--with-png-dir=/usr/local
--with-tidy
--with-readline
--with-tsrm-pthreads
--with-xmlrpc
--with-xsl=/usr/local
--with-zlib
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--without-sqlite3
--without-pdo-sqlite
(Note also that, of all the items that were specified as /usr/local, php actually linked against the system versions of those too, if there were system versions available. Only items that had no system equivalents actually linked against the version I specified).
Why is php linking against different versions than what I have indicated? It seems that if this wasn't happening I probably wouldn't get the error during make install
.
php make configure
add a comment |
I'm trying to build php-5.5.33 from source on a Debian 8 system; configure
and make
both run successfully, but when I run make install
I get the following error:
Installing PEAR environment: /usr/local/lib/php/
/usr/src/www/php/php-5.5.33/sapi/cli/php: symbol lookup error: /usr/src/www/php/php-5.5.33/sapi/cli/php: undefined symbol: __xmlFree
Makefile:390: recipe for target 'install-pear-installer' failed
make[1]: *** [install-pear-installer] Error 127
Makefile:393: recipe for target 'install-pear' failed
make: *** [install-pear] Error 2
Upon seeing this I ran (from dir /usr/src/www/php/php-5.5.33
) ldd sapi/cli/php
and saw the following (I've omitted most of the output):
libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007efd9c207000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007efd9bea0000)
I was surprised to see this as I had used the --with-libxml-dir
and --with-xsl
options to specify the location of my locally installed, from source into /usr/local, version of libxml2-2.9.3 and libxslt-1.1.28. Also, configure seemed to have picked up this version because there were numerous instances in the output where it said:
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... yes
Now, the make install
error I listed above actually makes sense, as the symbol __xmlFree
is not present in the system's /usr/lib/x86_64-linux-gnu/libxml2.so.2
, as running readelf -s /usr/lib/x86_64-linux-gnu/libxml2.so | grep -i __xmlfree
finds no matches. However, my locally installed version does contain this symbol:
$ readelf -s /usr/local/lib/libxml2.so.2 | grep -i __xmlfree
1409: 00000000000e0b5c 35 FUNC GLOBAL DEFAULT 12 __xmlFree
5249: 00000000000e0b5c 35 FUNC GLOBAL DEFAULT 12 __xmlFree
What is confusing is why sapi/cli/php
is linking against a different version of libxml2 than what I have specified to configure
. Note, my /etc/ld.so.conf
is as follows:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
...and that I have consolidated the /etc/ld.so.conf.d
dir down to a single file that looks like this:
$ cat /etc/ld.so.conf.d/libs.conf
/usr/local/lib
/usr/lib/x86_64-linux-gnu/libfakeroot
...and I have also run ldconfig
after installing libxml2 and libxslt and prior to build php. Here is my full configure
that I used:
./configure --prefix=/usr/local
CFLAGS="-O2 -mtune=native -funroll-loops -fPIC"
--with-libdir=lib
--with-apxs2=/usr/local/apache2/bin/apxs
--disable-debug
--disable-short-tags
--enable-libgcc
--enable-shared=yes
--enable-calendar
--enable-exif
--enable-ftp
--enable-gd-native-ttf
--enable-mbstring
--enable-shmop
--enable-soap
--enable-sockets
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
--with-bz2
--with-curl=/usr/local
--with-freetype-dir
--with-gd
--with-gnu-ld
--with-iconv-dir=/usr/local
--with-jpeg-dir=/usr/local
--with-ldap=/usr/local
--with-libxml-dir=/usr/local
--with-mcrypt
--with-mhash
--with-openssl
--with-openssl-dir=/usr/local
--with-pear
--with-pcre-regex=/usr/local
--with-pcre-dir=/usr/local
--with-png-dir=/usr/local
--with-tidy
--with-readline
--with-tsrm-pthreads
--with-xmlrpc
--with-xsl=/usr/local
--with-zlib
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--without-sqlite3
--without-pdo-sqlite
(Note also that, of all the items that were specified as /usr/local, php actually linked against the system versions of those too, if there were system versions available. Only items that had no system equivalents actually linked against the version I specified).
Why is php linking against different versions than what I have indicated? It seems that if this wasn't happening I probably wouldn't get the error during make install
.
php make configure
add a comment |
I'm trying to build php-5.5.33 from source on a Debian 8 system; configure
and make
both run successfully, but when I run make install
I get the following error:
Installing PEAR environment: /usr/local/lib/php/
/usr/src/www/php/php-5.5.33/sapi/cli/php: symbol lookup error: /usr/src/www/php/php-5.5.33/sapi/cli/php: undefined symbol: __xmlFree
Makefile:390: recipe for target 'install-pear-installer' failed
make[1]: *** [install-pear-installer] Error 127
Makefile:393: recipe for target 'install-pear' failed
make: *** [install-pear] Error 2
Upon seeing this I ran (from dir /usr/src/www/php/php-5.5.33
) ldd sapi/cli/php
and saw the following (I've omitted most of the output):
libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007efd9c207000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007efd9bea0000)
I was surprised to see this as I had used the --with-libxml-dir
and --with-xsl
options to specify the location of my locally installed, from source into /usr/local, version of libxml2-2.9.3 and libxslt-1.1.28. Also, configure seemed to have picked up this version because there were numerous instances in the output where it said:
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... yes
Now, the make install
error I listed above actually makes sense, as the symbol __xmlFree
is not present in the system's /usr/lib/x86_64-linux-gnu/libxml2.so.2
, as running readelf -s /usr/lib/x86_64-linux-gnu/libxml2.so | grep -i __xmlfree
finds no matches. However, my locally installed version does contain this symbol:
$ readelf -s /usr/local/lib/libxml2.so.2 | grep -i __xmlfree
1409: 00000000000e0b5c 35 FUNC GLOBAL DEFAULT 12 __xmlFree
5249: 00000000000e0b5c 35 FUNC GLOBAL DEFAULT 12 __xmlFree
What is confusing is why sapi/cli/php
is linking against a different version of libxml2 than what I have specified to configure
. Note, my /etc/ld.so.conf
is as follows:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
...and that I have consolidated the /etc/ld.so.conf.d
dir down to a single file that looks like this:
$ cat /etc/ld.so.conf.d/libs.conf
/usr/local/lib
/usr/lib/x86_64-linux-gnu/libfakeroot
...and I have also run ldconfig
after installing libxml2 and libxslt and prior to build php. Here is my full configure
that I used:
./configure --prefix=/usr/local
CFLAGS="-O2 -mtune=native -funroll-loops -fPIC"
--with-libdir=lib
--with-apxs2=/usr/local/apache2/bin/apxs
--disable-debug
--disable-short-tags
--enable-libgcc
--enable-shared=yes
--enable-calendar
--enable-exif
--enable-ftp
--enable-gd-native-ttf
--enable-mbstring
--enable-shmop
--enable-soap
--enable-sockets
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
--with-bz2
--with-curl=/usr/local
--with-freetype-dir
--with-gd
--with-gnu-ld
--with-iconv-dir=/usr/local
--with-jpeg-dir=/usr/local
--with-ldap=/usr/local
--with-libxml-dir=/usr/local
--with-mcrypt
--with-mhash
--with-openssl
--with-openssl-dir=/usr/local
--with-pear
--with-pcre-regex=/usr/local
--with-pcre-dir=/usr/local
--with-png-dir=/usr/local
--with-tidy
--with-readline
--with-tsrm-pthreads
--with-xmlrpc
--with-xsl=/usr/local
--with-zlib
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--without-sqlite3
--without-pdo-sqlite
(Note also that, of all the items that were specified as /usr/local, php actually linked against the system versions of those too, if there were system versions available. Only items that had no system equivalents actually linked against the version I specified).
Why is php linking against different versions than what I have indicated? It seems that if this wasn't happening I probably wouldn't get the error during make install
.
php make configure
I'm trying to build php-5.5.33 from source on a Debian 8 system; configure
and make
both run successfully, but when I run make install
I get the following error:
Installing PEAR environment: /usr/local/lib/php/
/usr/src/www/php/php-5.5.33/sapi/cli/php: symbol lookup error: /usr/src/www/php/php-5.5.33/sapi/cli/php: undefined symbol: __xmlFree
Makefile:390: recipe for target 'install-pear-installer' failed
make[1]: *** [install-pear-installer] Error 127
Makefile:393: recipe for target 'install-pear' failed
make: *** [install-pear] Error 2
Upon seeing this I ran (from dir /usr/src/www/php/php-5.5.33
) ldd sapi/cli/php
and saw the following (I've omitted most of the output):
libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007efd9c207000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007efd9bea0000)
I was surprised to see this as I had used the --with-libxml-dir
and --with-xsl
options to specify the location of my locally installed, from source into /usr/local, version of libxml2-2.9.3 and libxslt-1.1.28. Also, configure seemed to have picked up this version because there were numerous instances in the output where it said:
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... yes
Now, the make install
error I listed above actually makes sense, as the symbol __xmlFree
is not present in the system's /usr/lib/x86_64-linux-gnu/libxml2.so.2
, as running readelf -s /usr/lib/x86_64-linux-gnu/libxml2.so | grep -i __xmlfree
finds no matches. However, my locally installed version does contain this symbol:
$ readelf -s /usr/local/lib/libxml2.so.2 | grep -i __xmlfree
1409: 00000000000e0b5c 35 FUNC GLOBAL DEFAULT 12 __xmlFree
5249: 00000000000e0b5c 35 FUNC GLOBAL DEFAULT 12 __xmlFree
What is confusing is why sapi/cli/php
is linking against a different version of libxml2 than what I have specified to configure
. Note, my /etc/ld.so.conf
is as follows:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
...and that I have consolidated the /etc/ld.so.conf.d
dir down to a single file that looks like this:
$ cat /etc/ld.so.conf.d/libs.conf
/usr/local/lib
/usr/lib/x86_64-linux-gnu/libfakeroot
...and I have also run ldconfig
after installing libxml2 and libxslt and prior to build php. Here is my full configure
that I used:
./configure --prefix=/usr/local
CFLAGS="-O2 -mtune=native -funroll-loops -fPIC"
--with-libdir=lib
--with-apxs2=/usr/local/apache2/bin/apxs
--disable-debug
--disable-short-tags
--enable-libgcc
--enable-shared=yes
--enable-calendar
--enable-exif
--enable-ftp
--enable-gd-native-ttf
--enable-mbstring
--enable-shmop
--enable-soap
--enable-sockets
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
--with-bz2
--with-curl=/usr/local
--with-freetype-dir
--with-gd
--with-gnu-ld
--with-iconv-dir=/usr/local
--with-jpeg-dir=/usr/local
--with-ldap=/usr/local
--with-libxml-dir=/usr/local
--with-mcrypt
--with-mhash
--with-openssl
--with-openssl-dir=/usr/local
--with-pear
--with-pcre-regex=/usr/local
--with-pcre-dir=/usr/local
--with-png-dir=/usr/local
--with-tidy
--with-readline
--with-tsrm-pthreads
--with-xmlrpc
--with-xsl=/usr/local
--with-zlib
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--without-sqlite3
--without-pdo-sqlite
(Note also that, of all the items that were specified as /usr/local, php actually linked against the system versions of those too, if there were system versions available. Only items that had no system equivalents actually linked against the version I specified).
Why is php linking against different versions than what I have indicated? It seems that if this wasn't happening I probably wouldn't get the error during make install
.
php make configure
php make configure
asked Mar 20 '16 at 7:49
zhdasonzhdason
255 bronze badges
255 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I have a very similar problem on Ubuntu 12 with php 5.5 & curl - I needed a newer curl, which I compiled and installed to /usr/local/curl-7.49.1
.
Using --with-curl=/usr/local/curl-7.49.1
did not work as expected - the resulting binary was linked against /usr/lib/x86_64-linux-gnu/libcurl.so
.
BTW: My goal was to link curl statically to the php-binary with libcurl.a (to avoid version problems), but this was not the reason for the problems.
At this point I started to test my build with the enviroment variable LDFLAGS
setting export LDFLAGS=-L/usr/local/curl-7.49.1/lib
.
This did also not work, same result as before.
After doing some research and tests (I am not a autoconf/Makefile specialist ;-) I noticed the call of libtool during the build process:
libtool -L/usr/lib/x86_64-linux-gnu -L/usr/local/curl-7.49.1/lib [...]
The --with-libs
parameter of the configure script is placed before the LDFLAGS
Variable therefore libtool did not pick up my libcurl file but the one from the base system.
So I took a deeper look and tried to set EXTRA_LDFLAGS_PROGRAM
instead of LDFLAGS
:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/curl-7.49.1/lib
Now the build succeeds. I do not know if this is the correct way to solve the problem nor if it´s a bug or a misconfiguration.
I would be very happy if someone could clarify this to me.
So - your case isn't exactly the same, but give this a try before starting configure:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/lib/
Let me know if this helps.
add a comment |
In case anyone is ever looking this up again, I am pretty sure the that the answer lies in the --libdir= parameter of the ./configure command:
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
Sometimes you need --libdir=/usr/lib/x86_64-linux-gnu as Ubuntu keeps many libraries in /usr/lib/x86_64-linux-gnu and sometimes you need --libdir=/usr/local/lib such as when you have built libxml from source and placed it in /usr/local and in other cases, sometimes the simplest solution is to symlink the files from /usr/local/lib to /usr/lib/x86_64-linux-gnu
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f270991%2fphp-links-against-system-libxml-instead-of-version-specified-by-configure-wi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have a very similar problem on Ubuntu 12 with php 5.5 & curl - I needed a newer curl, which I compiled and installed to /usr/local/curl-7.49.1
.
Using --with-curl=/usr/local/curl-7.49.1
did not work as expected - the resulting binary was linked against /usr/lib/x86_64-linux-gnu/libcurl.so
.
BTW: My goal was to link curl statically to the php-binary with libcurl.a (to avoid version problems), but this was not the reason for the problems.
At this point I started to test my build with the enviroment variable LDFLAGS
setting export LDFLAGS=-L/usr/local/curl-7.49.1/lib
.
This did also not work, same result as before.
After doing some research and tests (I am not a autoconf/Makefile specialist ;-) I noticed the call of libtool during the build process:
libtool -L/usr/lib/x86_64-linux-gnu -L/usr/local/curl-7.49.1/lib [...]
The --with-libs
parameter of the configure script is placed before the LDFLAGS
Variable therefore libtool did not pick up my libcurl file but the one from the base system.
So I took a deeper look and tried to set EXTRA_LDFLAGS_PROGRAM
instead of LDFLAGS
:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/curl-7.49.1/lib
Now the build succeeds. I do not know if this is the correct way to solve the problem nor if it´s a bug or a misconfiguration.
I would be very happy if someone could clarify this to me.
So - your case isn't exactly the same, but give this a try before starting configure:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/lib/
Let me know if this helps.
add a comment |
I have a very similar problem on Ubuntu 12 with php 5.5 & curl - I needed a newer curl, which I compiled and installed to /usr/local/curl-7.49.1
.
Using --with-curl=/usr/local/curl-7.49.1
did not work as expected - the resulting binary was linked against /usr/lib/x86_64-linux-gnu/libcurl.so
.
BTW: My goal was to link curl statically to the php-binary with libcurl.a (to avoid version problems), but this was not the reason for the problems.
At this point I started to test my build with the enviroment variable LDFLAGS
setting export LDFLAGS=-L/usr/local/curl-7.49.1/lib
.
This did also not work, same result as before.
After doing some research and tests (I am not a autoconf/Makefile specialist ;-) I noticed the call of libtool during the build process:
libtool -L/usr/lib/x86_64-linux-gnu -L/usr/local/curl-7.49.1/lib [...]
The --with-libs
parameter of the configure script is placed before the LDFLAGS
Variable therefore libtool did not pick up my libcurl file but the one from the base system.
So I took a deeper look and tried to set EXTRA_LDFLAGS_PROGRAM
instead of LDFLAGS
:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/curl-7.49.1/lib
Now the build succeeds. I do not know if this is the correct way to solve the problem nor if it´s a bug or a misconfiguration.
I would be very happy if someone could clarify this to me.
So - your case isn't exactly the same, but give this a try before starting configure:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/lib/
Let me know if this helps.
add a comment |
I have a very similar problem on Ubuntu 12 with php 5.5 & curl - I needed a newer curl, which I compiled and installed to /usr/local/curl-7.49.1
.
Using --with-curl=/usr/local/curl-7.49.1
did not work as expected - the resulting binary was linked against /usr/lib/x86_64-linux-gnu/libcurl.so
.
BTW: My goal was to link curl statically to the php-binary with libcurl.a (to avoid version problems), but this was not the reason for the problems.
At this point I started to test my build with the enviroment variable LDFLAGS
setting export LDFLAGS=-L/usr/local/curl-7.49.1/lib
.
This did also not work, same result as before.
After doing some research and tests (I am not a autoconf/Makefile specialist ;-) I noticed the call of libtool during the build process:
libtool -L/usr/lib/x86_64-linux-gnu -L/usr/local/curl-7.49.1/lib [...]
The --with-libs
parameter of the configure script is placed before the LDFLAGS
Variable therefore libtool did not pick up my libcurl file but the one from the base system.
So I took a deeper look and tried to set EXTRA_LDFLAGS_PROGRAM
instead of LDFLAGS
:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/curl-7.49.1/lib
Now the build succeeds. I do not know if this is the correct way to solve the problem nor if it´s a bug or a misconfiguration.
I would be very happy if someone could clarify this to me.
So - your case isn't exactly the same, but give this a try before starting configure:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/lib/
Let me know if this helps.
I have a very similar problem on Ubuntu 12 with php 5.5 & curl - I needed a newer curl, which I compiled and installed to /usr/local/curl-7.49.1
.
Using --with-curl=/usr/local/curl-7.49.1
did not work as expected - the resulting binary was linked against /usr/lib/x86_64-linux-gnu/libcurl.so
.
BTW: My goal was to link curl statically to the php-binary with libcurl.a (to avoid version problems), but this was not the reason for the problems.
At this point I started to test my build with the enviroment variable LDFLAGS
setting export LDFLAGS=-L/usr/local/curl-7.49.1/lib
.
This did also not work, same result as before.
After doing some research and tests (I am not a autoconf/Makefile specialist ;-) I noticed the call of libtool during the build process:
libtool -L/usr/lib/x86_64-linux-gnu -L/usr/local/curl-7.49.1/lib [...]
The --with-libs
parameter of the configure script is placed before the LDFLAGS
Variable therefore libtool did not pick up my libcurl file but the one from the base system.
So I took a deeper look and tried to set EXTRA_LDFLAGS_PROGRAM
instead of LDFLAGS
:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/curl-7.49.1/lib
Now the build succeeds. I do not know if this is the correct way to solve the problem nor if it´s a bug or a misconfiguration.
I would be very happy if someone could clarify this to me.
So - your case isn't exactly the same, but give this a try before starting configure:
export EXTRA_LDFLAGS_PROGRAM=-L/usr/local/lib/
Let me know if this helps.
edited Jul 14 '16 at 19:40
clk
1,6431 gold badge10 silver badges23 bronze badges
1,6431 gold badge10 silver badges23 bronze badges
answered Jul 14 '16 at 19:26
slemkeslemke
1
1
add a comment |
add a comment |
In case anyone is ever looking this up again, I am pretty sure the that the answer lies in the --libdir= parameter of the ./configure command:
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
Sometimes you need --libdir=/usr/lib/x86_64-linux-gnu as Ubuntu keeps many libraries in /usr/lib/x86_64-linux-gnu and sometimes you need --libdir=/usr/local/lib such as when you have built libxml from source and placed it in /usr/local and in other cases, sometimes the simplest solution is to symlink the files from /usr/local/lib to /usr/lib/x86_64-linux-gnu
add a comment |
In case anyone is ever looking this up again, I am pretty sure the that the answer lies in the --libdir= parameter of the ./configure command:
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
Sometimes you need --libdir=/usr/lib/x86_64-linux-gnu as Ubuntu keeps many libraries in /usr/lib/x86_64-linux-gnu and sometimes you need --libdir=/usr/local/lib such as when you have built libxml from source and placed it in /usr/local and in other cases, sometimes the simplest solution is to symlink the files from /usr/local/lib to /usr/lib/x86_64-linux-gnu
add a comment |
In case anyone is ever looking this up again, I am pretty sure the that the answer lies in the --libdir= parameter of the ./configure command:
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
Sometimes you need --libdir=/usr/lib/x86_64-linux-gnu as Ubuntu keeps many libraries in /usr/lib/x86_64-linux-gnu and sometimes you need --libdir=/usr/local/lib such as when you have built libxml from source and placed it in /usr/local and in other cases, sometimes the simplest solution is to symlink the files from /usr/local/lib to /usr/lib/x86_64-linux-gnu
In case anyone is ever looking this up again, I am pretty sure the that the answer lies in the --libdir= parameter of the ./configure command:
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
Sometimes you need --libdir=/usr/lib/x86_64-linux-gnu as Ubuntu keeps many libraries in /usr/lib/x86_64-linux-gnu and sometimes you need --libdir=/usr/local/lib such as when you have built libxml from source and placed it in /usr/local and in other cases, sometimes the simplest solution is to symlink the files from /usr/local/lib to /usr/lib/x86_64-linux-gnu
edited 57 mins ago
answered 1 hour ago
RedScourgeRedScourge
1294 bronze badges
1294 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f270991%2fphp-links-against-system-libxml-instead-of-version-specified-by-configure-wi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown