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
[krb5, curl] Add new port, and add new feature curl[gssapi] #38402
Conversation
ports/krb5/portfile.cmake
Outdated
SOURCE_PATH "${SOURCE_PATH}/src" | ||
AUTOCONFIG | ||
OPTIONS | ||
CFLAGS=-fcommon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this override CFLAGS
completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think not, How we can verify it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from build log:
/usr/bin/cc -DHAVE_CONFIG_H -I../../include -I../.././../src/krb5-1-8a38cd677f.clean/src/include -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -DNDEBUG -fcommon -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=implicit-int -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread -c ../.././../src/krb5-1-8a38cd677f.clean/src/util/support/threads.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this really overrides essential flags from vcpkg, in particular -fPIC
, -g
/-O3
.
Try
CFLAGS=-fcommon | |
"CFLAGS=-fcommon \$CFLAGS" |
But why is the extra flag needed at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without the flag:
/usr/bin/ld: ../../lib/libkadm5srv_mit.a(server_kdb.o):/home/tal/vcpkg/buildtrees/krb5/x64-linux-dbg/lib/kadm5/srv/../../.././../src/krb5-1-8a38cd677f.clean/src/lib/kadm5/srv/server_kdb.c:18: multiple definition of `master_keyblock'; kdb5_util.o:/home/tal/vcpkg/buildtrees/krb5/x64-linux-dbg/kadmin/dbutil/../.././../src/krb5-1-8a38cd677f.clean/src/kadmin/dbutil/kdb5_util.c:109: first defined here
collect2: error: ld returned 1 exit status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, really old (> 10 years) C code, and gcc 10 making '-fno-common` the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this really overrides essential flags from vcpkg, in particular
-fPIC
,-g
/-O3
. Try
Thank you for your suggestion, it help!
/usr/bin/cc -DHAVE_CONFIG_H -I../../include -I../.././../src/krb5-1-8a38cd677f.clean/src/include -I../.././../src/krb5-1-8a38cd677f.clean/src/lib/gssapi/generic -I../.././../src/krb5-1-8a38cd677f.clean/src/lib/gssapi/krb5 -I../../lib/gssapi/generic -I../../lib/gssapi/krb5 -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -fcommon -fPIC -g -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=implicit-int -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread -c ../.././../src/krb5-1-8a38cd677f.clean/src/kadmin/server/auth.c
ports/krb5/vcpkg.json
Outdated
"description": "Network authentication protocol", | ||
"homepage": "https://web.mit.edu/kerberos/", | ||
"license": "MIT", | ||
"supports": "!windows & !arm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why shouldn't it support arm
? Maybe CFLAGS
issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, I didn't debug it. Also I didn't succeeded to compile on Windows.
As I see it, I can insert this port without the support of windows and arm, and others can take this port and improve it.
@dg0yt How I can solve the absolute path errors? |
08c0f27
to
af112d8
Compare
Temporary workaround for absolute path problem, is to delete the tools that have the absolute path. |
72763fa
to
ae9b2c8
Compare
@LilyWangLL |
Feature |
@LilyWangLL Ready for review. |
@LilyWangLL I answer all @dg0yt request. Can you review again? |
@talregev, this PR resulted in ci pilpline REGRESSION, but the strange thing is that I cannot reproduce these problems locally. Could you please take a look?
libsoup:x64-linux: |
I think what happened is that krb5 port is connected automatic to these ports. by find_packeges. When the failed ports changed, they detected the krb5 port, and try to compile it. We have 4 options:
|
@dg0yt I will glad your expert opinion as well 🙏🏻 |
There are two problems:
😵 💥
No, krb5 has no single item to fix or wrap for CMake.
Problem 2 solved right. But mind problem 1.
Problem 2 eliminated. Problem 1 solved the easy way. |
As a quick CI workaround, krb5 might be added as skip to ci.baseline.txt. Unfortunately, this will not reliably unblock other PRs - they would still pull fail due to the broken binary artifacts in the cache. |
…t#38402) - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [x] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [x] The versioning scheme in `vcpkg.json` matches what upstream says. - [x] The license declaration in `vcpkg.json` matches what upstream says. - [x] The installed as the "copyright" file matches what upstream says. - [x] The source code of the component installed comes from an authoritative source. - [x] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is in the new port's versions file. - [x] Only one version is added to each modified port's versions file. krb5 have an issue of absolute paths that I am not sure how to fix, also I didn't succeeded to compile it on windows, but this PR is a good start. ``` warning: There should be no absolute paths, such as the following, in an installed package: /home/tal/vcpkg/packages/krb5_x64-linux /home/tal/vcpkg/installed /home/tal/vcpkg/buildtrees/krb5 /home/tal/vcpkg/downloads Absolute paths were found in the following files: /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/bin/compile_et /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/bin/krb5-config /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/debug/bin/compile_et /home/tal/vcpkg/packages/krb5_x64-linux/tools/krb5/debug/bin/krb5-config error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: /home/tal/vcpkg/ports/krb5/portfile.cmake ```
find_package
calls are REQUIRED, are satisfied byvcpkg.json
's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.vcpkg.json
matches what upstream says.vcpkg.json
matches what upstream says../vcpkg x-add-version --all
and committing the result.krb5 have an issue of absolute paths that I am not sure how to fix, also I didn't succeeded to compile it on windows, but this PR is a good start.