Commit 59ec14b
committed
Start to bazel rules for curl
- mostly generated with configure2bazel
- Fix IDN configure flags and update overlay
- Add macos and linux arm overlays.
- generates working curl library of the right size for macos
cc toolchain is injectined a link arg that doesn't work.
```
/root/.cache/bazel/_bazel_root/81a15fa9a2846e82038a778136785275/external/gcc_toolchain++gcc_toolchains+gcc_toolchain_aarch64/bin/aarch64-unknown-linux-gnu-ld.bfd: unrecognized option '--start-lib'
```
There is some real ugly stuff going on to try to use the output of configure_make
as shared libarries.
- copying the ssl headers to a new place so we can make a cc_library
This is needed because the `includes` attribute on cc_import doesn't work.
We need to create a real cc_library to depend on to get that right.
- the cc_library / cc_shared_library pair for everything
Again, cc_import doesn't seem to work
Look at /opt/datadog-agent on local laptop
```
-rwxr-xr-x 1 root wheel 4815040 Dec 9 14:57 /opt/datadog-agent/embedded/lib/libcrypto.3.dylib
-rwxr-xr-x 1 root wheel 4857760 Dec 9 14:57 /opt/datadog-agent/embedded/lib/python3.13/site-packages/confluent_kafka/.dylibs/libcrypto.3.dylib
-rwxr-xr-x 1 root wheel 4857760 Dec 9 14:57 /opt/datadog-agent/embedded/lib/python3.13/site-packages/psycopg_c/.dylibs/libcrypto.3.dylib
-rwxr-xr-x 1 root wheel 965408 Dec 9 14:57 /opt/datadog-agent/embedded/lib/libssl.3.dylib
-rwxr-xr-x 1 root wheel 946896 Dec 9 14:57 /opt/datadog-agent/embedded/lib/python3.13/site-packages/confluent_kafka/.dylibs/libssl.3.dylib
-rwxr-xr-x 1 root wheel 946896 Dec 9 14:57 /opt/datadog-agent/embedded/lib/python3.13/site-packages/psycopg_c/.dylibs/libssl.3.dylib
-rwxr-xr-x 1 root wheel 731904 Dec 9 14:57 /opt/datadog-agent/embedded/lib/python3.13/site-packages/confluent_kafka/.dylibs/libcurl.4.dylib
```
```
ls -l bazel-bin/external/+_repo_rules+curl/libcurl.dylib bazel-bin/external/+_repo_rules+openssl/libimported_*dylib
-r-xr-xr-x 1 tony.aiuto wheel 803968 Jan 13 23:02 bazel-bin/external/+_repo_rules+curl/libcurl.dylib
-r-xr-xr-x 1 tony.aiuto wheel 4839472 Jan 13 16:54 bazel-bin/external/+_repo_rules+openssl/libimported_crypto_shared.dylib
-r-xr-xr-x 1 tony.aiuto wheel 949008 Jan 13 22:06 bazel-bin/external/+_repo_rules+openssl/libimported_ssl_shared.dylib
Note the similar sizes. Drift is probably because of nghttp2.
Looking at the linking
```
$ otool -L /opt/datadog-agent/embedded/lib/python3.13/site-packages/confluent_kafka/.dylibs/libcurl.4.dylib
/opt/datadog-agent/embedded/lib/python3.13/site-packages/confluent_kafka/.dylibs/libcurl.4.dylib:
/DLC/confluent_kafka/.dylibs/libcurl.4.dylib (compatibility version 13.0.0, current version 13.0.0)
@loader_path/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
@loader_path/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
@loader_path/libz.1.3.1.dylib (compatibility version 1.0.0, current version 1.3.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation ...
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices ...
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration ...
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.120.2)
$ otool -L bazel-bin/external/+_repo_rules+curl/libcurl.dylib
bazel-bin/external/+_repo_rules+curl/libcurl.dylib:
@rpath/libcurl.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/nghttp2.so.14 (compatibility version 0.0.0, current version 0.0.0)
@rpath/libimported_crypto_shared.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libimported_ssl_shared.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libz.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation ...
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration ...
/usr/lib/libc++.1.dylib ...
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1356.0.0)
```
The extra CoreServices in the other version is unexpected, but may be a fault in the way Kafka builds it.
checkpoint curl
got it back to linking
no time for jokes
maybe
readme
readme
tmp
finally
delete some apis we do not need
comments
comments
allow haxx.se in adms config
log the generated curl_config.h
split curl / curlu - does not help1 parent 0333647 commit 59ec14b
File tree
5 files changed
+88
-33
lines changed- .adms/bazel
- deps/curl/overlay
- linux_arm64/lib
- omnibus/config/software
5 files changed
+88
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
58 | 72 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | | - | |
| 89 | + | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
124 | 174 | | |
125 | 175 | | |
126 | 176 | | |
| |||
132 | 182 | | |
133 | 183 | | |
134 | 184 | | |
135 | | - | |
| 185 | + | |
136 | 186 | | |
137 | | - | |
138 | 187 | | |
| 188 | + | |
139 | 189 | | |
140 | 190 | | |
141 | 191 | | |
| |||
145 | 195 | | |
146 | 196 | | |
147 | 197 | | |
| 198 | + | |
148 | 199 | | |
149 | 200 | | |
150 | 201 | | |
| |||
157 | 208 | | |
158 | 209 | | |
159 | 210 | | |
| 211 | + | |
160 | 212 | | |
161 | 213 | | |
162 | 214 | | |
| |||
172 | 224 | | |
173 | 225 | | |
174 | 226 | | |
| 227 | + | |
175 | 228 | | |
176 | 229 | | |
177 | 230 | | |
| |||
180 | 233 | | |
181 | 234 | | |
182 | 235 | | |
| 236 | + | |
183 | 237 | | |
184 | 238 | | |
185 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
698 | 703 | | |
699 | 704 | | |
700 | 705 | | |
| |||
708 | 713 | | |
709 | 714 | | |
710 | 715 | | |
711 | | - | |
712 | 716 | | |
713 | 717 | | |
714 | 718 | | |
| |||
732 | 736 | | |
733 | 737 | | |
734 | 738 | | |
735 | | - | |
736 | 739 | | |
737 | 740 | | |
738 | 741 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
| |||
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | | - | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
| |||
80 | 77 | | |
81 | 78 | | |
82 | 79 | | |
83 | | - | |
84 | 80 | | |
85 | 81 | | |
86 | 82 | | |
| |||
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
114 | | - | |
115 | 110 | | |
116 | 111 | | |
117 | 112 | | |
| |||
643 | 638 | | |
644 | 639 | | |
645 | 640 | | |
| 641 | + | |
646 | 642 | | |
647 | 643 | | |
648 | 644 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
0 commit comments