[Rd] configure failed with curl 7.71.1

2020-07-25 Thread Marco Atzeri

Hi dev,

can someone confirm if it is a general R 4.0.4 problem
or it is happening only on cygwin ?

checking for curl/curl.h... yes
checking if libcurl is version 7 and >= 7.28.0...
configure: error: libcurl >= 7.28.0 library and headers are required 
with support for https

*** ERROR: configure failed

but https is available on curl:

$ curl --version
curl 7.71.1 (x86_64-pc-cygwin) libcurl/7.71.1 OpenSSL/1.1.1f zlib/1.2.11 
brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.0.4) 
libssh/0.8.7/openssl/zlib nghttp2/1.37.0

Release-Date: 2020-07-01
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps 
pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli Debug HTTP2 HTTPS-proxy IDN IPv6 Largefile 
libz NTLM NTLM_WB PSL SSL TLS-SRP TrackMemory UnixSockets


$ cygcheck -l libcurl-devel
/usr/bin/curl-config
/usr/include/curl/curl.h
/usr/include/curl/curlver.h
/usr/include/curl/easy.h
/usr/include/curl/mprintf.h
/usr/include/curl/multi.h
/usr/include/curl/stdcheaders.h
/usr/include/curl/system.h
/usr/include/curl/typecheck-gcc.h
/usr/include/curl/urlapi.h
/usr/lib/libcurl.dll.a
/usr/lib/pkgconfig/libcurl.pc
/usr/share/aclocal/libcurl.m4
/usr/share/man/man1/curl-config.1.gz

Regards
Marco

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] configure failed with curl 7.71.1

2020-07-25 Thread Jeroen Ooms
On Sat, Jul 25, 2020 at 10:12 AM Marco Atzeri  wrote:
>
> Hi dev,
>
> can someone confirm if it is a general R 4.0.4 problem
> or it is happening only on cygwin ?
>
> checking for curl/curl.h... yes
> checking if libcurl is version 7 and >= 7.28.0...
> configure: error: libcurl >= 7.28.0 library and headers are required
> with support for https
> *** ERROR: configure failed
>
> but https is available on curl

You should inspect the config.log or config.status file to see why the
version check is failing.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Guidelines when to use LF vs CRLF ("\n" vs. "\r\n") on Windows for new lines (line endings)?

2020-07-25 Thread nos...@altfeld-im.de
Dear R developers,

I am developing an R package which returns strings with new line codes.
I am not sure if I should use "\r\n" or "\n" in my returned strings on Windows 
platforms.

What is the recommended best practice for package developers (and code in base 
R) for coding new lines in strings?

And just out of curiosity: What is the reason (or history) for preferring "\n" 
in R even on Windows (see examples below)?

Best regards

Jürgen

PS: Examples from base R:

R seems to use (almost) only "\n" for new lines internally - even on Windows 
platforms, eg.:

charToRaw(paste0("a", "\n", "b"))
[1] 61 0a 62

# eol default is "\n"
write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",
eol = "\n", na = "NA", dec = ".", row.names = TRUE,
col.names = TRUE, qmethod = c("escape", "double"),
fileEncoding = "")

On the other hand some external interfaces require Windows-style new lines 
("\r\n"), eg. text file outputs seen ti care internally:

writeLines(text, con = stdout(), sep = "\n", useBytes = FALSE)
# Excerpt from the documentation:
# Normally writeLines is used with a text-mode connection,
# and the default separator is converted to the normal separator
# for that platform (LF on Unix/Linux, CRLF on Windows).

# calls internally do_writelines():
# 
https://github.com/wch/r-source/blob/8db7b85953127f364f52d201ec057911db4601e5/src/main/connections.c#L4023
# But: Where is the conversion done (hidden in the call to Riconv()?)

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Guidelines when to use LF vs CRLF ("\n" vs. "\r\n") on Windows for new lines (line endings)?

2020-07-25 Thread Duncan Murdoch

On 25/07/2020 4:48 p.m., nos...@altfeld-im.de wrote:

Dear R developers,

I am developing an R package which returns strings with new line codes.
I am not sure if I should use "\r\n" or "\n" in my returned strings on Windows 
platforms.

What is the recommended best practice for package developers (and code in base 
R) for coding new lines in strings?

And just out of curiosity: What is the reason (or history) for preferring "\n" 
in R even on Windows (see examples below)?


Most Windows run-times (including the version of MSVCRT that R uses) 
convert \n to \r\n on text files, so you rarely need an explicit \r\n. 
That's the difference between type text and type binary on connections.


Duncan Murdoch




Best regards

Jürgen

PS: Examples from base R:

R seems to use (almost) only "\n" for new lines internally - even on Windows 
platforms, eg.:

 charToRaw(paste0("a", "\n", "b"))
 [1] 61 0a 62

 # eol default is "\n"
 write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",
 eol = "\n", na = "NA", dec = ".", row.names = TRUE,
 col.names = TRUE, qmethod = c("escape", "double"),
 fileEncoding = "")

On the other hand some external interfaces require Windows-style new lines 
("\r\n"), eg. text file outputs seen ti care internally:

 writeLines(text, con = stdout(), sep = "\n", useBytes = FALSE)
 # Excerpt from the documentation:
 # Normally writeLines is used with a text-mode connection,
 # and the default separator is converted to the normal separator
 # for that platform (LF on Unix/Linux, CRLF on Windows).

 # calls internally do_writelines():
 # 
https://github.com/wch/r-source/blob/8db7b85953127f364f52d201ec057911db4601e5/src/main/connections.c#L4023
 # But: Where is the conversion done (hidden in the call to Riconv()?)

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Guidelines when to use LF vs CRLF ("\n" vs. "\r\n") on Windows for new lines (line endings)?

2020-07-25 Thread M. Edward (Ed) Borasky
I will also add that shell scripts that are in Docker containers will
often crash with confusing error messages if they have Windows line
endings.

On Sat, Jul 25, 2020 at 2:39 PM Duncan Murdoch  wrote:
>
> On 25/07/2020 4:48 p.m., nos...@altfeld-im.de wrote:
> > Dear R developers,
> >
> > I am developing an R package which returns strings with new line codes.
> > I am not sure if I should use "\r\n" or "\n" in my returned strings on 
> > Windows platforms.
> >
> > What is the recommended best practice for package developers (and code in 
> > base R) for coding new lines in strings?
> >
> > And just out of curiosity: What is the reason (or history) for preferring 
> > "\n" in R even on Windows (see examples below)?
>
> Most Windows run-times (including the version of MSVCRT that R uses)
> convert \n to \r\n on text files, so you rarely need an explicit \r\n.
> That's the difference between type text and type binary on connections.
>
> Duncan Murdoch
>
>
> >
> > Best regards
> >
> > Jürgen
> >
> > PS: Examples from base R:
> >
> > R seems to use (almost) only "\n" for new lines internally - even on 
> > Windows platforms, eg.:
> >
> >  charToRaw(paste0("a", "\n", "b"))
> >  [1] 61 0a 62
> >
> >  # eol default is "\n"
> >  write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",
> >  eol = "\n", na = "NA", dec = ".", row.names = TRUE,
> >  col.names = TRUE, qmethod = c("escape", "double"),
> >  fileEncoding = "")
> >
> > On the other hand some external interfaces require Windows-style new lines 
> > ("\r\n"), eg. text file outputs seen ti care internally:
> >
> >  writeLines(text, con = stdout(), sep = "\n", useBytes = FALSE)
> >  # Excerpt from the documentation:
> >  # Normally writeLines is used with a text-mode connection,
> >  # and the default separator is converted to the normal separator
> >  # for that platform (LF on Unix/Linux, CRLF on Windows).
> >
> >  # calls internally do_writelines():
> >  # 
> > https://github.com/wch/r-source/blob/8db7b85953127f364f52d201ec057911db4601e5/src/main/connections.c#L4023
> >  # But: Where is the conversion done (hidden in the call to Riconv()?)
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
Borasky Research Journal https://www.znmeb.mobi

Markovs of the world, unite! You have nothing to lose but your chains!

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel