Comments (9)
The problem is that the gcc version bundled with Rust does not define strtok_r
, and the MinGW version does. The solution is to change the installation of Rust to not install the bundled gcc. If you re-run the setup; choose "Change", click the drop down before "Linker and platform libraries" and choose "The entire feature will be unavailable", the compilation should work.
from curl-rust.
I tracked this down awhile ago and unfortunately the problem is:
- libcurl is compiling with the system gcc and is detecting a newer feature, the
strtok_r
function. - When the compiler links the crate, it uses a bundled gcc version
- This bundled gcc version uses its own libraries, which don't have the detected function.
Unfortunately the only fix here is to just delete the bundled linker that comes with Rust (or uncheck the box during the install).
from curl-rust.
@alexcrichton What is the equivalent to "unchecking the box during install" for installs with rustup?
from curl-rust.
@masaeedu unfortunately I don't know of a great way to do that. My personal way to work around this is to always install the MSVC host toolchain and then target pc-windows-gnu, that way these components aren't picked up
from curl-rust.
@alexcrichton I've also tried the MSVC toolchain, but this package seems to break with that as well, with the following error message:
Couldn't find libcurl from pkgconfig ("MSVC target detected. If you are using the MSVC ABI rust build, please use the GNU ABI build instead."), compiling it from source...
I'm trying to install https://github.com/killercup/cargo-edit, which depends on curl, using cargo install cargo-edit
. If I use the GNU toolchain via rustup default stable-gnu
, I get the strtok_r
issue. If I use the MSVC toolchain via rustup default stable-msvc
I get the message I pasted above. Any ideas on how to proceed are greatly appreciated.
from curl-rust.
@masaeedu that looks more like an informational message than an error maybe? Could you gist the full build log?
from curl-rust.
@alexcrichton Sure. Here you go: https://gist.github.com/masaeedu/475aa03570af8f548430f85652071530
from curl-rust.
Oh the actual build there is:
curl_setup.h(132): fatal error C1083: Cannot open include file: 'curl/curlbuild.h': No such file or directory
That's building an ancient version of curl-sys though (0.1.*) which has had tons of bug fixes since then. Unfortunately though it doesn't look like you control the version being used :(
from curl-rust.
I guess cargo-edit
's depending on an old version of curl
, which in turn pulls in an old version of curl-sys
. I'll go file a bug there. Thanks.
from curl-rust.
Related Issues (20)
- Best Approach using Easy2 when uploading large files (Gigabytes) HOT 1
- 16K max response size for easy::Easy.transfer.write_function()? HOT 2
- How to retrieve body only? HOT 1
- Incorrect comment for CURL_HTTP_VERSION_3 HOT 3
- curl smashes moka cache HOT 4
- Link to custom libcurl on macOS
- bundled libcurl limits cookie expiry date to the year 2038 HOT 1
- Crashes on run on macOS Sonoma 14.0 Beta (23A5312d) HOT 14
- one of your examples doesnt work HOT 3
- Library with command line arguments always returns 301 HOT 4
- Best way to use Easy2 when downloading large files and can resume download if connection fails
- Can't compile curl-sys v0.4.68+curl-8.4.0 on M1 Pro with Sonoma HOT 1
- Versioning up of this crate
- How to make OpenSSL as the TLS backend on Windows and macOS? HOT 2
- HTTP response version HOT 5
- Missing debug_function in curl::easy::Easy2
- v0.4.69 release cannot be compiled because it's missing its copy of curl HOT 2
- Adopt openssl@3 HOT 1
- more easily get access to headers in Easy2 client HOT 2
- 0.4.45: Compilation issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl-rust.