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

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

Open
dimpase opened this issue Apr 19, 2018 · 8 comments
Open

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

dimpase opened this issue Apr 19, 2018 · 8 comments

Comments

@dimpase
Copy link
Member

dimpase commented Apr 19, 2018

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

CC: @embray

Component: build: configure

Issue created by migration from https://trac.sagemath.org/ticket/25214

@dimpase dimpase added this to the sage-8.3 milestone Apr 19, 2018
@dimpase
Copy link
Member Author

dimpase commented Apr 19, 2018

comment:1

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

@embray
Copy link
Contributor

embray commented Apr 19, 2018

comment:2

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.

@embray embray added the t: bug label Apr 19, 2018
@dimpase
Copy link
Member Author

dimpase commented Apr 19, 2018

comment:3

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!

@embray
Copy link
Contributor

embray commented Apr 19, 2018

comment:4

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

@dimpase
Copy link
Member Author

dimpase commented Apr 19, 2018

comment:5

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

@videlec
Copy link
Contributor

videlec commented Aug 3, 2018

comment:6

update milestone 8.3 -> 8.4

@videlec videlec modified the milestones: sage-8.3, sage-8.4 Aug 3, 2018
@embray
Copy link
Contributor

embray commented Nov 12, 2020

comment:7

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

@embray embray modified the milestones: sage-8.4, sage-9.3 Nov 12, 2020
@embray
Copy link
Contributor

embray commented Nov 12, 2020

comment:8

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.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Apr 15, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 22, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 May 3, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants