-
Notifications
You must be signed in to change notification settings - Fork 15
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
Compile problems with gcc #15
Comments
Seems like you perhaps have an old version of inline/macros.h file? Try backing it up and replacing with https://raw.githubusercontent.com/jens-maus/amissl/master/include/inline/macros.h |
hello, thanks, it worked. alas, i still getting compile error due to another reason:
if i remove SSL2_xxx usage, and i use only SSL3_xxx, those errors gone, but its also ending with compile error. i still investigating this issue... |
let's see the first error with SSL_SESSION: in openssl's ssl.h:
in amissl's ssl.h: |
That's a rather old libcurl, from 2014, which would be using the old OpenSSL API - that's the reason for those dereferencing errors, as most structures (including ssl_session_st) have been made private since OpenSSL 1.1.0 and need to be accessed via functions instead. The OpenSSL ssl.h you are looking at is an old version - the latest is the same as AmiSSL in this respect. I had to fix many issues in IBrowse like this, but presumably the latest libcurl is already compatible with OpenSSL 1.1.0. |
@anchor76 Oliver ist correct here. Your CURL version is simply too old and doesn't support OpenSSL 1.1.x. You will have to update libcurl to something like 7.50.x or newer which come with support for the newer OpenSSL 1.1.x API which AmiSSLv4 is based on. |
ok, thanks guys ;) |
ok, i managed to compile the latest libCurl with AmiSSL.
i added the followings to libCurl/openssl.c:
|
Looks maybe like you have the non-AmiSSL openssl include dir in the include search path? My advice would be to move the openssl dir elsewhere, and the AmiSSL includes too. Then you could use -IAmiSSL4 or -IOpenSSL-standalone, for example, when compiling. |
yes, curl still saw openssl. i disposed all openssl, and now i have these errors:
|
@anchor76 First of all, please use proper GitHub Markdown language to format your posts. I really tend to get eye cancer for all the code you post here without proper escaping it as code passages ;) Regarding your questions:
|
thanks Jens! here is the libCurl makefile:
and the project makefile:
|
Hello, when can i expect new AmiSSL release with RAND_egd and PEM_read_X509 support? libCurl requires them. Would be good to update my google-drive, and dropbox handlers with AmiSSL support ... :) |
For RAND_egd() the situation is quite simple. It can be added, but it will do nothing. There is an empty function which does nothing except returning -1 for AmigaOS, but for Windows, MSDOS and several other systems as well. So adding support for RAND_egd() would be simple, but you would gain nothing. Regarding PEM_read_X509() Jens already answered this question. Since the typical FILE structures differ between the indivudual C runtime library implementations it is impossible to include this function directly in AmiSSL. Instead we would need a replacement function for AmigaOS only which uses the AmigaDOS file API. But then you still have to take care of calling this special function yourself, because the code of curl will use the C library's FILE pointers instead of the required AmigaDOS BPTR. |
Ok, its clear. The question is, when can you make a new release? |
@anchor76 Sorry, but I still think you don't understand the implications of these changes. RAND_egd() will be essentially empty and PEM_read_X509() can't be added in a portable way. Thus I would vote against changing anything here. You should better modify your curl patches to 1. not call RAND_egd() as it will anyway just return -1 and then also see if you can replace the use of PEM_read_X509() yourself. |
Well, yes, the RAND_egd() is not important as you said before its not doing anything. For the PEM_read_X509() a new AmiSSL release would be good with PEM_read_X509_amiga() wrapper. |
As @tboeckel eludes to, I don't think is going to be a magic fix for you, even if it were added, without some work on your part anyway (because of the different file i/o interfaces). Can you not add an extra module to your port with suitable wrappers for unsupported functions? For example, write your own PEM_read_X509() which uses PEM_read_bio_X509() instead? PEM_read_X509() itself is essentially just a wrapper anyway - check the source of PEM_ASN1_read() to see what it does. |
Having now had a look at the libcurl source code, it looks to me like the simplest solution for you is to patch openssl.c as PEM_read_X509() is only used once. Replace the area of code starting fopen() and ending fclose(), where PEM_read_X509() is used to avoid using stdio at all and use the OpenSSL BIO interface instead - this is a copy and paste from IBrowse code, as an example:
|
@anchor76 Feel free to contributw to the AmiSSL project in creating these wrappers yourself and sending a pull request. These days qith only 500 users actually using AmiSSL world-wide I would say it is time that all still active Amiga developers start contributinh to other projects than simply requesting a change. |
@anchor76 Did you ever get this resolved?
I can't see any reason why these aren't picked up. MD5 I can probably get around by using Curl internal version, but X509_free() is a bit of a problem. It appears to only be used in this one file: https://github.com/curl/curl/blob/master/lib/vtls/openssl.c |
OK, I've managed to build it but the curl executable won't connect to any secure sites:
|
no, last time when i tried to compile libCurl with AmiSSL, i had no luck. but i didn't give up. i'll check it again soon. btw: as i remember i had to modify libCurl a little to be able to compile for m68k-amigaos target. |
You may want to try my amissl branch at https://github.com/chris-y/curl |
Are you able to obtain a more verbose error message? OpenSSL errors are usually much more descriptive, but not sure if curl can show them? |
Sadly not. The source code says:
|
Ah, OK, some of my code was messed up by GCC having a default ixemul define even though this build of GCC has never been near ixemul ☹. I think libcurl is using socket functions from clib2, rather than the global socketbase opened by libamisslauto. I'm trying to fix this but removing the clib2 network functions is causing configure to break, and the amount I know about autoconf can be etched on the pointy side of a pin... |
OK, I have a working build. Yay! |
@chris-y : that's very good! can you please share the static lib and headers too? |
@anchor76 Here: https://github.com/chris-y/curl/releases/download/curl-7_64_0-amissl/libcurl.lzh |
@chris-y : thanks, i tried to compile my handers with your libCurl, but i got this error: this _CTOR_LIST seems coming from amisslauto lib. maybe i can not use amissl with my gcc? (v6.4.1b) |
ping! :) do i have chance with gcc 6.4.1b? |
Sorry - I'm missing Google Inbox which used to bring GitHub updates to me attention :-( I don't know the full reason for this error, but have you tried recompiling the autoinit library with 6.4.1b? That should be a solution (other than avoiding the library completely). |
@chris-y - what gcc version do you have? |
3.4.6 |
I've compiled AmiSSL with gcc version 6.5.0b 191023121710 (GCC) out of the box with make OS=os3. |
@arczi84 Why do you need to recompile AmiSSL? Just use the binaries. You will need the correct version of GCC to build AmiSSL, due to baserel issues. |
I only need libamisslauto.a. |
Nevermind , tested on system that didn't have AmiSSL4 installed. |
How did you manage to compile it with 6.5.0b? I have exactly the same problems here (_CTOR_LIST) and therefore have to recompile it. But my gcc 6.5.0b cannot compile the inline assembler:
and many more like this when running
Or could you provide your libamisslauto.a? |
Maybe that version of gcc6 I used could compile it or I used original clib2 headers ? |
This .a works for me, thx! Seems something has changed in int64math.c. There is no OS=os3 anymore, and all others use inline assembler in int64math.c. Update: No. It compiles but crashes on start even before main(). |
I have now a solution: |
Hi,
I'm compiling our curl for and I get those undefined references:
` CCLD curl
/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld:
../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x1ddc): undefined
reference to `SSL_CTX_set_keylog_callback'
/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld:
../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x2872): undefined
reference to `SSL_CTX_set_ciphersuites'
/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld:
../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x2e62): undefined
reference to `SSL_CTX_set_post_handshake_auth'`
How did you linked this?
Regards,
Artur
sob., 2 sty 2021 o 22:30 Oliver Urbann ***@***.***>
napisał(a):
… I have now a solution:
Building curl for amiga
<http://d-fence.sytes.net/building-curl-for-amiga/>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2X25UHKNTE4AGYFMB42BDSX6F6XANCNFSM4DEFP3OA>
.
|
*should be "your curl fork"
sob., 15 maj 2021 o 14:30 Art ***@***.***> napisał(a):
… Hi,
I'm compiling our curl for and I get those undefined references:
` CCLD curl
/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld:
../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x1ddc): undefined
reference to `SSL_CTX_set_keylog_callback'
/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld:
../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x2872): undefined
reference to `SSL_CTX_set_ciphersuites'
/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld:
../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x2e62): undefined
reference to `SSL_CTX_set_post_handshake_auth'`
How did you linked this?
Regards,
Artur
sob., 2 sty 2021 o 22:30 Oliver Urbann ***@***.***>
napisał(a):
> I have now a solution:
>
> Building curl for amiga
> <http://d-fence.sytes.net/building-curl-for-amiga/>
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#15 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AA2X25UHKNTE4AGYFMB42BDSX6F6XANCNFSM4DEFP3OA>
> .
>
|
Unfortunately I cannot reproduce your error. However, I can confirm the steps described in the blog post still work for AmiSSL 4.9 but only for the mentioned commit (note that it is not my fork), not for master. Interestingly I get different error on curl master:
So, I think I'll try to get the curl master working again but I don't know if this will be a solution for your problem. |
I get the same error with 4.9.
sob., 15 maj 2021, 16:32 użytkownik Oliver Urbann ***@***.***>
napisał:
… Unfortunately I cannot reproduce your error. However, I can confirm the
steps described in the blog post still work for AmiSSL 4.9 but only for the
mentioned commit, not for master. Interestingly I get different error on
curl master:
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-sha256.o): in function `Curl_HMAC_SHA256':
libcurl_la-sha256.o:(.text+0x44): undefined reference to `SHA256_Init'
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: libcurl_la-sha256.o:(.text+0x48): undefined reference to `SHA256_Update'
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: libcurl_la-sha256.o:(.text+0x4c): undefined reference to `SHA256_Final'
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x2fc6): undefined reference to `X509_INFO_free'
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x3678): undefined reference to `X509_INFO_free'
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2X25TLE3V6UB76HHNSLADTN2AWJANCNFSM4DEFP3OA>
.
|
I mean with master.
sob., 15 maj 2021 o 17:29 Art ***@***.***> napisał(a):
… I get the same error with 4.9.
sob., 15 maj 2021, 16:32 użytkownik Oliver Urbann <
***@***.***> napisał:
> Unfortunately I cannot reproduce your error. However, I can confirm the
> steps described in the blog post still work for AmiSSL 4.9 but only for the
> mentioned commit, not for master. Interestingly I get different error on
> curl master:
>
> /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-sha256.o): in function `Curl_HMAC_SHA256':
> libcurl_la-sha256.o:(.text+0x44): undefined reference to `SHA256_Init'
> /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: libcurl_la-sha256.o:(.text+0x48): undefined reference to `SHA256_Update'
> /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: libcurl_la-sha256.o:(.text+0x4c): undefined reference to `SHA256_Final'
> /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x2fc6): undefined reference to `X509_INFO_free'
> /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-openssl.o):(.text+0x3678): undefined reference to `X509_INFO_free'
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#15 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AA2X25TLE3V6UB76HHNSLADTN2AWJANCNFSM4DEFP3OA>
> .
>
|
AmiSSL replaces many functions with macros. Curl requires pointer to some of these functions. Thus, we have to encapsulate these macros: SHA256_Init, SHA256_Update, SHA256_Final, X509_INFO_free. Bug: jens-maus/amissl#15
AmiSSL replaces many functions with macros. Curl requires pointer to some of these functions. Thus, we have to encapsulate these macros: SHA256_Init, SHA256_Update, SHA256_Final, X509_INFO_free. Bug: jens-maus/amissl#15
AmiSSL replaces many functions with macros. Curl requires pointer to some of these functions. Thus, we have to encapsulate these macros: SHA256_Init, SHA256_Update, SHA256_Final, X509_INFO_free. Bug: jens-maus/amissl#15 Co-authored-by: Daniel Stenberg <daniel@haxx.se>
AmiSSL replaces many functions with macros. Curl requires pointer to some of these functions. Thus, we have to encapsulate these macros: SHA256_Init, SHA256_Update, SHA256_Final, X509_INFO_free. Bug: jens-maus/amissl#15 Co-authored-by: Daniel Stenberg <daniel@haxx.se> Closes #7099
There is an update now in the curl repo so that compilation should work again. I also updated my blog post on how to compile it. I've also added a Dockerfile that builds a container containing curl readily compiled. |
Hello ,
Unfortunately I still have issues here.
with
./buildconf
https is not enabled. It is enabled without it but NetSurf can't connect to
any website with my built but this is rather my gcc env issue.
Regards,
Artur
czw., 20 maj 2021 o 19:56 Oliver Urbann ***@***.***>
napisał(a):
… There is an update now in the curl repo so that compilation should work
again. I also updated [
http://d-fence.sytes.net/building-curl-for-amiga/](my blog post) on how
to compile it. I've also added a Dockerfile that definitely compiles curl.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2X25UZKLO6BN2CISIDP4TTOVENVANCNFSM4DEFP3OA>
.
|
Curl finally configured but I had to switch to root ...
Anyway still I can't browse websites on NetSurf with my build...
czw., 20 maj 2021 o 20:40 Art ***@***.***> napisał(a):
… Hello ,
Unfortunately I still have issues here.
with
./buildconf
https is not enabled. It is enabled without it but NetSurf can't connect
to any website with my built but this is rather my gcc env issue.
Regards,
Artur
czw., 20 maj 2021 o 19:56 Oliver Urbann ***@***.***>
napisał(a):
> There is an update now in the curl repo so that compilation should work
> again. I also updated [
> http://d-fence.sytes.net/building-curl-for-amiga/](my blog post) on how
> to compile it. I've also added a Dockerfile that definitely compiles curl.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#15 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AA2X25UZKLO6BN2CISIDP4TTOVENVANCNFSM4DEFP3OA>
> .
>
|
Alright! Did fresh install of Debian on WSL2 and it works now ! :D
pt., 21 maj 2021 o 11:23 Art ***@***.***> napisał(a):
… Curl finally configured but I had to switch to root ...
Anyway still I can't browse websites on NetSurf with my build...
czw., 20 maj 2021 o 20:40 Art ***@***.***> napisał(a):
> Hello ,
>
> Unfortunately I still have issues here.
> with
>
> ./buildconf
>
> https is not enabled. It is enabled without it but NetSurf can't connect
> to any website with my built but this is rather my gcc env issue.
>
> Regards,
> Artur
>
>
> czw., 20 maj 2021 o 19:56 Oliver Urbann ***@***.***>
> napisał(a):
>
>> There is an update now in the curl repo so that compilation should work
>> again. I also updated [
>> http://d-fence.sytes.net/building-curl-for-amiga/](my blog post) on how
>> to compile it. I've also added a Dockerfile that definitely compiles curl.
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <#15 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AA2X25UZKLO6BN2CISIDP4TTOVENVANCNFSM4DEFP3OA>
>> .
>>
>
|
I'm not entirely sure this is the right place for this, but since this is discussing building Curl with AmiSSL I'll ask here. Curl 7.77.0 contains @OliverUrbann's fixes, so this is the one I'm now trying to build. I updated my NDK to the new 3.2R2 version (not sure this is relevant). Everything else remains the same. I'm getting lots of these: But more importantly undefined references by the bucketload (this is just some of them):
This is with AmiSSL 4.4, 4.9 was doing the same thing but I reverted back in case that was causing the problem (it wasn't). I can't remember when this last built, but it was probably around the time of my previous comment on this issue. Any ideas why this might be happening? |
Never saw one of these. I‘d suggest to start with my docker container and then replacing things step by step with your desired setup: NDK, compiler, configure command etc. |
I wiped everything out and started again, and I think the problem is that the 3.2 NDK doesn't have the GCC inlines in it 😠. I didn't notice before as I'd stuffed it on top of the old one. |
hello,
i trying to compile libCurl with AmiSSL under cygwin. (m68k target)
i use cahirwpz's amigaos-cross-toolchain. i get the following errors:
screen shot #1
screen shot #2
can i get some advice? :)
thanks
The text was updated successfully, but these errors were encountered: