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

cmake: enforce gcc-10 for win32 port #47594

Merged
merged 1 commit into from
Aug 16, 2022
Merged

Conversation

tchaikov
Copy link
Contributor

we only have GCC-10 targeting MinGW at the time of writing, and it
is good enough for compiling the Winows port.

so let's relax the requirement to enable the windows build.

Signed-off-by: Kefu Chai tchaikov@gmail.com

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

we only have GCC-10 targeting MinGW at the time of writing, and it
is good enough for compiling the Winows port.

so let's relax the requirement to enable the windows build.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
@tchaikov tchaikov requested a review from cbodley August 15, 2022 07:25
@tchaikov tchaikov added the win32 Specifix changes for the windows platform label Aug 15, 2022
@tchaikov
Copy link
Contributor Author

jenkins test make check

@tchaikov
Copy link
Contributor Author

jenkins test api

@tchaikov
Copy link
Contributor Author

jsonnet-lint installdeps: -rrequirements-grafonnet.txt
WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
jsonnet-lint installed: jsondiff==2.0.0
jsonnet-lint run-test-pre: PYTHONHASHSEED='1986849639'
jsonnet-lint run-test: commands[0] | ./lint-jsonnet.sh --test
/home/jenkins-build/build/workspace/ceph-pull-requests/monitoring/ceph-mixin/lint-jsonnet.sh: 5: jsonnetfmt: not found
ERROR: InvocationError for command /home/jenkins-build/build/workspace/ceph-pull-requests/monitoring/ceph-mixin/lint-jsonnet.sh --test (exited with code 127)
___________________________________ summary ____________________________________
ERROR:   jsonnet-lint: commands failed

@tchaikov
Copy link
Contributor Author

jenkins test make check

2 similar comments
@tchaikov
Copy link
Contributor Author

jenkins test make check

@tchaikov
Copy link
Contributor Author

jenkins test make check

@tchaikov tchaikov merged commit 7e309f3 into ceph:main Aug 16, 2022
@tchaikov tchaikov deleted the wip-cmake-win32 branch August 16, 2022 01:45
@petrutlucian94
Copy link
Contributor

Thanks, this buys us some time. I see that one of the tests keeps failing, we'll take a look:

[2022-08-15T07:44:30.000Z] [googletest] unittest_crush.exe failed. Error: Command returned non-zero code(1): "cmd /c 'C:\ceph\unittest_crush.exe --gtest_output=xml:C:\workspace\test_results\unittest_crush_results.xml  > C:\workspace\test_results\unittest_crush_results.log 2>&1'".

@djgalloway
Copy link

https://jenkins.ceph.com/job/ceph-dev-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=windows,DIST=windows,MACHINE_SIZE=gigantic/50324/console

CMake Error at src/CMakeLists.txt:126 (message):
  C++20 support requires a minimum GCC version of 10.

Yet

$ ssh braggi13 gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0

@cbodley
Copy link
Contributor

cbodley commented Aug 31, 2022

the cmake output show that it selected 9.3

-- The CXX compiler identification is GNU 9.3.0
-- The C compiler identification is GNU 9.3.0

@cbodley
Copy link
Contributor

cbodley commented Aug 31, 2022

it's using these binaries:

-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++-posix
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++-posix -- works
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc-posix
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc-posix -- works

@djgalloway
Copy link

djgalloway commented Aug 31, 2022

Ah, you're right. ceph/ceph-build#2067

(This also tells me we didn't need to update the Jenkins builders to Jammy 😞)

@tchaikov
Copy link
Contributor Author

why? i did spot FTBFS of windows build on ubuntu focal.

@djgalloway
Copy link

I don't know. I thought I remember @petrutlucian94 or @ionutbalutoiu asking me to switch Windows builds to Jammy builders specifically because of a newer something version.

ceph/ceph-build#2067 does get builds going again but it's failing now due to a compiler error.

In file included from /mnt/ceph/src/include/encoding.h:41,
                 from /mnt/ceph/src/include/uuid.h:9,
                 from /mnt/ceph/src/include/types.h:21,
                 from /mnt/ceph/src/msg/Message.cc:11:
/mnt/ceph/src/include/denc.h: In function 'void denc_signed_varint_lowz(int64_t, It&)':
/mnt/ceph/src/include/denc.h:517:49: error: 'bit_cast' is not a member of 'std'; did you mean 'bad_cast'?
  517 |   unsigned lowznib = v ? (std::countr_zero(std::bit_cast<uint64_t>(v)) / 4) : 0u;
      |                                                 ^~~~~~~~
      |                                                 bad_cast
/mnt/ceph/src/include/denc.h:517:66: error: expected primary-expression before '>' token
  517 |   unsigned lowznib = v ? (std::countr_zero(std::bit_cast<uint64_t>(v)) / 4) : 0u;
      |                                                                  ^
ninja: build stopped: subcommand failed.

@petrutlucian94
Copy link
Contributor

@djgalloway right, the issue was that ubuntu 20.04 only provides mingw gcc 9.3

x86_64-w64-mingw32-gcc --version

x86_64-w64-mingw32-gcc (GCC) 9.3-win32 20200320

Now we have some failing tests that are addressed by this PR: #47818. The windows job completed successfully there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/ops win32 Specifix changes for the windows platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants