LibCURL and latest BlitzMax NG 1.56 (0.129 - 3.45)

Started by degac, January 06, 2021, 12:13:47

Previous topic - Next topic

degac

Hi

just downloaded and installed latest Bmx NG and tried to compile something using LibCURL (from Brucey Maxmods).
With version 0.12+3.41 everything works without problem, with the new version I've got this

QuoteC:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_base64.c.release.win32.x64.o):base64.c:(.text+0x90): undefined reference to `__imp_curl_msnprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_conncache.c.release.win32.x64.o):conncache.c:(.text+0x63): undefined reference to `__imp_curl_easy_init'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_conncache.c.release.win32.x64.o):conncache.c:(.text+0x142): undefined reference to `__imp_curl_msnprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_conncache.c.release.win32.x64.o):conncache.c:(.text+0x332): undefined reference to `__imp_curl_msnprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0xc71): undefined reference to `__imp_curl_getdate'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x13a6): undefined reference to `__imp_curl_strnequal'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1528): undefined reference to `__imp_curl_slist_free_all'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1c42): undefined reference to `__imp_curl_maprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1ce1): undefined reference to `__imp_curl_slist_free_all'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1d9b): undefined reference to `__imp_curl_slist_free_all'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1f6d): undefined reference to `__imp_curl_maprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1f8e): undefined reference to `__imp_curl_mfprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x2022): undefined reference to `__imp_curl_slist_free_all'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x20c3): undefined reference to `__imp_curl_mfprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_file.c.release.win32.x64.o):file.c:(.text+0x1b7): undefined reference to `__imp_curl_msnprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x13): undefined reference to `__imp_curl_mime_init'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x4d): undefined reference to `__imp_curl_mime_subparts'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x7b): undefined reference to `__imp_curl_mime_addpart'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0xec): undefined reference to `__imp_curl_mime_name'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x15f): undefined reference to `__imp_curl_mime_headers'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x1ae): undefined reference to `__imp_curl_mime_type'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x211): undefined reference to `__imp_curl_mime_name'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x2a4): undefined reference to `__imp_curl_mime_data_cb'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x2d2): undefined reference to `__imp_curl_mime_filename'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x329): undefined reference to `__imp_curl_mime_data'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x358): undefined reference to `__imp_curl_mime_filedata'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x38b): undefined reference to `__imp_curl_mime_data_cb'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x39d): undefined reference to `__imp_curl_mime_data'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x3b9): undefined reference to `__imp_curl_mime_filename'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x3c7): undefined reference to `__imp_curl_mime_name'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x3da): undefined reference to `__imp_curl_mime_name'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_curl_ntlm_core.c.release.win32.x64.o):curl_ntlm_core.c:(.text+0xa75): undefined reference to `__imp_curl_msnprintf'
collect2.exe: error: ld returned 1 exit status

I'm not sure it's a bug in the library or in Bmax NG..
If there's a problem, there's at least one solution.
www.blitzmax.org

Derron

You are talking about
https://github.com/maxmods/bah.mod/tree/master/libcurl.mod
?
where does your "3.45" come from?
libcurl there is "libcurl 7.57.0"


so in other words: you use latest release package of BlitzMax NG - and the latest sources of above linked libcurl.mod ?
If so ... I would (in the sense of "I could do that for you") raise an issue at github for it (referencing this link) so Brucey is aware of it.


bye
Ron

Derron

I just tried with "latest release of NG + current BCC + current bah.mod" and example 1 compiled and executed fine (changed blitzmax.com to blitzmax.org)

Code (Blitzmax) Select

[100%] Linking:ex_01.debug.exe
Executing:ex_01.debug.exe
* Rebuilt URL to: blitzmax.org/
*   Trying 37.120.176.62...
* TCP_NODELAY set
* Connected to blitzmax.org (37.120.176.62) port 80 (#0)
GET / HTTP/1.1
Host: blitzmax.org
Accept: */*

< HTTP/1.1 301 Moved Permanently
< Date: Wed, 06 Jan 2021 12:57:53 GMT
< Server: Apache/2.4.10 (Debian)
< Location: https://blitzmax.org/
< Content-Length: 307
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
* Connection #0 to host blitzmax.org left intact
* Issue another request to this URL: 'https://blitzmax.org/'
*   Trying 37.120.176.62...
* TCP_NODELAY set
* Connected to blitzmax.org (37.120.176.62) port 443 (#1)
* mbedTLS: Connecting to blitzmax.org:443
* mbedTLS: Set min SSL version to TLS 1.0
* mbedTLS: Handshake complete, cipher is TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384
* Cert verify failed: BADCERT_NOT_TRUSTED
* Closing connection 1

Process complete

degac

Well, I don't know why (I tried to compile many examples, MaxGUI, proxygadgets and so on) and now - after reading Derron's post, no error at all.

So I can compile LibCURL (ModuleInfo "History: Update to libcurl 7.57.0") with latest BmxNG without problems.

Thanks.
If there's a problem, there's at least one solution.
www.blitzmax.org

degac

Ok, it seems there's some problems when I'm working in 'release' mode.
Same example 01 above

SuperStrict

' A simple example which outputs the contents of a URL to the console.
' Also outputs debug info.
'

Framework BaH.libcurl
Import BRL.StandardIO

Local curl:TCurlEasy = TCurlEasy.Create()

curl.setOptInt(CURLOPT_VERBOSE, 1)
curl.setOptInt(CURLOPT_FOLLOWLOCATION, 1)

curl.setOptString(CURLOPT_URL, "blitzmax.org")

Local res:Int = curl.perform()

curl.cleanup()


DEBUG ACTIVE

Building ex_01
Executing:ex_01.debug.exe
* Rebuilt URL to: blitzmax.org/
*   Trying 37.120.176.62...
* TCP_NODELAY set
* Connected to blitzmax.org (37.120.176.62) port 80 (#0)
GET / HTTP/1.1
Host: blitzmax.org
Accept: */*

< HTTP/1.1 301 Moved Permanently
< Date: Sat, 16 Jan 2021 07:11:52 GMT
< Server: Apache/2.4.10 (Debian)
< Location: https://blitzmax.org/
< Content-Length: 307
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
* Connection #0 to host blitzmax.org left intact
* Issue another request to this URL: 'https://blitzmax.org/'
*   Trying 37.120.176.62...
* TCP_NODELAY set
* Connected to blitzmax.org (37.120.176.62) port 443 (#1)
* mbedTLS: Connecting to blitzmax.org:443
* mbedTLS: Set min SSL version to TLS 1.0
* mbedTLS: Handshake complete, cipher is TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384
* Cert verify failed: BADCERT_NOT_TRUSTED
* Closing connection 1

Process complete


In RELEASE

Building ex_01
[ 88%] Processing:ex_01.bmx
[ 94%] Compiling:ex_01.bmx.console.release.win32.x64.c
[100%] Linking:ex_01.exe
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_base64.c.release.win32.x64.o):base64.c:(.text+0x90): undefined reference to `__imp_curl_msnprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_conncache.c.release.win32.x64.o):conncache.c:(.text+0x63): undefined reference to `__imp_curl_easy_init'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_conncache.c.release.win32.x64.o):conncache.c:(.text+0x142): undefined reference to `__imp_curl_msnprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_conncache.c.release.win32.x64.o):conncache.c:(.text+0x332): undefined reference to `__imp_curl_msnprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0xc71): undefined reference to `__imp_curl_getdate'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x13a6): undefined reference to `__imp_curl_strnequal'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1528): undefined reference to `__imp_curl_slist_free_all'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1c42): undefined reference to `__imp_curl_maprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1ce1): undefined reference to `__imp_curl_slist_free_all'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1d9b): undefined reference to `__imp_curl_slist_free_all'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1f6d): undefined reference to `__imp_curl_maprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x1f8e): undefined reference to `__imp_curl_mfprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x2022): undefined reference to `__imp_curl_slist_free_all'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_cookie.c.release.win32.x64.o):cookie.c:(.text+0x20c3): undefined reference to `__imp_curl_mfprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_file.c.release.win32.x64.o):file.c:(.text+0x1b7): undefined reference to `__imp_curl_msnprintf'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x13): undefined reference to `__imp_curl_mime_init'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x4d): undefined reference to `__imp_curl_mime_subparts'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x7b): undefined reference to `__imp_curl_mime_addpart'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0xec): undefined reference to `__imp_curl_mime_name'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x15f): undefined reference to `__imp_curl_mime_headers'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x1ae): undefined reference to `__imp_curl_mime_type'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x211): undefined reference to `__imp_curl_mime_name'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x2a4): undefined reference to `__imp_curl_mime_data_cb'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x2d2): undefined reference to `__imp_curl_mime_filename'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x329): undefined reference to `__imp_curl_mime_data'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x358): undefined reference to `__imp_curl_mime_filedata'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x38b): undefined reference to `__imp_curl_mime_data_cb'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x39d): undefined reference to `__imp_curl_mime_data'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x3b9): undefined reference to `__imp_curl_mime_filename'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x3c7): undefined reference to `__imp_curl_mime_name'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_formdata.c.release.win32.x64.o):formdata.c:(.text+0x3da): undefined reference to `__imp_curl_mime_name'
C:/BlitzMax/mod/bah.mod/libcurl.mod/libcurl.release.win32.x64.a(lsl_curl_ntlm_core.c.release.win32.x64.o):curl_ntlm_core.c:(.text+0xa75): undefined reference to `__imp_curl_msnprintf'
collect2.exe: error: ld returned 1 exit status
Build Error: Failed to link C:/BlitzMax/mod/bah.mod/libcurl.mod/examples/ex_01.exe
Process complete



I'm sure the last week I got the final exe in release mode (just checked)... today I did a simple change to the my code (not CURL) and I got the error above.
I'm trying to delete all .bmx & .a file in the BAH folder interested (curl,ssh2 and mbedtls) and then re-compile/build modules again.
If there's a problem, there's at least one solution.
www.blitzmax.org

Derron

You could build BMK with a feature I added - or tried to add (pull request not accepted for many months now):
https://github.com/GWRon/bmk/tree/feat_resetmodsparam

then it is just a matter of "bmk resetmods brl" (or brl.xyz or pub or --- nothing :D) to remove all this precompilate stuff (.bmx, .a, .i, .i2. ...)


bye
Ron