Skip to content
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

Problems under Windows #13

Closed
olexandr-konovalov opened this issue Sep 7, 2018 · 5 comments
Closed

Problems under Windows #13

olexandr-konovalov opened this issue Sep 7, 2018 · 5 comments
Assignees

Comments

@olexandr-konovalov
Copy link
Member

In GAP 4.9.3 (publishing in progress) building curlInterface under cygwin finishes without errors:

...
checking for curl-config... /usr/bin/curl-config
curl found - remote install options available
checking that generated files are newer than configure... done
configure: creating ./config.status
 /bin/sh ./config.status
config.status: creating Makefile
config.status: creating src/pkgconfig.h
config.status: src/pkgconfig.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
  CC       src/curl_la-curl.lo
  CCLD     curl.la
/usr/bin/mkdir -p bin/i686-pc-cygwin-default32
cp .libs/curl.dll bin/i686-pc-cygwin-default32/curl.so

however, loading it on the same machine, both with gap.sh under Cygwin and with gap.bat from Windows file explorer results in:

gap> LoadPackage("curlIn");
Syntax warning: Unbound global variable in /proc/cygdrive/C/gap-4.9.3/pkg/curlInterface-2.0.2/gap/curl.gi:37
    return CURL_REQUEST(URL, type, out_string, r.verifyCert, r.verbose);
                       ^
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  curlInterface 2.0.2 (Simple Web Access)
by Christopher Jefferson (http://caj.host.cs.st-andrews.ac.uk/) and
   Michael Torpey (http://www-groups.mcs.st-andrews.ac.uk/~mct25/).
Homepage: https://gap-packages.github.io/curlInterface/
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
true
gap>

On a Cygwin-free machine it's even worse:

gap> LoadPackage("curlIn");
#W dlopen() error: No such file or directory
Error, module '/proc/cygdrive/C/gap-4.9.3/pkg/curlInterface-2.0.2/bin/i686-pc-cygwin-default32/curl.so' not found in
  if not LOAD_DYN( arg[1], false ) then
    Error( "no support for dynamic loading" );
fi; at /proc/cygdrive/C/gap-4.9.3/lib/files.gd:583 called from
<function "LoadDynamicModule">( <arguments> )
 called from read-eval loop at /proc/cygdrive/C/gap-4.9.3/pkg/curlInterface-2.0.2/init.g:8
Error, was not in any namespace at /proc/cygdrive/C/gap-4.9.3/lib/variable.g:291 called from
LEAVE_NAMESPACE(  ); at /proc/cygdrive/C/gap-4.9.3/lib/package.gi:1210 called from
ReadPackage( pkgname, "init.g" ); at /proc/cygdrive/C/gap-4.9.3/lib/package.gi:1583 called from
<function "LoadPackage">( <arguments> )
 called from read-eval loop at *stdin*:1
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk>
@mtorpey
Copy link
Collaborator

mtorpey commented Sep 10, 2018

It looks like the C functions in curl.c aren't being imported properly, but I don't know enough about Cygwin and Windows to know why that might be. Perhaps @ChrisJefferson has seen this sort of thing before?

@ChrisJefferson
Copy link
Member

So, the first problem I can't produce here, but it might be connected to the second.

To run curl we need to copy a whole bunch of files. In particular, these (adjust the final . if you use something else in your scripts)

cp /bin/cygcurl* /bin/cygidn* /bin/cygcrypto* /bin/cyggssapi* /bin/cyglber* /bin/cygldap* /bin/cygnghttp2* /bin/cygssh* /bin/cygpsl* /bin/cygssl* /bin/cygkrb* /bin/cygk5crypto* /bin/cygintl* /bin/cygcom_err* /bin/cygunistring* /bin/cygiconv* /bin/cygsasl* .

@olexandr-konovalov olexandr-konovalov self-assigned this Sep 10, 2018
@olexandr-konovalov
Copy link
Member Author

On my Cygwin, I do not have /bin/cygnghttp2* and /bin/cygpsl*. Now retrying without them.

@olexandr-konovalov
Copy link
Member Author

On a new Cygwin machine, I do have /bin/cygnghttp2* and /bin/cygpsl*. With this it seems that I achieve portable curlInterface. It loads, and TestPackage("curlinterface"); runs. I suggest to close it after GAP 4.10.1 release to make one more clean check.

@olexandr-konovalov
Copy link
Member Author

The package is now loadable in GAP 4.10.1 for Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants