Closed ju1ius closed 10 months ago
Can you install libc++
to your system, and re-test it? It seems similar to https://github.com/ada-url/rust/issues/43
IMO, the build script should let the cc crate detect the correct compiler on UNIX platforms.
Would you like to open a PR?
Can you install
libc++
to your system, and re-test it? It seems similar to #43
After installing the libc++-dev
package:
$ clang++ -O0 -std=c++17 -o ./ada.o -c ./deps/ada.cpp
In file included from ./deps/ada.cpp:3:
./deps/ada.h:20:10: fatal error: 'string' file not found
#include <string>
^~~~~~~~
1 error generated.
And
$ clang++ -O0 -std=c++17 -stdlib=libc++ -o ./ada.o -c ./deps/ada.cpp
So it seems that somehow clang cannot use the gcc version of the c++ stdlib on debian... That's weird, cause I'm pretty sure it used to work. Maybe it broke in a recent update...
Anyway, since gcc can compile the library just fine, I still think the compiler shouldn't be forced on end users.
Would you like to open a PR?
OK, I'll do.
Hi,
Building ada-url on debian sid fails. Running the following commands:
Produces the following output:
``` Compiling ada-url v2.2.1 (/ada-url) The following warnings were emitted during compilation: warning: ada-url@2.2.1: In file included from ./deps/ada.cpp:3: warning: ada-url@2.2.1: ./deps/ada.h:20:10: fatal error: 'string' file not found warning: ada-url@2.2.1: #includeIt seems that clang cannot find the c++ stdlib... 🤔 Moreover, the build script unconditionally sets the compiler to
clang++
, which makes trying another compiler (or another clang version) impossible.If I comment out the aforementioned line and build with
CXX=g++ cargo build
, the library builds correctly and tests pass:Also note the warnings caused by the build script's passing files to
cc::Build::include()
instead of directories.IMO, the build script should let the
cc
crate detect the correct compiler on UNIX platforms.