-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add appveyor.yml for Windows CI. Closes GH-76 #77
Conversation
https://curl.haxx.se/docs/faq.html#Link_errors_when_building_libcur
|
Definining CURL_STATICLIB only changes what fails to link:
|
Testing on a Windows 10 VM with the same steps, it can't find the curl library (not in C:\Program Files\CURL\lib). Looking closely at the AppVeyor logs, its picking up some other version seemingly preinstalled on AppVeyor:
AppVeyor is supposed to include curl 7.53.1? (maybe only newer images?) appveyor/ci#1431 |
Stabbing in the dark, but made some progress: removed the need to download and unpack the curl distribution, instead using AppVeyor's preinstalled C:\Tools\curl. Nonetheless, still same link error. Without -DCURL_STATICLIB: https://ci.appveyor.com/project/satoshinm/netcraft/build/1.0.58
With -DCURL_STATICLIB: https://ci.appveyor.com/project/satoshinm/netcraft/build/1.0.61
Library linkage is missing somewhere. |
The headers in C:\Tools\curl\include are fine, but unsure about the libraries.. they are Volume in drive C is Windows
Volume Serial Number is D4AB-4044
Directory of C:\Tools\curl
03/23/2017 02:34 AM <DIR> .
03/23/2017 02:34 AM <DIR> ..
02/24/2017 07:50 AM <DIR> bin
02/24/2017 07:50 AM 66 BUILD-HOMEPAGE.url
02/24/2017 07:50 AM 299 BUILD-README.txt
02/24/2017 07:50 AM 185,520 CHANGES.txt
08/30/2014 10:41 PM 1,928 COPYING-libssh2.txt
02/26/2017 10:00 AM 1,179 COPYING-nghttp2.txt
01/15/2017 05:29 PM 5,302 COPYING-zlib.txt
02/21/2017 07:09 AM 1,110 COPYING.txt
02/24/2017 07:50 AM <DIR> docs
02/24/2017 07:50 AM <DIR> include
02/24/2017 07:50 AM <DIR> lib
02/16/2017 11:58 AM 6,251 LICENSE-openssl.txt
11/07/2016 09:18 AM 19,214 mk-ca-bundle.pl
11/07/2016 09:18 AM 1,659 README.txt
02/24/2017 07:49 AM 1,421 RELEASE-NOTES.txt
11 File(s) 223,949 bytes
Directory of C:\projects\netcraft
File Not Found
Directory of C:\Tools\curl\bin
02/24/2017 07:50 AM <DIR> .
02/24/2017 07:50 AM <DIR> ..
02/24/2017 07:50 AM 261,889 curl-ca-bundle.crt
02/24/2017 07:50 AM 3,533,824 curl.exe
02/24/2017 07:50 AM 756,736 libcurl.dll
3 File(s) 4,552,449 bytes
Directory of C:\projects\netcraft
File Not Found
Directory of C:\Tools\curl\lib
02/24/2017 07:50 AM <DIR> .
02/24/2017 07:50 AM <DIR> ..
02/24/2017 07:50 AM 733,392 libcurl.a
02/24/2017 07:50 AM 37,568 libcurldll.a
2 File(s) 770,960 bytes
Directory of C:\projects\netcraft
File Not Found
Directory of C:\Tools\curl\include
02/24/2017 07:50 AM <DIR> .
02/24/2017 07:50 AM <DIR> ..
02/24/2017 07:50 AM <DIR> curl
0 File(s) 0 bytes
3 Dir(s) 32,208,166,912 bytes free Found this: http://stackoverflow.com/questions/12107885/libcurl-lib-where-can-i-get-it#12492652 - refers to http://curl.haxx.se/download/libcurl-7.19.3-win32-ssl-msvc.zip as containing libcurl.lib. But this link is 404. Latest downloads: https://curl.haxx.se/download.html - where is win32-ssl-msvc? https://curl.haxx.se/mail/lib-2010-08/0094.html refers to https://curl.haxx.se/latest.cgi?curl=win32-ssl-devel-msvc but it says "The recent-version-off-a-mirror system has no info about your requested package "win32-ssl-devel-msvc"! :-( This is most likely because there is no up-to-date release for "win32-ssl-devel-msvc".". How about without ssl? win32-devel-msvc same error: https://curl.haxx.se/latest.cgi?curl=win32-devel-msvc There are various Windows downloads here, some labeled SSL, maybe they renamed the files: https://curl.haxx.se/download.html#Win32. Win32 - Generic, Win32 zip 7.54.0 binary SSL SSH looks promising, but 404's: http://www.paehl.com/open_source/?CURL_7.54.0. There is a 7z: https://bintray.com/artifact/download/vszakats/generic/curl-7.54.0-win32-mingw.7z - this one downloads, requires 7zip to extract, but it contains the same lib/libcurl.a and lib/libcurldll.a files. Is the problem msvc vs mingw? Can't find a libcurl.lib (msvc) anywhere, should try to get to build with libcurl.a (mingw). msvc (Microsoft Visual Studio 2013) support was added by merging this pull request: fogleman/Craft#139 "Visual Studio 2013 has C99 support which allows Craft to be built successfully using the MSVC compiler." - just adding some conditionals and fixes. Why is |
%PATH%:
|
What compiler were the libraries in C:\tools\curl\lib built with, mingw? http://stackoverflow.com/questions/42663089/c-adding-static-library-to-cmake-project-results-in-undefined-references demonstrates an error caused by trying to link Visual Studio libraries into a mingw application. Try downloading the mingw libraries? I am going to try building locally. I can replicate the failure locally as follows: download and extract https://bintray.com/artifact/download/vszakats/generic/curl-7.54.0-win32-mingw.7z to C:\Program Files\CURL (note requires using 7zip-compatible tool, not included in Windows), cmake -G "MinGW Makefiles", then mingw32-make. Can now investigate locally instead of cluttering up AppVeyor. Whoa.. if I add add_definitions(-DCURL_STATICLIB) on my local Windows 10 VM, I get a bunch of different linker errors, about not finding OpenSSL symbols. Haven't seen that on AppVeyor. This issue occurs with fogleman/Craft, not specific to NetCraft. There is an issue on it: fogleman/Craft#144 which says to download and build curl from source (same |
Attempt at building curl on my clean Windows 10 VM locally:
Seriously, I need to install Perl? but, curl does build fine on AppVeyor (they have Perl). |
Got past the curl trouble by not using curl, but another challenge arises (looks like its compiling all the glfw examples? probably don't need these):
|
#76
Current status: linking craft.exe fails with undefined references in curl even though curl is found by cmake: