-
Notifications
You must be signed in to change notification settings - Fork 87
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
httpuv 1.6.4 compile failure on macOS Monterey 12.0.1 #325
Comments
This seems potentially related #260 |
As recommended in that other thread, Rcpp, fs, and igraph build from source with this compiler configuration. CC:
CXX:
|
Also for reference, these Apple clang compiler settings work: CC = clang -mmacosx-version-min=10.13
CFLAGS = -Wall -g -O2 $(LTO)
CPPFLAGS = -I/usr/local/include
CXX = clang++ -mmacosx-version-min=10.13 -std=gnu++14
CXXFLAGS = -Wall -g -O2 $(LTO)
CXX11 = clang++ -mmacosx-version-min=10.13
CXX11FLAGS = -Wall -g -O2 $(LTO)
CXX14 = clang++ -mmacosx-version-min=10.13
CXX14FLAGS = -Wall -g -O2 $(LTO)
CXX17 = clang++ -mmacosx-version-min=10.13
CXX17FLAGS = -Wall -g -O2 $(LTO)
CXX20 = clang++ -mmacosx-version-min=10.13
CXX20FLAGS = -Wall -g -O2 $(LTO)
FC = gfortran -mmacosx-version-min=10.13
FCFLAGS = -Wall -g -O2 $(LTO_FC)
FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
LDFLAGS = -L/usr/local/lib But I'd like to use fxcoudert's GNU Fortran build instead if possible, since it has better compile support for a number of data science / bioinformatics packages. |
It looks like it's failing when building libuv. Libuv is a very commonly used library (it's used in node.js), so it seems likely that someone would have gotten it to compile using your toolchain. In httpuv 1.6.4, we changed things so that when building libuv, it tries to run In previous versions, it did not run |
Thanks I'll take a look and get back to you. Is there a way to point to libuv already installed with Homebrew to avoid this step? |
In order to link to the already-included libuv, I think you'd need to modify PKG_LIBS = ./libuv/.libs/libuv.a ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread It would have this: PKG_LIBS = -luv ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread And then also remove the stuff for building the local copy of libuv. Here's a rough attempt at what it would look like (I have not tested this): ## Use the R_HOME indirection to support installations of multiple R version
# Use C++11 if available
CXX_STD=CXX11
UNAME := $(shell uname)
PKG_LIBS = -luv ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread
ifeq ($(UNAME), Darwin)
PKG_LIBS += -framework CoreServices
endif
ifeq ($(UNAME), SunOS)
PKG_LIBS += -lkstat -lsendfile -lsocket -lxnet
endif
ifeq ($(UNAME), FreeBSD)
PKG_LIBS += -lkvm
endif
ifeq ($(UNAME), OpenBSD)
PKG_LIBS += -lkvm
endif
PKG_CFLAGS = $(C_VISIBILITY) -DSTRICT_R_HEADERS
PKG_CXXFLAGS = $(CXX_VISIBILITY) -DSTRICT_R_HEADERS
PKG_CPPFLAGS = -Ilibuv/include -pthread
$(SHLIB): http-parser/http_parser.o sha1/sha1.o base64/base64.o
clean:
$(MAKE) --directory=libuv distclean |
This works, but it's risky. If you only stop using the packaged libuv at the linking level, there might be a mismatch between the libuv headers |
Hi, I'm hitting a compilation issue with httpuv 1.6.4.
Here's my current R configuration, for reference:
Makevars.site
Renviron.site
Rprofile.site
I'm attempting to use fxcoudert's GNU Fortran 8.2 with CRAN R 4.1.2 (Homebrew cask).
Not totally sure how to debug this further and whether there are some compiler flags I should set differently. Any help is much appreciated!
The text was updated successfully, but these errors were encountered: