[Bug d/88654] Hangs in libphobos testsuite

ibuclaw at gdcproject dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 4 17:32:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88654

--- Comment #5 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to Jakub Jelinek from comment #4)
> 
> If the test doesn't fail if it fails to load libcurl (and doesn't get
> stuck), it is fine too.
> If it fails if it is missing, yeah, something like a tcl procedure somewhere
> in libphobos/testsuite/lib/*.exp would do.
> As libphobos itself doesn't need libcurl-devel, it is just dlopen, so I
> think you want to test that
> #include <dlfcn.h>
> 
> int
> main ()
> {
>   void *h = dlopen ("libcurl.so.4"); // etc., whatever the library will try
> to dlopen
>   ...
> }
> will succeed dlopening it.


The names it will try before giving up:

---
version (OSX)
    static immutable names = ["libcurl.4.dylib"];
else version (Posix)
{
    static immutable names = ["libcurl.so", "libcurl.so.4",
    "libcurl-gnutls.so.4", "libcurl-nss.so.4", "libcurl.so.3"];
}
else version (Windows)
    static immutable names = ["libcurl.dll", "curl.dll"];
---

I think a link test would be good enough, as iff curl exists, but it has a
different name to any of the above, then the std.net.curl module needs fixing.


More information about the Gcc-bugs mailing list