Welcome! Log In Create A New Profile

Advanced

debian lenny libevent.a could not be found. Use --with-libevent=shared

Posted by expream 
Hi all!
Have following error:

Configuring fpm
checking for libevent >= 1.4.11... configure: error: libevent.a could
not be found. Use --with-libevent=shared

have installed the latest libevent as in instructions (http://
github.com/dreamcat4/php-fpm) ... have set --with-libevent="path/usr/
local" , before have install libevent in path/usr/local , have checked
there is libevent... where could be the problem? why it couldn't find
libevent?

ps: have tried --with-libevent=shared - it is working... but with --
with-libevent="path" - no...
Have forgot to mention.. that it is php 5.2.11... and fpm 0.6-5.2.11

On Oct 1, 10:23 pm, expream <expr...@inbox.lv> wrote:
> Hi all!
> Have following error:
>
> Configuring fpm
> checking for libevent >= 1.4.11... configure: error: libevent.a could
> not be found. Use --with-libevent=shared
>
> have installed the latest libevent as in instructions (http://
> github.com/dreamcat4/php-fpm) ... have set --with-libevent="path/usr/
> local" , before have install libevent in path/usr/local , have checked
> there is libevent... where could be the problem? why it couldn't find
> libevent?
>
> ps: have tried --with-libevent=shared - it is working... but with --
> with-libevent="path" - no...
On Thu, Oct 1, 2009 at 8:23 PM, expream <expream@inbox.lv> wrote:
>
> Hi all!
> Have following error:
>
> Configuring fpm
> checking for libevent >= 1.4.11... configure: error: libevent.a could
> not be found. Use --with-libevent=shared
>
> have installed the latest libevent as in instructions (http://
> github.com/dreamcat4/php-fpm) ... have set --with-libevent="path/usr/
> local" , before have install libevent in path/usr/local , have checked
> there is libevent... where could be the problem? why it couldn't find
> libevent?
>
> ps: have tried --with-libevent=shared - it is working... but with --
> with-libevent="path" - no...

The error is meant to tell you that the file "libevent.a" can't be
found in the search path(s), wheras the shared version of the library
can. It is an unlikely error, because if the shared library existed,
then so should the static one. So if you installed libevent to the
location, it should pass the static check too.

To check this run:
ls -lsa $LE_PATH/lib/libevent*

Replacing $LE_PATH with exactly the string you used.

Also "path/usr/local" cannot be a relative path.
It must be an absolute path starting with "/".

dreamcat4
dreamcat4@gmail.com
ok.. here is ls -lsa $LE_PATH/lib/libevent* ... so libevent.a is
there... path is full, not relative.. any guess? why it could not
find?

debian:~/try3/php-5.2.11/php-build# ls -lsa /root/try3/libevent-1.4.12-
stable/usr/local/lib/libevent*
0 lrwxrwxrwx 1 root root 21 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent-1.4.so.2 ->
libevent-1.4.so.2.1.3
368 -rwxr-xr-x 1 root root 371397 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent-1.4.so.2.1.3
596 -rw-r--r-- 1 root root 604930 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent.a
0 lrwxrwxrwx 1 root root 26 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_core-1.4.so.2 ->
libevent_core-1.4.so.2.1.3
144 -rwxr-xr-x 1 root root 139449 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_core-1.4.so.2.1.3
232 -rw-r--r-- 1 root root 232470 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_core.a
4 -rwxr-xr-x 1 root root 866 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_core.la
0 lrwxrwxrwx 1 root root 26 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_core.so ->
libevent_core-1.4.so.2.1.3
0 lrwxrwxrwx 1 root root 27 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_extra-1.4.so.2 ->
libevent_extra-1.4.so.2.1.3
292 -rwxr-xr-x 1 root root 293072 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_extra-1.4.so.2.1.3
464 -rw-r--r-- 1 root root 467418 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_extra.a
4 -rwxr-xr-x 1 root root 873 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_extra.la
0 lrwxrwxrwx 1 root root 27 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent_extra.so ->
libevent_extra-1.4.so.2.1.3
4 -rwxr-xr-x 1 root root 831 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent.la
0 lrwxrwxrwx 1 root root 21 2009-10-01 12:47 /root/try3/
libevent-1.4.12-stable/usr/local/lib/libevent.so -> libevent-1.4.so.
2.1.3


On Oct 1, 11:00 pm, dreamcat four <dreamc...@gmail.com> wrote:
> On Thu, Oct 1, 2009 at 8:23 PM, expream <expr...@inbox.lv> wrote:
>
> > Hi all!
> > Have following error:
>
> > Configuring fpm
> > checking for libevent >= 1.4.11... configure: error: libevent.a could
> > not be found. Use --with-libevent=shared
>
> > have installed the latest libevent as in instructions (http://
> > github.com/dreamcat4/php-fpm) ... have set --with-libevent="path/usr/
> > local" , before have install libevent in path/usr/local , have checked
> > there is libevent... where could be the problem? why it couldn't find
> > libevent?
>
> > ps: have tried --with-libevent=shared - it is working... but with --
> > with-libevent="path" - no...
>
> The error is meant to tell you that the file "libevent.a" can't be
> found in the search path(s), wheras the shared version of the library
> can. It is an unlikely error, because if the shared library existed,
> then so should the static one. So if you installed libevent to the
> location, it should pass the static check too.
>
> To check this run:
> ls -lsa $LE_PATH/lib/libevent*
>
> Replacing $LE_PATH with exactly the string you used.
>
> Also "path/usr/local" cannot be a relative path.
> It must be an absolute path starting with "/".
>
> dreamcat4
> dreamc...@gmail.com
What about running "ldconfig" to refresh the shared library cache?
> ok.. here is ls -lsa $LE_PATH/lib/libevent* ... so libevent.a is
> there... path is full, not relative.. any guess? why it could not
> find?
>
it didn't help...

On Oct 1, 11:21 pm, DjZoNe <d...@djz.hu> wrote:
> What about running "ldconfig" to refresh the shared library cache?
>
> > ok.. here is ls -lsa $LE_PATH/lib/libevent* ... so libevent.a is
> > there... path is full, not relative.. any guess? why it could not
> > find?
On Thu, Oct 1, 2009 at 9:30 PM, expream <expream@inbox.lv> wrote:
>
> it didn't help...
>
> On Oct 1, 11:21 pm, DjZoNe <d...@djz.hu> wrote:
>> What about running "ldconfig" to refresh the shared library cache?
>>
>> > ok.. here is ls -lsa $LE_PATH/lib/libevent* ... so libevent.a is
>> > there... path is full, not relative.. any guess? why it could not
>> > find?

Here's the script:

libevent_a="libevent.a"
if test -n "$ac_libevent_path"; then
if test -f "$ac_libevent_path/lib/$libevent_a" ; then
LIBEVENT_LIBS="$ac_libevent_path/lib/$libevent_a"
fi
else
for search_path in $sys_lib_search_path_spec ; do
if test -f "$search_path$libevent_a" ; then
LIBEVENT_LIBS="$search_path$libevent_a"
break;
fi
done
fi
if test -z "$LIBEVENT_LIBS"; then
AC_MSG_ERROR([libevent.a could not be found. Use --with-libevent=shared])
fi

As you can see, the checks in the middle part should discover the .a file.

It can be a permissions thing. For example if one of the directories
along the chain (for example '/root'), doesn't have all the regular
permissions, then 'test -n /path/to/' will fail. Or otherwise 'test -n
/path/to/file' may subsequently fail. This isn't any error in the
configure script.

I'd strongly recommend you don't try compiling or installing anything
as root on a debian-based system. You only need elevated privelidges
when it comes to installing stuff. Even then, you have 'sudo'. A
regular user account can be added to 'admin' group for sudo
privileges. And even if you are root user, then don't compile it in
/root. Compile it in /usr/local/src instead.


These following sudo commands work well in ubuntu. So why not use them
on Lenny ?
(It should help avoid such issues)

#################################################################################
# Sudo

# Evelvate user to sudo privelidges
usermod -a -s /bin/bash -G admin $username

# Rerun the previous command with sudo
sudo !!

# Become root user
sudo -s || sudo su

# Don't require password for sudo
echo "$username ALL=NOPASSWD: ALL" >> /etc/sudoers
#################################################################################


Best regards,

dreamcat4
dreamcat4@gmail.com
ok.. the probles is .. that else section:
for search_path in $sys_lib_search_path_spec ; do
if test -f "$search_path$libevent_a" ;
then
LIBEVENT_LIBS="$search_path
$libevent_a"
break;
fi
done

in first line there is no $PHP_LIBEVENT variable, and on my system it
looks only in 3 system places and there is no libevent... it doesn't
look into path wich was given in --with-libevent="path" ..


On Oct 1, 11:58 pm, dreamcat four <dreamc...@gmail.com> wrote:
> On Thu, Oct 1, 2009 at 9:30 PM, expream <expr...@inbox.lv> wrote:
>
> > it didn't help...
>
> > On Oct 1, 11:21 pm, DjZoNe <d...@djz.hu> wrote:
> >> What about running "ldconfig" to refresh the shared library cache?
>
> >> > ok.. here is ls -lsa $LE_PATH/lib/libevent* ... so libevent.a is
> >> > there... path is full, not relative.. any guess? why it could not
> >> > find?
>
> Here's the script:
>
>                 libevent_a="libevent.a"
>                 if test -n "$ac_libevent_path"; then
>                         if test -f "$ac_libevent_path/lib/$libevent_a" ; then
>                                 LIBEVENT_LIBS="$ac_libevent_path/lib/$libevent_a"
>                         fi
>                 else
>                         for search_path in $sys_lib_search_path_spec ; do
>                                 if test -f "$search_path$libevent_a" ; then
>                                         LIBEVENT_LIBS="$search_path$libevent_a"
>                                         break;
>                                 fi
>                         done
>                 fi
>                 if test -z "$LIBEVENT_LIBS"; then
>                         AC_MSG_ERROR([libevent.a could not be found. Use --with-libevent=shared])
>                 fi
>
> As you can see, the checks in the middle part should discover the .a file.
>
> It can be a permissions thing. For example if one of the directories
> along the chain (for example '/root'), doesn't have all the regular
> permissions, then 'test -n /path/to/' will fail. Or otherwise 'test -n
> /path/to/file' may subsequently fail.  This isn't any error in the
> configure script.
>
> I'd strongly recommend you don't try compiling or installing anything
> as root on a debian-based system. You only need elevated privelidges
> when it comes to installing stuff. Even then, you have 'sudo'. A
> regular user account can be added to 'admin' group for sudo
> privileges. And even if you are root user, then don't compile it in
> /root. Compile it in /usr/local/src instead.
>
> These following sudo commands work well in ubuntu. So why not use them
> on Lenny ?
> (It should help avoid such issues)
>
> #################################################################################
> # Sudo
>
> # Evelvate user to sudo privelidges
> usermod -a -s /bin/bash -G admin $username
>
> # Rerun the previous command with sudo
> sudo !!
>
> # Become root user
> sudo -s || sudo su
>
> # Don't require password for sudo
> echo "$username ALL=NOPASSWD: ALL" >> /etc/sudoers
> #################################################################################
>
> Best regards,
>
> dreamcat4
> dreamc...@gmail.com
On Thu, Oct 1, 2009 at 11:27 PM, expream <expream@inbox.lv> wrote:
>
> ok.. the probles is .. that else section:
>  for search_path in $sys_lib_search_path_spec ; do
>                                if test -f "$search_path$libevent_a" ;
> then
>                                        LIBEVENT_LIBS="$search_path
> $libevent_a"
>                                        break;
>                                fi
>                        done
>
> in first line there is no $PHP_LIBEVENT variable, and on my system it

Not so. Earlier on the script loops through the relevant library
search paths including $PHP_LIBEVENT. It's worked well for me.

>From your earlier comments, it seems that you also installed libevent
onto the system somewhere. So why not use --with-libevent=yes ?
And it will avoid the one in the '/root' directory.

>>
>> Best regards,
>>
>> dreamcat4
>> dreamc...@gmail.com
mmmm.. don't know what to say :) I'm nooby in linux world .. and it is
my first experience... and so .. if you follow steps in
markdown.readme - it will not work: install libevent in custom dir and
then you need to set --with-libevent="path" - it will not find
libevent. --with-libevent="yes" it will not work too. It works --with-
libevent=shared, and everyone is using it (i have searched the web,
end sultions were only to use shared). If I use --with-
libevent="path" , patch looks only in /lib, /lib64, /lib32...but wy
not in path I have included?? It works if you install libevent in
system path, but not in customs... so it is my experience on debian
lenny with php 5.2.11

On Oct 2, 11:06 am, dreamcat four <dreamc...@gmail.com> wrote:
> On Thu, Oct 1, 2009 at 11:27 PM, expream <expr...@inbox.lv> wrote:
>
> > ok.. the probles is .. that else section:
> >  for search_path in $sys_lib_search_path_spec ; do
> >                                if test -f "$search_path$libevent_a" ;
> > then
> >                                        LIBEVENT_LIBS="$search_path
> > $libevent_a"
> >                                        break;
> >                                fi
> >                        done
>
> > in first line there is no $PHP_LIBEVENT variable, and on my system it
>
> Not so. Earlier on the script loops through the relevant library
> search paths including $PHP_LIBEVENT. It's worked well for me.
>
> From your earlier comments, it seems that you also installed libevent
> onto the system somewhere. So why not use --with-libevent=yes ?
> And it will avoid the one in the '/root' directory.
>
>
>
>
>
> >> Best regards,
>
> >> dreamcat4
> >> dreamc...@gmail.com
Hi,

It was expected a directory permissions issue (no -x execute bit). But
when i tried compiling as the 'root' user today, it worked fine again.

And when I did this:
chmod 400 "/usr/local/src/play/libevent-1.4.12-stable/usr/local/lib"

No luck either (we get a different error - "libevent could not be found").

Maybe canceled / aborted (CTRL+C) during installation. If libevent was
installing (to system) the files, it might fail to copy the libevent.a
file but yes for libevent.so. Or it could just be anything, we don't
know.

However its true that in our installation guide, we say only to
compile libevent into its own directory. Most programs would ask you
to install the system directories. So its also possible to install
libevent system-wide.

Certainly that particular error message - its not a very helpful one.
We shall improve the wording and expand with help-tips. In future, it
says:

checking dynamic linker characteristics... GNU/Linux ld.so
checking for libevent >= 1.4.11... no
configure: WARNING: libevent.a could not be found. We looked in:
configure: WARNING: "/usr/local/src/play/libevent-1.4.12-stable/usr/local"
configure: WARNING: Install libevent system-wide (make install)
configure: WARNING: Syntax:
configure: WARNING: --with-libevent=shared[,path] - Use libevent.so
(shared library)
configure: WARNING: --with-libevent[=yes|path] - Use libevent.a (static library)
configure: error: libevent.a could not be found. Stop.

Probably the best we can do for now.


On Fri, Oct 2, 2009 at 3:11 PM, expream <expream@inbox.lv> wrote:
>
> mmmm.. don't know what to say :) I'm nooby in linux world .. and it is
> my first experience... and so .. if you follow steps in
> markdown.readme - it will not work: install libevent in custom dir and
> then you need to set --with-libevent="path" - it will not find
> libevent. --with-libevent="yes" it will not work too. It works --with-
> libevent=shared, and everyone is using it (i have searched the web,
> end sultions were only to use shared). If I use --with-
> libevent="path" , patch looks only in /lib, /lib64, /lib32...but wy
> not in path I have included?? It works if you install libevent in
> system path, but not in customs... so it is my experience on debian
> lenny with php 5.2.11
>
> On Oct 2, 11:06 am, dreamcat four <dreamc...@gmail.com> wrote:
>> On Thu, Oct 1, 2009 at 11:27 PM, expream <expr...@inbox.lv> wrote:
>>
>> > ok.. the probles is .. that else section:
>> >  for search_path in $sys_lib_search_path_spec ; do
>> >                                if test -f "$search_path$libevent_a" ;
>> > then
>> >                                        LIBEVENT_LIBS="$search_path
>> > $libevent_a"
>> >                                        break;
>> >                                fi
>> >                        done
>>
>> > in first line there is no $PHP_LIBEVENT variable, and on my system it
>>
>> Not so. Earlier on the script loops through the relevant library
>> search paths including $PHP_LIBEVENT. It's worked well for me.
>>
>> From your earlier comments, it seems that you also installed libevent
>> onto the system somewhere. So why not use --with-libevent=yes ?
>> And it will avoid the one in the '/root' directory.
>>
>>
>>
>>
>>
>> >> Best regards,
>>
>> >> dreamcat4
>> >> dreamc...@gmail.com
It will help for users like me :)

On Oct 2, 6:44 pm, dreamcat four <dreamc...@gmail.com> wrote:
> Hi,
>
> It was expected a directory permissions issue (no -x execute bit). But
> when i tried compiling as the 'root' user today, it worked fine again.
>
> And when I did this:
> chmod 400 "/usr/local/src/play/libevent-1.4.12-stable/usr/local/lib"
>
> No luck either (we get a different error - "libevent could not be found").
>
> Maybe canceled / aborted (CTRL+C) during installation. If libevent was
> installing (to system) the files, it might fail to copy the libevent.a
> file but yes for libevent.so. Or it could just be anything, we don't
> know.
>
> However its true that in our installation guide, we say only to
> compile libevent into its own directory. Most programs would ask you
> to install the system directories. So its also possible to install
> libevent system-wide.
>
> Certainly that particular error message - its not a very helpful one.
> We shall improve the wording and expand with help-tips. In future, it
> says:
>
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking for libevent >= 1.4.11... no
> configure: WARNING: libevent.a could not be found. We looked in:
> configure: WARNING: "/usr/local/src/play/libevent-1.4.12-stable/usr/local"
> configure: WARNING: Install libevent system-wide (make install)
> configure: WARNING: Syntax:
> configure: WARNING: --with-libevent=shared[,path] - Use libevent.so
> (shared library)
> configure: WARNING: --with-libevent[=yes|path] - Use libevent.a (static library)
> configure: error: libevent.a could not be found. Stop.
>
> Probably the best we can do for now.
>
>
>
> On Fri, Oct 2, 2009 at 3:11 PM, expream <expr...@inbox.lv> wrote:
>
> > mmmm.. don't know what to say :) I'm nooby in linux world .. and it is
> > my first experience... and so .. if you follow steps in
> > markdown.readme - it will not work: install libevent in custom dir and
> > then you need to set --with-libevent="path" - it will not find
> > libevent. --with-libevent="yes" it will not work too. It works --with-
> > libevent=shared, and everyone is using it (i have searched the web,
> > end sultions were only to use shared). If I use --with-
> > libevent="path" , patch looks only in /lib, /lib64, /lib32...but wy
> > not in path I have included?? It works if you install libevent in
> > system path, but not in customs... so it is my experience on debian
> > lenny with php 5.2.11
>
> > On Oct 2, 11:06 am, dreamcat four <dreamc...@gmail.com> wrote:
> >> On Thu, Oct 1, 2009 at 11:27 PM, expream <expr...@inbox.lv> wrote:
>
> >> > ok.. the probles is .. that else section:
> >> >  for search_path in $sys_lib_search_path_spec ; do
> >> >                                if test -f "$search_path$libevent_a" ;
> >> > then
> >> >                                        LIBEVENT_LIBS="$search_path
> >> > $libevent_a"
> >> >                                        break;
> >> >                                fi
> >> >                        done
>
> >> > in first line there is no $PHP_LIBEVENT variable, and on my system it
>
> >> Not so. Earlier on the script loops through the relevant library
> >> search paths including $PHP_LIBEVENT. It's worked well for me.
>
> >> From your earlier comments, it seems that you also installed libevent
> >> onto the system somewhere. So why not use --with-libevent=yes ?
> >> And it will avoid the one in the '/root' directory.
>
> >> >> Best regards,
>
> >> >> dreamcat4
> >> >> dreamc...@gmail.com
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready