Compiling Nix fails

Hi. Since I have no root access on my current machine, I am trying to compile Nix manually with another store direction. The configure script runs without errors, but when trying to compile, I get the following error, related to cURL:

###############################################################
src/libstore/download.cc: In member function 'void nix::CurlDownloader::DownloadItem::finish(CURLcode)':              [6/1661]

src/libstore/download.cc:381:30: error: 'CURLE_NOT_BUILT_IN' was not declared in this scope                          

                         case CURLE_NOT_BUILT_IN:                                                                    

                              ^~~~~~~~~~~~~~~~~~                                                                      

src/libstore/download.cc:381:30: note: suggested alternative: 'CURLE_GOT_NOTHING'                                    

                         case CURLE_NOT_BUILT_IN:                                                                    

                              ^~~~~~~~~~~~~~~~~~                                                                      

                              CURLE_GOT_NOTHING          

src/libstore/download.cc:382:30: error: 'CURLE_REMOTE_ACCESS_DENIED' was not declared in this scope

                         case CURLE_REMOTE_ACCESS_DENIED:                              

                              ^~~~~~~~~~~~~~~~~~~~~~~~~~

src/libstore/download.cc:382:30: note: suggested alternative: 'CURLE_FTP_ACCESS_DENIED'

                         case CURLE_REMOTE_ACCESS_DENIED:

                              ^~~~~~~~~~~~~~~~~~~~~~~~~~                                    

                              CURLE_FTP_ACCESS_DENIED

src/libstore/download.cc:388:30: error: 'CURLE_UNKNOWN_OPTION' was not declared in this scope

                         case CURLE_UNKNOWN_OPTION:                              

                              ^~~~~~~~~~~~~~~~~~~~

src/libstore/download.cc:388:30: note: suggested alternative: 'CURL_NETRC_OPTION'

                         case CURLE_UNKNOWN_OPTION:

                              ^~~~~~~~~~~~~~~~~~~~                                              

                              CURL_NETRC_OPTION        

src/libstore/download.cc:389:30: error: 'CURLE_SSL_CACERT_BADFILE' was not declared in this scope

                         case CURLE_SSL_CACERT_BADFILE:                        

                              ^~~~~~~~~~~~~~~~~~~~~~~~

src/libstore/download.cc:389:30: note: suggested alternative: 'CURLE_SSL_CACERT'

                         case CURLE_SSL_CACERT_BADFILE:

                              ^~~~~~~~~~~~~~~~~~~~~~~~                                      

                              CURLE_SSL_CACERT                                                                        

src/libstore/download.cc: In member function 'void nix::CurlDownloader::workerThreadMain()':

src/libstore/download.cc:527:32: error: elements of array 'nix::CurlDownloader::workerThreadMain()::curl_waitfd extraFDs [1]'

have incomplete type                    

             struct curl_waitfd extraFDs[1];                                  

                                ^~~~~~~~                                                

src/libstore/download.cc:527:32: error: storage size of 'extraFDs' isn't known

src/libstore/download.cc:529:34: error: 'CURL_WAIT_POLLIN' was not declared in this scope

             extraFDs[0].events = CURL_WAIT_POLLIN;

                                  ^~~~~~~~~~~~~~~~

src/libstore/download.cc:529:34: note: suggested alternative: 'CURLOPT_POST'

             extraFDs[0].events = CURL_WAIT_POLLIN;

                                  ^~~~~~~~~~~~~~~~

                                  CURLOPT_POST

src/libstore/download.cc:536:18: error: 'curl_multi_wait' was not declared in this scope

             mc = curl_multi_wait(curlm, extraFDs, 1, sleepTimeMs, &numfds);

                  ^~~~~~~~~~~~~~~

src/libstore/download.cc:536:18: note: suggested alternative: 'curl_multi_init'

             mc = curl_multi_wait(curlm, extraFDs, 1, sleepTimeMs, &numfds);

                  ^~~~~~~~~~~~~~~

                  curl_multi_init

mk/patterns.mk:2: recipe for target 'src/libstore/download.o' failed
###############################################################

I compiled cURL myself, it says:

###############################################################
$ curl --version
curl 7.61.1 (i686-pc-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.2 zlib/1.2.8
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy
###############################################################

Best Regards
Christoph-Simon Senjak