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

Removal of CURLOPT_OBSOLETE72 causes downstream breakage #14747

Closed
dg0yt opened this issue Aug 31, 2024 · 4 comments
Closed

Removal of CURLOPT_OBSOLETE72 causes downstream breakage #14747

dg0yt opened this issue Aug 31, 2024 · 4 comments
Assignees
Labels

Comments

@dg0yt
Copy link
Contributor

dg0yt commented Aug 31, 2024

Noticed in vpckg CI run on CURL HEAD:

CURLOPT_OBSOLETE72 is still used in the header for

#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72

and CURLOPT_CLOSEPOLICY is used downstream in curlpp and curlcpp. (Edit: The problem really seems to be limited to these two C++ wrappers.)

Originally posted by @dg0yt in #14634 (comment)

@dg0yt
Copy link
Contributor Author

dg0yt commented Aug 31, 2024

e.g. curlpp:

FAILED: CMakeFiles/curlpp.dir/src/curlpp/Options.cpp.o 
/usr/bin/c++ -DCURL_STATICLIB -I/mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/include -isystem /mnt/vcpkg-ci/installed/x64-linux/include -fPIC -g -std=c++11 -MD -MT CMakeFiles/curlpp.dir/src/curlpp/Options.cpp.o -MF CMakeFiles/curlpp.dir/src/curlpp/Options.cpp.o.d -o CMakeFiles/curlpp.dir/src/curlpp/Options.cpp.o -c /mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/src/curlpp/Options.cpp
In file included from /mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/include/curlpp/internal/SList.hpp:29,
                 from /mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/include/curlpp/internal/OptionContainerType.hpp:28,
                 from /mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/include/curlpp/internal/OptionContainer.hpp:28,
                 from /mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/include/curlpp/Option.hpp:28,
                 from /mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/include/curlpp/Options.hpp:28,
                 from /mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/src/curlpp/Options.cpp:25:
/mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/include/curlpp/Options.hpp:281:55: error: ‘CURLOPT_OBSOLETE72’ was not declared in this scope; did you mean ‘CURLFORM_OBSOLETE2’?
  281 |         typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
      |                                                       ^~~~~~~~~~~~~~~~~~~
In file included from /mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/src/curlpp/Options.cpp:25:
/mnt/vcpkg-ci/b/curlpp/src/95a4f05eb9-7d2abb29f5.clean/include/curlpp/Options.hpp:281:74: error: template argument 2 is invalid
  281 |         typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
      |                                                                          ^

@vszakats vszakats added the build label Aug 31, 2024
@dg0yt
Copy link
Contributor Author

dg0yt commented Aug 31, 2024

This fixed local builds:

diff --git a/include/curl/curl.h b/include/curl/curl.h
index 1609ff6..d39d978 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -1351,7 +1351,9 @@ typedef enum {
   /* Max amount of cached alive connections */
   CURLOPT(CURLOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 71),
 
-  /* 72 = OBSOLETE */
+  /* OBSOLETE, do not use! */
+  CURLOPT(CURLOPT_OBSOLETE72, CURLOPTTYPE_LONG, 72),
+
   /* 73 = OBSOLETE */
 
   /* Set to explicitly use a new connection for the upcoming transfer.

CI run later.

bagder added a commit that referenced this issue Aug 31, 2024
The symbols have not been in use for 17+ years and they did not do
anything for several years before that, but apparently there are still
code using them.

Fixes #14747
@bagder bagder self-assigned this Aug 31, 2024
@bagder
Copy link
Member

bagder commented Aug 31, 2024

I propose a slightly different fix.

But also: I would urge you to fix those projects. Those symbols have been deprecated for over 17 years.

bagder added a commit that referenced this issue Aug 31, 2024
The symbols have not been in use for 17+ years and they did not do
anything for several years before that, but apparently there are still
code using them.

Follow-up to 3b057d4
Fixes #14747
Reported-by: Kai Pastor
@bagder bagder closed this as completed in 8bb71d5 Sep 2, 2024
@dg0yt
Copy link
Contributor Author

dg0yt commented Sep 10, 2024

Still an issue for the C++ wrappers: #14748 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants