Re: Compile fails on Mavericks (Xcode 5 really)

2013-11-21 Thread Felipe Cerqueira
Hello,


Trying to compile to OSX Mavericks, I got nor only pthread problem but this:
1) automake version compabilitie:
./autogen.sh 
aclocal... 
autoheader... 
automake... 
Did not find a supported automake

My automaker version: 1.14

2) testapp.c:
testapp.c:1812:13: error: variable length array folded to constant array as 
an extension [-Werror,-Wpedantic]

If accepted as a issue I would like to create a patch to fix it and better 
detect libpthread.



On Wednesday, October 23, 2013 12:48:35 PM UTC-2, Matt Galvin wrote:
>
> Hello,
>
> On both Mac OS X 10.8 and the new 10.9 with Xcode 5 memcached fails to 
> compile. Is this a know issue already? Is there a fix in the works already?
>
> ./configure --enable-64bit --with-libevent=/usr/local
>
> ---
>
> gcc -v 
>
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
> --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
>  
>
>
> Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) 
>
> Target: x86_64-apple-darwin13.0.0 
>
> Thread model: posix
>
> ---
>
> gcc -DHAVE_CONFIG_H -I. -DNDEBUG -I/usr/local/include -m64 -g -O2 -pthread 
> -pthread -Wall -Werror -pedantic -Wmissing-prototypes 
> -Wmissing-declarations -Wredundant-decls -MT memcached-cache.o -MD -MP -MF 
> .deps/memcached-cache.Tpo -c -o memcached-cache.o `test -f 'cache.c' || 
> echo './'`cache.c 
>
> mv -f .deps/memcached-cache.Tpo .deps/memcached-cache.Po 
>
> gcc -m64 -g -O2 -pthread -pthread -Wall -Werror -pedantic 
> -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls 
> -L/usr/local/lib -Wl,-rpath,/usr/local/lib -o memcached 
> memcached-memcached.o memcached-hash.o memcached-slabs.o memcached-items.o 
> memcached-assoc.o memcached-thread.o memcached-daemon.o memcached-stats.o 
> memcached-util.o memcached-cache.o -levent 
>
> clang: error: argument unused during compilation: '-pthread' 
>
> clang: error: argument unused during compilation: '-pthread' 
>
> make[2]: *** [memcached] Error 1 
>
> make[1]: *** [all-recursive] Error 1 
>
> make: *** [all] Error 2
> ---
>
> If I manually remove the -pthread(s) it compiles fine but I'm not sure if 
> that is the correct fix as I've not done any development on memcached as of 
> yet.
>
> Thoughts?
>
> Thanks,
>
> Matt
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Memcached-1.4.5 Solaris 10 Error

2011-03-07 Thread Felipe Cerqueira
Hi,

Its working now.

I have compiled everything on solaris 10 sparc : libevent-2.0.10-
stable and memcached-1.4.5 using gcc 3.4.6.

Thanks


-bash-3.00$ uname -a
SunOS server 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V490
-bash-3.00$ ldd memcached
libumem.so.1 =>  /lib/libumem.so.1
libnsl.so.1 =>   /lib/libnsl.so.1
libsocket.so.1 =>/lib/libsocket.so.1
libevent-2.0.so.5 => /app/atcps/packets/AtcpS/libevent/lib//
libevent-2.0.so.5
libc.so.1 => /lib/libc.so.1
libmp.so.2 =>/lib/libmp.so.2
libmd5.so.1 =>   /lib/libmd5.so.1
libscf.so.1 =>   /lib/libscf.so.1
libsendfile.so.1 =>  /lib/libsendfile.so.1
librt.so.1 =>/lib/librt.so.1
libresolv.so.2 =>/lib/libresolv.so.2
libgcc_s.so.1 => /app/atcps/packets/AtcpS/libgcc//libgcc_s.so.1
libdoor.so.1 =>  /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libaio.so.1 =>   /lib/libaio.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-V490/lib/libmd5_psr.so.1
-bash-3.00$



On Mar 3, 4:01 pm, Felipe Cerqueira  wrote:
> Hi Matt,
>
> thanks for your reply.
>
> I'm using libevent-2.0.10-stable.
>
> I have compiled everything on solaris 9 with gcc version 3.4.0.
>
> Now, trying to resolv the problem, I have download from SFW
> memcached-1.2.6-sol10-sparc-local.gz. Its too old and depends of
> libevent 1.2a (older than memcached). rs
>
> But, installing from this packages, its works fine.
>
> So, I think its a problem with cross compilation of libevent between
> solaris 9 and 10.
>
> I'll compile on solaris 10 and return here the result.
>
> Thanks
>
> On Mar 3, 3:26 pm, Matt Ingenthron  wrote:
>
> > Hi Felipe,
>
> > Do note that the memcached build on Solaris works best when using Sun's
> > cc, not gcc.  Last I checked, it was still freely available (but
> > required registration).
>
> > Which version of libevent did you use?  Solaris 10 has libevent built in
> > over in the SFW repository, and that one has been well tested.  It
> > should be compatible with 1.4.5.  I'd really recommend using it if at
> > all possible.
>
> > Also, note that just to get you going, you can set different envvars to
> > have libevent use different event mechanisms with the OS.  I believe
> > both event ports and /dev/poll are supported with Solaris.
>
> > Hope that helps,
>
> > Matt
>
> > On 3/3/11 9:33 AM, Felipe Cerqueira wrote:
>
> > > Hi All,
>
> > > After some problems, i have success in compiling memcached on solaris
> > > sparc.
>
> > > libmemcached was very hard to get working too. I have a version here
> > > with some patches to detect and implement unsuported features on
> > > solaris like getopt_long and etc...
>
> > > Now, its compiled successfuly and working well on solaris sparc 9.
>
> > > On solaris sparc 10, I'm getting the follow error:
>
> > > -bash-3.00$ uname -a
> > > SunOS server 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V490
> > > -bash-3.00$ ./memcached
> > > [warn] ioctl: DP_POLL: Invalid argument
> > > [warn] ioctl: DP_POLL: Invalid argument
> > > [warn] ioctl: DP_POLL: Invalid argument
> > > [warn] ioctl: DP_POLL: Invalid argument
> > > [warn] ioctl: DP_POLL: Invalid argument
> > > -bash-3.00$
>
> > > -bash-3.00$ ulimit -a
> > > core file size        (blocks, -c) unlimited
> > > data seg size         (kbytes, -d) unlimited
> > > file size             (blocks, -f) unlimited
> > > open files                    (-n) 256
> > > pipe size          (512 bytes, -p) 10
> > > stack size            (kbytes, -s) 8192
> > > cpu time             (seconds, -t) unlimited
> > > max user processes            (-u) 29995
> > > virtual memory        (kbytes, -v) unlimited
> > > -bash-3.00$
>
> > > -bash-3.00$ truss ./memcached
> > > ...
> > > /1:        setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, 
> > > SOV_DEFAULT)
> > > = 0
> > > /1:        setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, 
> > > SOV_DEFAULT)
> > > Err#132 ENOBUFS
> > > /1:        bind(39, 0x0003C0A0, 16, SOV_SOCKBSD)           = 0
> > > /1:        write(9, "\0", 1)                             = 1
> > > /1:        write(16, "\0", 1)                            = 1
> > > /1:        write(23, "\0", 1)   

Re: libmemcache: memcached_behavior_number_of_replicas working?

2011-03-03 Thread Felipe Cerqueira
Hi Bill,

On Mar 3, 3:54 pm, Bill Moseley  wrote:
> On Thu, Mar 3, 2011 at 9:54 AM, Felipe Cerqueira wrote:
>
> > Hi,
>
> > Its works for me on version 0.45 with C.
>
> Well, perhaps I'm not configuring the client correctly.  See below.
>
>
>
> > I didnt like of this behavior but its works.
>
> > The concept of master and slave dont exist. So, if its get a error
> > trying to send data to the hash(key)->server, its dont send data to
> > the others server(s).
>
> Are you saying that even with " MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS" set
> to 1 if the first server write fails then it won't write to the second?
>  That is, once a server fails only reads work?


First of all, replication is only for write. Internally, its wont ask
for a second server.

About your question, its really wont replicate the data if fails on
first server. You can see it on the source code of libmemcached:

See: http://goo.gl/JSSro

I dont like this behaivor too.

>
> Here's a simple test script using the most recent Perl version with output
> below.  Am I not setting this up correctly?
>
> use Memcached::libmemcached qw( :memcached_behavior_t );
> use strict;
> use warnings;
>
> my $memc = Memcached::libmemcached->new;
> $memc->memcached_behavior_set( MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS() => 1
> );
>
> $memc->memcached_server_add( 'localhost', 11211 );
> $memc->memcached_server_add( 'localhost', 11212 );
>
> my $mem1 = Memcached::libmemcached->new;
> $mem1->memcached_server_add( 'localhost', 11211 );
>
> my $mem2 = Memcached::libmemcached->new;
> $mem2->memcached_server_add( 'localhost', 11212 );
>
> printf "Running libmemcached version %s\n",
>     Memcached::libmemcached::memcached_lib_version();
>


The replication only works with binary mode. Did you set it up?
And, remember, this feature is only for replication data, not
consulting (get).

I have tested on libmemcached with C. I dont known about perl.



> for ( 1 .. 8 ) {
>
>     my $id = int rand 1000;
>
>     print "\n= key $id =\n";
>     $memc->memcached_set( $id, 1, 10 )
>         || die 'set failed "' . $memc->errstr . "'\n";
>
>     my ( $flag, $rc );
>
>     $mem1->memcached_get( $id, $flag, $rc )
>         && print "found in mem1\n";
>
>     $mem2->memcached_get( $id, $flag, $rc )
>         && print "found in mem2\n";
>
> }
>
> Running this I see -- not it's only finding the key in one server.
>
> Running libmemcached version 0.44
>
> = key 869 =
> found in mem2
>
> = key 321 =
> found in mem1
>
> = key 618 =
> found in mem1
>
> = key 234 =
> found in mem2
>
> = key 667 =
> found in mem1
>
> = key 54 =
> found in mem2
>
> = key 441 =
> found in mem1
>
> = key 178 =
> found in mem1
>
> One thing I always find odd is if I don't have Memcached running I get:
>
> set failed "SYSTEM ERROR Success'
>
> Does that mean a successful system error? ;)
>
> --
> Bill Moseley
> mose...@hank.org


Re: Memcached-1.4.5 Solaris 10 Error

2011-03-03 Thread Felipe Cerqueira
Hi Matt,

thanks for your reply.

I'm using libevent-2.0.10-stable.

I have compiled everything on solaris 9 with gcc version 3.4.0.

Now, trying to resolv the problem, I have download from SFW
memcached-1.2.6-sol10-sparc-local.gz. Its too old and depends of
libevent 1.2a (older than memcached). rs

But, installing from this packages, its works fine.

So, I think its a problem with cross compilation of libevent between
solaris 9 and 10.

I'll compile on solaris 10 and return here the result.

Thanks

On Mar 3, 3:26 pm, Matt Ingenthron  wrote:
> Hi Felipe,
>
> Do note that the memcached build on Solaris works best when using Sun's
> cc, not gcc.  Last I checked, it was still freely available (but
> required registration).
>
> Which version of libevent did you use?  Solaris 10 has libevent built in
> over in the SFW repository, and that one has been well tested.  It
> should be compatible with 1.4.5.  I'd really recommend using it if at
> all possible.
>
> Also, note that just to get you going, you can set different envvars to
> have libevent use different event mechanisms with the OS.  I believe
> both event ports and /dev/poll are supported with Solaris.
>
> Hope that helps,
>
> Matt
>
> On 3/3/11 9:33 AM, Felipe Cerqueira wrote:
>
> > Hi All,
>
> > After some problems, i have success in compiling memcached on solaris
> > sparc.
>
> > libmemcached was very hard to get working too. I have a version here
> > with some patches to detect and implement unsuported features on
> > solaris like getopt_long and etc...
>
> > Now, its compiled successfuly and working well on solaris sparc 9.
>
> > On solaris sparc 10, I'm getting the follow error:
>
> > -bash-3.00$ uname -a
> > SunOS server 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V490
> > -bash-3.00$ ./memcached
> > [warn] ioctl: DP_POLL: Invalid argument
> > [warn] ioctl: DP_POLL: Invalid argument
> > [warn] ioctl: DP_POLL: Invalid argument
> > [warn] ioctl: DP_POLL: Invalid argument
> > [warn] ioctl: DP_POLL: Invalid argument
> > -bash-3.00$
>
> > -bash-3.00$ ulimit -a
> > core file size        (blocks, -c) unlimited
> > data seg size         (kbytes, -d) unlimited
> > file size             (blocks, -f) unlimited
> > open files                    (-n) 256
> > pipe size          (512 bytes, -p) 10
> > stack size            (kbytes, -s) 8192
> > cpu time             (seconds, -t) unlimited
> > max user processes            (-u) 29995
> > virtual memory        (kbytes, -v) unlimited
> > -bash-3.00$
>
> > -bash-3.00$ truss ./memcached
> > ...
> > /1:        setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, SOV_DEFAULT)
> > = 0
> > /1:        setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, SOV_DEFAULT)
> > Err#132 ENOBUFS
> > /1:        bind(39, 0x0003C0A0, 16, SOV_SOCKBSD)           = 0
> > /1:        write(9, "\0", 1)                             = 1
> > /1:        write(16, "\0", 1)                            = 1
> > /1:        write(23, "\0", 1)                            = 1
> > /1:        write(30, "\0", 1)                            = 1
> > /1:        pwrite(3, "\0\0\004\001\0\0\0\0\0 $".., 24, 0)        = 24
> > /1:        ioctl(3, DP_POLL, 0xFFBFF490)                   Err#22 EINVAL
> > /1:        mmap(0x0001, 65536, PROT_READ|PROT_WRITE|PROT_EXEC,
> > MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEFA
> > [/1:       write(2, " [", 1)                             = 1
> > warn/1:    write(2, " w a r n", 4)                               = 4
> > ] /1:      write(2, " ]  ", 2)                           = 2
> > ioctl: DP_POLL: Invalid argument/1:        write(2, " i o c t l :   D P _ P
> > O".., 32)     = 32
>
> > /1:        write(2, "\n", 1)                             = 1
> > /1:        lwp_unpark(6)                                   = 0
> > /6:        lwp_park(0x, 0)                         = 0
> > /6:        lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFF7) = 0xFFBFFEFF
> > [0x]
> > /6:        lwp_exit()
> > /1:        lwp_wait(6, 0xFFBFF584)                         = 0
> > _exit(0)
>
> > I have look around for some problems on libevent on solaris 10 but
> > cant find any solution.
>
> > Thanks in advance


Re: libmemcache: memcached_behavior_number_of_replicas working?

2011-03-03 Thread Felipe Cerqueira
Hi,

Its works for me on version 0.45 with C.

I didnt like of this behavior but its works.

The concept of master and slave dont exist. So, if its get a error
trying to send data to the hash(key)->server, its dont send data to
the others server(s).



On Mar 3, 12:09 pm, Bill Moseley  wrote:
> http://docs.libmemcached.org/memcached_behavior_set.html#memcached_be...
> 
> or
> http://search.cpan.org/~timb/Memcached-libmemcached-0.4406/lib/Memcac...
>
> Is that feature working in libmemcached?    I tried with Perl's
> Memcached::libmemcached two different versions:
>
>    - Version 0.3102 (with libmemcached-0.31 embedded)
>    - Version 0.4406 (with libmemcached-0.44 embedded)
>
> 
>
> and watching with Wireshark (and also reading from individual servers) I
> only saw a writes to a single server.
>
> use Memcached::libmemcached qw(:memcached_behavior_t );
> use strict;
> use warnings;
>
> my $memc = Memcached::libmemcached->new;
> $memc->memcached_server_add( 'localhost', 11211 );
> $memc->memcached_server_add( 'localhost', 11212 );
>
> # Also tried specifying 2 for number of replicas
> $memc->memcached_behavior_set( MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS() => 1
> );
> $memc->memcached_set( 'test', 1, 10 ) || die 'set failed ' . $memc->errstr;
>
> Also, what does MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT do?  Does that mean
> after a server reports that many failures any gets or sets to that server
> will fail without the library attempting to send to the memcached server?  I
> assume that doesn't mean the server will be pulled out of the pool and keys
> would get rehashed to new servers.  (Although, maybe
> if MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS is set, but if that means keys would
> hash to different servers that seems like a bad idea.)
>
> Yes, I'm looking at poor-man's HA with these two features.  Looking at how
> pulling the plug on one server won't result in get or set failures, and not
> an increased amount of time (say waiting for a failed server to respond).
>
> --
> Bill Moseley
> mose...@hank.org


Memcached-1.4.5 Solaris 10 Error

2011-03-03 Thread Felipe Cerqueira
Hi All,

After some problems, i have success in compiling memcached on solaris
sparc.

libmemcached was very hard to get working too. I have a version here
with some patches to detect and implement unsuported features on
solaris like getopt_long and etc...

Now, its compiled successfuly and working well on solaris sparc 9.

On solaris sparc 10, I'm getting the follow error:

-bash-3.00$ uname -a
SunOS server 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V490
-bash-3.00$ ./memcached
[warn] ioctl: DP_POLL: Invalid argument
[warn] ioctl: DP_POLL: Invalid argument
[warn] ioctl: DP_POLL: Invalid argument
[warn] ioctl: DP_POLL: Invalid argument
[warn] ioctl: DP_POLL: Invalid argument
-bash-3.00$

-bash-3.00$ ulimit -a
core file size(blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files(-n) 256
pipe size  (512 bytes, -p) 10
stack size(kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes(-u) 29995
virtual memory(kbytes, -v) unlimited
-bash-3.00$

-bash-3.00$ truss ./memcached
...
/1: setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, SOV_DEFAULT)
= 0
/1: setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, SOV_DEFAULT)
Err#132 ENOBUFS
/1: bind(39, 0x0003C0A0, 16, SOV_SOCKBSD)   = 0
/1: write(9, "\0", 1)   = 1
/1: write(16, "\0", 1)  = 1
/1: write(23, "\0", 1)  = 1
/1: write(30, "\0", 1)  = 1
/1: pwrite(3, "\0\0\004\001\0\0\0\0\0 $".., 24, 0)  = 24
/1: ioctl(3, DP_POLL, 0xFFBFF490)   Err#22 EINVAL
/1: mmap(0x0001, 65536, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEFA
[/1:write(2, " [", 1)   = 1
warn/1: write(2, " w a r n", 4) = 4
] /1:   write(2, " ]  ", 2) = 2
ioctl: DP_POLL: Invalid argument/1: write(2, " i o c t l :   D P _ P
O".., 32)   = 32

/1: write(2, "\n", 1)   = 1
/1: lwp_unpark(6)   = 0
/6: lwp_park(0x, 0) = 0
/6: lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFF7) = 0xFFBFFEFF
[0x]
/6: lwp_exit()
/1: lwp_wait(6, 0xFFBFF584) = 0
_exit(0)


I have look around for some problems on libevent on solaris 10 but
cant find any solution.

Thanks in advance