php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59690 /usr/local/bin/ld: error: cannot find -lcurl
Submitted: 2011-03-27 09:33 UTC Modified: 2011-04-09 07:23 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: software-php at interfasys dot ch Assigned:
Status: Open Package: oauth (PECL)
PHP Version: 5.3.5 OS: FreeBSD 8.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-03-27 09:33 UTC] software-php at interfasys dot ch
Description:
------------
cURL is found when running ./configure

checking for grep that handles long lines and -e... 
/usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... 
/usr/bin/sed
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 gcc45 accepts -g... yes
checking for gcc45 option to accept ISO C89... none needed
checking how to run the C preprocessor... cpp45
checking for icc... no
checking for suncc... no
checking whether gcc45 and cc understand -c and -o 
together... yes
checking for system library directory... lib
checking if compiler supports -R... yes
checking build system type... x86_64-unknown-freebsd8.2
checking host system type... x86_64-unknown-freebsd8.2
checking target system type... x86_64-unknown-freebsd8.2
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-20090626
checking for PHP installed headers prefix... 
/usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if 
you want to 
regenerate PHP parsers.
checking for gawk... gawk
checking for oauth support... yes, shared
checking for cURL in default path... found in /usr/local
checking for ld used by gcc45... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for /usr/local/bin/ld option to reload object 
files... -r
checking for BSD-compatible nm... /usr/local/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... 
196608
checking command to parse /usr/local/bin/nm -B output from 
gcc45 
object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc45 supports -fno-rtti -fno-exceptions... no
checking for gcc45 option to produce PIC... -fPIC
checking if gcc45 PIC flag -fPIC works... yes
checking if gcc45 static flag -static works... yes
checking if gcc45 supports -c -o file.o... yes
checking whether the gcc45 linker (/usr/local/bin/ld) 
supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd8.2 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
checking whether the g++45 linker (/usr/local/bin/ld) 
supports shared 
libraries... yes
checking for g++45 option to produce PIC...
checking if g++45 static flag  works... yes
checking if g++45 supports -c -o file.o... yes
checking whether the g++45 linker (/usr/local/bin/ld) 
supports shared 
libraries... yes
checking dynamic linker characteristics... freebsd8.2 ld.so
(cached) (cached) checking how to hardcode library paths 
into 
programs... unsupported
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged


But then, compilation fails:
/bin/sh oauth-1.1.0/libtool --mode=link gcc45 -DPHP_ATOM_INC 
-Ioauth-
1.1.0/include -Ioauth-1.1.0/main -Ioauth-1.1.0 -
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  -O2 -
pipe -
march=native -fno-strict-aliasing -mfpmath=sse -Wall -g   -o 
oauth.la -
export-dynamic -avoid-version -prefer-pic -module -rpath 
oauth-
1.1.0/modules  oauth.lo provider.lo -lcurl
gcc45 -shared  .libs/oauth.o .libs/provider.o  -lcurl  -
march=native -
mfpmath=sse -Wl,-soname -Wl,oauth.so -o .libs/oauth.so
/usr/local/bin/ld: error: cannot find -lcurl
collect2: ld returned 1 exit status
gmake: *** [oauth.la] Error 1



Expected result:
----------------
A successful compilation

Actual result:
--------------
Cannot compile extension

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-09 07:23 UTC] software-php at interfasys dot ch
The workaround is to add this to ./configure
"LDFLAGS=-L/usr/local/lib"
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Dec 15 02:01:24 2019 UTC