basho-labs / riak-c-client

Riak C Client
Apache License 2.0
20 stars 8 forks source link

Build error on Arch Linux #26

Closed rkohrt closed 10 years ago

rkohrt commented 10 years ago

test/build/test_connection.c: In function »test_connection_resolver«: test/build/test_connection.c:70:18: Error: »struct sockaddr« has no element »sa_len« info->ai_addr->sa_len = 16; ^ scons: *\ [test/build/test_connection.o] Error 1 scons: building terminated because of errors.

if I comment that line out, it builds okay... but haven't tested the library yet.

hazen commented 10 years ago

Thanks for trying to build, @rkohrt. We are in the process of switching from Scons to GNU autotools which are a bit more C-standard. Looks like we've got some broken OS socket dependencies, too. I'll add this issue to the list.

hazen commented 10 years ago

Fixed by #28

rkohrt commented 10 years ago

it still does not compile: scons: *\ [build/riak_bucket_props.o] Source build/riak_bucket_props.c' not found, needed by targetbuild/riak_bucket_props.o'.

I figured you had just an typo so I did:

cp src/riak_bucketprops.c src/riak_bucket_props.c

but now I get this: scons: *\ [build/riak_options.o] Source build/riak_options.c' not found, needed by targetbuild/riak_options.o'.

hazen commented 10 years ago

@rkohrt Are you still using Scons? We are switching to the autotools stack instead. I have not removed the Scons stuff yet, but perhaps I should to avoid confusion. I did a very quick and dirty update of the README.md, but let me know if that does not work for you.

rkohrt commented 10 years ago

Yes I was using scons (because it was/is [in the ubuntu section...] written in the readme ;-) ). Okay, so now I did run

./autogen.sh ./configure make

but that didn't work either:

libtool: link: gcc -g -Wall -g -O2 -o .libs/riak_c_example examples/riak_c_example-example.o examples/riak_c_example-example_call_backs.o examples/riak_c_example-riak_command.o -pthread /home/dev/file_storage/riak/riak-c-client/.libs/libriak_c_client-0.1.so -lprotobuf-c -lprotobuf -levent -lcunit -lpthread -pthread -Wl,-rpath -Wl,/usr/local/lib /home/dev/riak/riak-c-client/.libs/libriak_c_client-0.1.so: undefined reference to `riak_set_bucketprops_request_encode' collect2: error: ld returned 1 exit status Makefile:981: recipe for target 'riak_c_example' failed make[1]: * [riak_c_example] Error 1 make[1]: Leaving directory '/home/dev/file_storage/riak/riak-c-client' Makefile:697: recipe for target 'all' failed make: * [all] Error 2

hazen commented 10 years ago

So strange. I really need to build everything on Linux, too, not just OSX. Definitely will up the game when ready to release. Anyway, fixed a typo which seems to build on Ubuntu 12.04 now.

rkohrt commented 10 years ago

It does compile now, thy!