-
-
Notifications
You must be signed in to change notification settings - Fork 765
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
Properly handle OpenSSL semver #3065
Comments
1.1.1h is not a standard semantic format and we should not make semver to support it. maybe we can modify version format, like this? xmake> semver.satisfies("1.1.1-a", ">=1.1.1-h")
< false
xmake> semver.satisfies("1.1.1-d", ">=1.1.1-h")
< false
xmake> semver.satisfies("1.1.1-z", ">=1.1.1-h")
< true |
seems good, I will make a pull request to change the package |
While this issue is open, I'm using it for another issue. I'm trying to install the python package on macOS, which should install OpenSSL, however this is not the case: openssl is not found:
but is not installed before python is built:
even though openssl is a package dep: https://github.com/NazaraEngine/NazaraEngine/blob/macos-fix/xmake-repo/packages/p/python/xmake.lua#L46 am I doing something wrong? |
It works for me. $ xmake l scripts/test.lua -vD --shallow python
/usr/bin/curl -SL -A "Xmake/2.7.3+dev.736765d (Linux;5.10.25-linuxkit) curl/7.83.1" https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1q.zip -o OpenSSL_1_1_1q.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 7724 0 7724 0 0 3372 0 --:--:-- 0:00:02 --:--:-- 7670^C |
it seems to work on my Linux pipeline too, but not on macOS? I don't have a macOS to test it |
It works for me too on macOS. $ xmake l scripts/test.lua -vD --shallow python
{
"python"
}
create test ...
[+]: xmake.lua
[+]: src/main.cpp
[+]: .gitignore
create ok!
/private/var/folders/32/w9cz0y_14hs19lkbs6v6_fm80000gn/T/.xmake501/221116/xmake-repo/test
add local repository(local-repo): /Users/ruki/projects/personal/xmake-repo ok!
local repositories:
local-repo /Users/ruki/projects/personal/xmake-repo
global repositories:
build-artifacts https://gitee.com/xmake-mirror/build-artifacts.git main
xmake-repo https://gitee.com/tboox/xmake-repo.git master
builtin-repo /Users/ruki/.local/share/xmake/repository
4 repositories were found!
checking for platform ... macosx
checking for architecture ... x86_64
checking for Xcode directory ... /Applications/Xcode.app
checking for Codesign Identity of Xcode ... Apple Development: waruqi@gmail.com (T3NA4MRVPU)
checking for SDK version of Xcode for macosx (x86_64) ... 12.3
checking for Minimal target version of Xcode for macosx (x86_64) ... 12.3
checking for dmd ... /usr/local/bin/dmd
checking for zig ... /usr/local/bin/zig
configure
{
proxy_pac = pac.lua
arch = x86_64
network = public
buildir = build
ccache = true
theme = default
xcode = /Applications/Xcode.app
xcode_codesign_identity = Apple Development: waruqi@gmail.com (T3NA4MRVPU)
kind = static
ndk_stdcxx = true
mode = release
host = macosx
plat = macosx
clean = true
}
checking for unzip ... /usr/bin/unzip
checking for git ... /usr/bin/git
checking for gzip ... /usr/bin/gzip
checking for tar ... /usr/bin/tar
/usr/bin/git rev-parse HEAD
finding openssl from xmake ..
checking for xmake::openssl ... no
finding openssl from find_openssl ..
finding openssl from brew ..
checking for brew ... /usr/local/bin/brew
finding openssl from vcpkg ..
finding openssl from conan ..
finding openssl from pkgconfig ..
checking for pkg-config ... /usr/local/bin/pkg-config
finding openssl from system ..
checking for openssl ... no
finding ca-certificates from xmake ..
checking for xmake::ca-certificates ... no
finding ca-certificates from brew ..
finding ca-certificates from vcpkg ..
finding ca-certificates from conan ..
finding ca-certificates from pkgconfig ..
finding ca-certificates from system ..
checking for ca-certificates ... no
checking for ping ... /sbin/ping
pinging for the host(www.python.org) ... 65 ms
pinging for the host(github.com) ... 65535 ms
/usr/bin/unzip -o OpenSSL_1_1_1q.zip -d source.tmp -x */fuzz/*
Archive: OpenSSL_1_1_1q.zip
29708a562a1887a91de0fa6ca668c71871accde9
creating: source.tmp/openssl-OpenSSL_1_1_1q/
inflating: source.tmp/openssl-OpenSSL_1_1_1q/ACKNOWLEDGEMENTS
inflating: source.tmp/openssl-OpenSSL_1_1_1q/AUTHORS
inflating: source.tmp/openssl-OpenSSL_1_1_1q/CHANGES
inflating: source.tmp/openssl-OpenSSL_1_1_1q/CONTRIBUTING
creating: source.tmp/openssl-OpenSSL_1_1_1q/Configurations/
inflating: source.tmp/openssl-OpenSSL_1_1_1q/Configurations/00-base-templates.conf
inflating: source.tmp/openssl-OpenSSL_1_1_1q/Configurations/10-main.conf
inflating: source.tmp/openssl-OpenSSL_1_1_1q/Configurations/15-android.conf |
this is weird, the only references I get for "openssl" on my macOS pipeline are xmake which fails to find it and python which doesn't find it, no installation is made. any clue on how to debug this? |
fork xmake source and create a debug branch to debug it. then switch to your xmake branch.
Or clone and install xmake with given debug branch from source on your ci directly. |
https://github.com/NazaraEngine/NazaraEngine/actions/runs/3479090238/jobs/5817999753 I added quite a lot of logs (here's the full list: dev...SirLynix:xmake:openssl_debug)
so openssl installation is skipped because it finds libxcb, which required xcb-proto, which required, which required openssl (so no need to install any of those). However python is installed because later it's required for aqt:
but openssl is not rechecked. I'm wondering why aqt isn't a parent of python, but this looks like a bug of xmake, you will probably understand it better than me (or maybe if you know in which file I should add logs if you're busy). |
maybe cache cause it?
|
I'm not sure but maybe. What I don't understand is that python is dismissed, it should have more than one parents as:
but aqt is never checked as a package using python. Here's the full log with parents_add logged: |
you can check here
|
Yeah I logged it, and But
only check one parent (xcb-proto), I don't understand hwy |
you can print python package instance address, tostring(package) maybe another python instance? |
Is your feature request related to a problem? Please describe.
OpenSSL uses a weird semver n1.n2.n3x (https://wiki.openssl.org/index.php/Versioning), where n1 and n2 are major, n3 is minor and x is a one or more letter patch. (example: 1.1.1a)
xmake-repo has an openssl package using those versions but you can't really use it.
For example, I'm trying to patch the
python
package which requires OpenSSL 1.1.1, but I can't tell that to xmake. I tried:and it fails:
same for
add_deps("openssl >=1.1.1a")
,add_deps("openssl >=1.1.1h")
(first 1.1.1 version in xmake-repo), evenadd_deps("openssl 1.1.1h")
failed witherror: unable to parse semver range '1.1.1h'
.Describe the solution you'd like
Either a patch in xmake semver to handle this weird case or a change in openssl package versioning to allow to select the versions we want.
Describe alternatives you've considered
No response
Additional context
Tested on latest version of xmake dev (6a29345)
The text was updated successfully, but these errors were encountered: