Closed ezmiller closed 9 months ago
When I tried to build with make && sudo make install I got a bunch of errors:
make && sudo make install
~/rep > make emiller at emiller-mac (main) cc -g -O2 -o rep rep.c rep.c:406:17: error: implicit declaration of function 'recv' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int count = recv(reader->fd, &ch, 1, 0); ^ rep.c:626:20: error: incomplete result type 'struct sockaddr_in' in function definition struct sockaddr_in options_address_from_file(struct options* options, const char* filename) ^ rep.c:610:8: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in options_address(struct options* options, const char* port); ^ rep.c:631:12: error: calling 'options_address' with incomplete return type 'struct sockaddr_in' return options_address(options, linebuffer); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rep.c:610:20: note: 'options_address' declared here struct sockaddr_in options_address(struct options* options, const char* port); ^ rep.c:610:8: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in options_address(struct options* options, const char* port); ^ rep.c:634:20: error: incomplete result type 'struct sockaddr_in' in function definition struct sockaddr_in options_address_from_relative_file(struct options* options, const char* directory_in, const char* filename) ^ rep.c:610:8: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in options_address(struct options* options, const char* port); ^ rep.c:652:32: error: variable has incomplete type 'struct sockaddr_in' struct sockaddr_in result = options_address_from_file(options, path_to_check); ^ rep.c:610:8: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in options_address(struct options* options, const char* port); ^ rep.c:686:20: error: incomplete result type 'struct sockaddr_in' in function definition struct sockaddr_in options_address(struct options* options, const char* port) ^ rep.c:610:8: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in options_address(struct options* options, const char* port); ^ rep.c:695:28: error: variable has incomplete type 'struct sockaddr_in' struct sockaddr_in result = options_address_from_relative_file(options, absolute_directory, filename); ^ rep.c:610:8: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in options_address(struct options* options, const char* port); ^ rep.c:702:23: error: use of undeclared identifier 'AF_INET' .sin_family = AF_INET, ^ rep.c:703:34: error: use of undeclared identifier 'INADDR_LOOPBACK' .sin_addr.s_addr = htonl(INADDR_LOOPBACK), ^ rep.c:703:34: error: use of undeclared identifier 'INADDR_LOOPBACK' rep.c:703:34: error: use of undeclared identifier 'INADDR_LOOPBACK' rep.c:703:34: error: use of undeclared identifier 'INADDR_LOOPBACK' rep.c:703:34: error: use of undeclared identifier 'INADDR_LOOPBACK' rep.c:703:34: error: use of undeclared identifier 'INADDR_LOOPBACK' rep.c:700:24: error: variable has incomplete type 'struct sockaddr_in' struct sockaddr_in address = ^ rep.c:610:8: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in options_address(struct options* options, const char* port); ^ rep.c:719:35: error: implicit declaration of function 'gethostbyname' is invalid in C99 [-Werror,-Wimplicit-function-declaration] struct hostent *ent = gethostbyname(host_part); ^ rep.c:719:35: note: did you mean 'gethostname'? /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:626:6: note: 'gethostname' declared here int gethostname(char *, size_t); ^ rep.c:719:29: warning: incompatible integer to pointer conversion initializing 'struct hostent *' with an expression of type 'int' [-Wint-conversion] struct hostent *ent = gethostbyname(host_part); ^ ~~~~~~~~~~~~~~~~~~~~~~~~ rep.c:722:28: error: incomplete definition of type 'struct hostent' if (NULL == ent->h_addr) ~~~^ rep.c:719:20: note: forward declaration of 'struct hostent' struct hostent *ent = gethostbyname(host_part); ^ rep.c:727:53: error: incomplete definition of type 'struct hostent' address.sin_addr.s_addr = *(u_long *)ent->h_addr_list[0]; ~~~^ rep.c:719:20: note: forward declaration of 'struct hostent' struct hostent *ent = gethostbyname(host_part); ^ rep.c:947:17: error: implicit declaration of function 'socket' is invalid in C99 [-Werror,-Wimplicit-function-declaration] nrepl->fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 1 warning and 20 errors generated. make: *** [rep] Error 1
When I tried using nix, I got an error:
~/rep ! > nix-build . emiller at emiller-mac (main) error: opening file '/Users/emiller/rep/default.nix': No such file or directory
This was apparently broken by adding Mingw support, and the flake wasn't set up to run on my current laptop. :(
All fixed now.
When I tried to build with
make && sudo make install
I got a bunch of errors:When I tried using nix, I got an error: