Closed gcr closed 8 years ago
This library doesn't build properly with clang 7.0.2 on OSX:
$ luarocks install nixio OPENSSL_DIR=/usr/local/Cellar/openssl/1.0.2d_1/ Installing https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/nixio-0.3-1.src.rock... Using https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/nixio-0.3-1.src.rock... switching to 'build' mode mkdir -p dist/usr/local/share/lua/5.1 cp -pR lua/* dist/usr/local/share/lua/5.1 2>/dev/null || true for i in $(find dist -name .svn); do rm -rf $i || true; done env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/Users/michael/local/torch/install/include -fPIC -c -o src/nixio.o src/nixio.c env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/Users/michael/local/torch/install/include -fPIC -c -o src/socket.o src/socket.c env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/Users/michael/local/torch/install/include -fPIC -c -o src/sockopt.o src/sockopt.c env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 --std=gnu99 -Wall -Werror -pedantic -O2 -fPIC -I/Users/michael/local/torch/install/include -fPIC -c -o src/bind.o src/bind.c src/bind.c:259:30: error: 'memcpy' call operates on objects of type 'nixio_sock' (aka 'struct nixio_socket') while the size is based on a different type 'nixio_sock *' (aka 'struct nixio_socket *') [-Werror,-Wsizeof-pointer-memaccess] memcpy(clsock, sock, sizeof(clsock)); ~~~~~~ ^~~~~~ src/bind.c:259:30: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)? memcpy(clsock, sock, sizeof(clsock)); ^~~~~~ 1 error generated. make: *** [src/bind.o] Error 1 Error: Build error: Failed building.
I'm willing to retry with gcc, but how can I specify which compiler to use?
ah, i've been told that a fix for this is in master, sorry for the noise.
This library doesn't build properly with clang 7.0.2 on OSX:
I'm willing to retry with gcc, but how can I specify which compiler to use?