libphobos: std.net.curl does not understand HTTP/2 status lines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-10 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The GDC runtime access to the libcurl is broken. CURL operations abort with unexpected error codes.
Test programm:
```
import std.net.curl;
import std.stdio;
void main()
{
HTTP http = HTTP();
auto data = get("https:/
writeln(data);
}
```
Compile this program and run it.
$ gdc curldownload.d -o curldownload -g
$ ./curldownload
std.net.
----------------
??:? pure @safe bool std.exception.
??:? char[] std.net.
??:? char[] std.net.
??:? _Dmain [0xaaaad4d9272f]
??:? ???[0xffff7fc808bb]
??:? ???[0xffff7fc80c2f]
??:? _d_run_main [0xffff7fc80d9f]
??:? main [0xaaaad4d927a3]
??:? __libc_start_main [0xffff7f6da08f]
??:? ???[0xaaaad4d92603]
The same issue also impacts the 'dub' package. It is *not* possible to update/fetch packages from code.dlang.org.
I compiled 'ldc2' from sources in its latest version. The code snippet works fine, when compiled with ldc- Also 'dub', when recompiled with ldc2, works fine.
So there is some problem with gdc and its access to libcurl. Maybe broken library bindungs? Some issue with ARM32 and ARM64 archs (same problem with ARM32(gnueabihf))?
Issue also reported on dlang.org : https:/
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gdc-10 10-20200411-
ProcVersionSign
Uname: Linux 5.4.0-1008-raspi aarch64
ApportVersion: 2.20.11-0ubuntu27
Architecture: arm64
CasperMD5CheckR
Date: Fri May 1 12:19:49 2020
SourcePackage: gcc-10
UpgradeStatus: No upgrade log present (probably fresh install)
summary: |
- Broken CURL support with GDC + libphobos: std.net.curl does not understand HTTP/2 status lines |
Recompiling libcurl from sources and copying the library binaries over the 'official' ones in /usr/libs/ also fixed the problem in the past.