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

Mop up #1084 breakage #1100

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Mop up #1084 breakage #1100

merged 2 commits into from
Oct 2, 2024

Conversation

botovq
Copy link
Contributor

@botovq botovq commented Oct 2, 2024

Revert the minimum cmake version change since that isn't viable for major linux distros. Also, it led to weird compilation failures due to some undesirable side effects when compiling assembly files:

/__w/portable/portable/crypto/aes/vpaes-elf-x86_64.S:8:1: error: expected identifier or '(' before '.' token
    8 | .text
      | ^

@botovq botovq merged commit 92528bd into libressl:master Oct 2, 2024
47 checks passed
@vszakats
Copy link
Contributor

vszakats commented Oct 2, 2024

@botovq Thanks for the quick update!

Are you sure the if() works inside argument lists as expected?

This isn't documented (AFAICF) and compiles silently by CMake, but
doesn't actually seem to enable the thing enclosed inside the condition.
It also breaks when swapping the condition to, say, UNIX, or when
adding an else() branch.

There is a way to add options with inline conditions in certain cases,
with a different syntax (haven't tried this):
https://cmake.org/cmake/help/v3.0/manual/cmake-generator-expressions.7.html

Or with additional calls to set_target_properties(ssl PROPERTIES ...). Or with
set_property(TARGET ssl APPEND PROPERTY ...).

botovq added a commit to botovq/libressl-portable that referenced this pull request Oct 2, 2024
@botovq
Copy link
Contributor Author

botovq commented Oct 2, 2024

Are you sure the if() works inside arguments lists as expected?

No, of course not :)

Now that you point it out, I see the problem...

I don't have access to a Windows machine to check. Does #1103 work?

@vszakats
Copy link
Contributor

vszakats commented Oct 2, 2024

@botovq #1103 LGTM, thanks! I also don't have a Windows machine to test, and my cross-builds are without DLLs. Reproducing a fitting build locally would be a bit tedious.

Within LibreSSL's Windows CI workflow, maybe adding a post-build step doing:

find . -name '*.exe' -o -name '*.dll'

would add a way to verify this in the logs.
https:/curl/curl/blob/0acf0bcedad9208703cdbe91b06cacb1065a6e53/.github/workflows/windows.yml#L162

@botovq
Copy link
Contributor Author

botovq commented Oct 2, 2024

@vszakats There's an upload build artifact stage in our Windows CI. This one from #1103 shows that the major is actually appended:

$ find . -name '*.dll'
./crypto/Release/crypto-55.dll
./ssl/Release/ssl-58.dll
./tests/crypto-55.dll
./tests/ssl-58.dll
./tests/tls-31.dll
./tls/Release/tls-31.dll

whereas on HEAD the majors are absent.

Thanks for the pointers!

https:/libressl/portable/actions/runs/11142580203/artifacts/2005442115

@botovq botovq deleted the mop_up branch October 2, 2024 13:52
@vszakats
Copy link
Contributor

vszakats commented Oct 2, 2024

@botovq Nice, that also does the job! It's looking good.

@busterb
Copy link
Contributor

busterb commented Oct 2, 2024

Good catch @botovq, sorry about that. I'm a little baffled how changing the minimum CMake check could actually impact how assembly code is generated though.

@botovq
Copy link
Contributor Author

botovq commented Oct 2, 2024

@busterb I suspect it has to do with implicitly enabling more cmake policies. Not sure what it could be though.

@botovq
Copy link
Contributor Author

botovq commented Oct 2, 2024

@busterb It compiles the assembly files with cc -x c, which of course cannot work. I suspect it has to do with https://cmake.org/cmake/help/latest/policy/CMP0056.html

Not sure how to fix this. Presumably we need to label the .S files as assembly files rather than C files somehow.

@botovq
Copy link
Contributor Author

botovq commented Oct 2, 2024

@busterb It's actually CMP0119 and we should probably look into using enable_language(ASM) rather than forcing the use of the C-compiler for some of the .S files.

@busterb
Copy link
Contributor

busterb commented Oct 8, 2024

Experimented with this, but couldn't find a combination that gets things building when CMP0119 is set to the new behavior.

@busterb
Copy link
Contributor

busterb commented Oct 8, 2024

Oh, figured out what you meant, testing in #1104

@botovq
Copy link
Contributor Author

botovq commented Oct 8, 2024 via email

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

Successfully merging this pull request may close these issues.

3 participants