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

clibs.sexp fails with "This atom must be quoted ..." #83

Open
jonahbeckford opened this issue Oct 24, 2024 · 1 comment
Open

clibs.sexp fails with "This atom must be quoted ..." #83

jonahbeckford opened this issue Oct 24, 2024 · 1 comment

Comments

@jonahbeckford
Copy link

I'm using the latest master branch with MSVC on Windows. I had ocurl working in release 0.9.2.

$ opam exec --switch dkml dune build
File "_build/default/clibs.sexp", line 3, characters 1-93:
3 | (Y:/source/dksdk-coder/.ci/o/dkml/share/dkcoder-c/debug/lib/pkgconfig/../../lib/libcurl-d.lib)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This atom must be quoted because it is the first element of a list and
doesn't start with - or:

This is from clibs.sexp.in that has:

;; @configure_input@

(@CURLLIBS@)

with the parameters from config.log:

CURLLIBS='Y:/source/dksdk-coder/.ci/o/dkml/share/dkcoder-c/debug/lib/pkgconfig/../../lib/libcurl-d.lib'

and that is from libcurl.pc:

exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/../include
supported_protocols="DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS IPFS IPNS MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP WS WSS"
supported_features="SSL IPv6 UnixSockets libz brotli zstd AsynchDNS IDN Largefile SSPI alt-svc HSTS SPNEGO Kerberos NTLM HTTP2 HTTPS-proxy unicode threadsafe"

Name: libcurl
URL: https://curl.se/
Description: Library to transfer files with ftp, http, etc.
Version: 8.6.0-DEV
Libs: "${libdir}/libcurl-d.lib"
Libs.private:  cares.lib iphlpapi.lib ws2_32.lib bcrypt.lib zlibd.lib brotlidec.lib brotlicommon.lib zstd.lib nghttp2.lib normaliz.lib advapi32.lib crypt32.lib
Cflags: "-I${includedir}" 

Double-quoting CURLLIBS is sufficient to fix my problem, but I doubt that works when CURLLIBS has multiple terms like -L/some/where -lcurl.

Anyway, simply sticking the output of pkg-config into a Dune s-exp does not guarantee a valid Dune s-exp. Dune has a Dune Configurator that handles generating s-exp correctly, but sadly that is an overhaul of the build system for ocurl.

@jonahbeckford
Copy link
Author

jonahbeckford commented Oct 24, 2024

Oh, I just saw #81 ... I will test if that fixes this issue.

EDIT: Yes, the PR fixes this issue.

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

1 participant