Opened 4 years ago

Last modified 2 months ago

#25214 new defect

let curl have headers in the location given by curl-config

Reported by: dimpase Owned by:
Priority: major Milestone: sage-9.5
Component: build: configure Keywords:
Cc: embray Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

currently system-wide curl is not recognised as usable by Sage if its headers are in the location not searched by $CC by default.

curl-config script actually tells you what to add to CFLAGS

$ curl-config --cflags
-I/usr/local/include

Change History (10)

comment:1 Changed 4 years ago by dimpase

I believe the m4 macro from Curl project (https://github.com/curl/curl/blob/master/docs/libcurl/libcurl.m4) would do all what's needed, including setting LIBCURL_CPPFLAGS

comment:2 Changed 4 years ago by embray

  • Type changed from PLEASE CHANGE to defect

I still don't fully understand why the current check doesn't work, even if you don't pass additional CFLAGS arguments. I'd be curious to investigate that. But it would also be interesting to try their official macro.

comment:3 Changed 4 years ago by dimpase

TL; DR: It works if I set CXXFLAGS instead.

on a FreeBSD 11.1 system one has (with t.c basically not doing anything):

$ cc -I/usr/local/include  -c t.c # this works
$ cc   -c t.c                     # this doesn't 
t.c:1:9: fatal error: 'curl/curl.h' file not found
#include<curl/curl.h>
        ^~~~~~~~~~~~~
1 error generated.

CFLAGS are ingnored by ./configure in this case. I invoke ./configure CC=cc CXX=c++ FC=gfortran6 CFLAGS="-I/usr/local/include" and still see in config.log the following:

configure:8259: checking for curl 7.22
configure:8292: result: /usr/local/bin/curl
configure:8298: checking curl/curl.h usability
configure:8298: c++ -c -g -O2 -std=gnu++11  conftest.cpp >&5
conftest.cpp:56:10: fatal error: 'curl/curl.h' file not found
#include <curl/curl.h>
         ^~~~~~~~~~~~~
1 error generated.

It works if I set CXXFLAGS instead, as it tests with c++ rather than with cc!

comment:4 Changed 4 years ago by embray

Ah, I was actually going to suggest trying CPPFLAGS, but that does explain it:)

comment:5 Changed 4 years ago by dimpase

Anyhow, the real issue is whether R will pick up curl headers. We'll see.

comment:6 Changed 3 years ago by vdelecroix

  • Milestone changed from sage-8.3 to sage-8.4

update milestone 8.3 -> 8.4

comment:7 follow-up: Changed 12 months ago by embray

  • Milestone changed from sage-8.4 to sage-9.3

I think this might still be a problem; working to confirm this...

comment:8 in reply to: ↑ 7 Changed 12 months ago by embray

Replying to embray:

I think this might still be a problem; working to confirm this...

Well, if it is a problem, it wasn't a cause of the problem I was trying to fix.

comment:9 Changed 7 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

comment:10 Changed 2 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5
Note: See TracTickets for help on using tickets.