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

Fix gcc build on Windows #8

Open
1 task done
bitwizeshift opened this issue Jan 5, 2021 · 0 comments
Open
1 task done

Fix gcc build on Windows #8

bitwizeshift opened this issue Jan 5, 2021 · 0 comments
Labels
Complexity: Medium This might take a few days of work Priority: High High-priority Status: Available This task is available to be looked at Type: Bug Report For bugs that need to be fixed (For "Issues" only)

Comments

@bitwizeshift
Copy link
Owner

Checklist

  • I did not find a duplicate of this bug in the Github Issues section.

Description

Since Github migrated to using the $GITHUB_ENV environment variable, various
parts of the CI build have had to change in order to build correctly. As part of these
changes, it appears that newer GCC build versions are now failing to build entirely
due to different errors depending on debug or release builds:

Debug

C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe: CMakeFiles\AlloyCoreTest.dir\src\main.cpp.obj: too many sections (32805)
C:\Users\RUNNER~1\AppData\Local\Temp\ccXSuEW8.s: Assembler messages:
C:\Users\RUNNER~1\AppData\Local\Temp\ccXSuEW8.s: Fatal error: can't write 233 bytes to section .text of CMakeFiles\AlloyCoreTest.dir\src\main.cpp.obj: 'File too big'
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe: CMakeFiles\AlloyCoreTest.dir\src\main.cpp.obj: too many sections (32805)
C:\Users\RUNNER~1\AppData\Local\Temp\ccXSuEW8.s: Fatal error: can't close CMakeFiles\AlloyCoreTest.dir\src\main.cpp.obj: File too big

Link

Release

In file included from D:/a/Alloy/Alloy/lib/alloy-io/include/alloy/io/events/keyboard_events.hpp:34,
                 from D:\a\Alloy\Alloy\build\lib\alloy-io\AlloyIO.SelfContainmentTest\include\alloy\io\events\keyboard_events.hpp.cpp:1:
D:/a/Alloy/Alloy/lib/alloy-io/include/alloy/io/event.hpp:519:8: error: 'alloy::io::event::~event()' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
 inline alloy::io::event::~event()
        ^~~~~
D:/a/Alloy/Alloy/lib/alloy-io/include/alloy/io/event.hpp:617:13: error: 'void alloy::io::event::reset()' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
 inline void alloy::io::event::reset()
             ^~~~~
D:/a/Alloy/Alloy/lib/alloy-io/include/alloy/io/event.hpp:686:22: error: 'static uint32_t alloy::io::event::null_handler(alloy::io::event::operation, const storage_type*, const storage_type*)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
 inline std::uint32_t alloy::io::event::null_handler(operation op,
                      ^~~~~

This error appears to be due to using the ALLOY_IO_API preprocessor symbol on a
class that has inline variables. Brief searching on stack overflow indicates that this
warning from GCC is extraneous and does not affect behavior; however it appears that
this also appears that it cannot simply be suppressed with a Wno-... argument since the
-Werror message does not indicate what the warning flag is that triggers this error

Link


It may just be that the fix to this will simply be to update the minimum GCC version.
It may also be that some small code-changes may be required as well.

Expected Behavior

The build succeeds

Actual Behavior

The build fails

Extra information

  • Library version: master
  • Operating System: Microsoft Windows Server 2019 - 10.0.17763
  • Compiler: GNU 8.1.0
@bitwizeshift bitwizeshift added Status: Available This task is available to be looked at Type: Bug Report For bugs that need to be fixed (For "Issues" only) Priority: High High-priority Complexity: Medium This might take a few days of work labels Jan 5, 2021
bitwizeshift added a commit that referenced this issue Jan 5, 2021
This fixes the broken Github Actions workflows, which were previously
broken by Github's removal of support for their `::set-env`
commands.

Several bugs have been discovered through this process, and several
builds are currently on-hold pending investigation. New issues have
been opened up in the Github repository to track these problems, they
are #8 and #9 respectively.

As an added benefit, the CI for this project has also been updated now
to additionally include _some_ support for sanitizers -- though these
sanitizers are not run on Ubuntu yet (pending resolution of #9).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium This might take a few days of work Priority: High High-priority Status: Available This task is available to be looked at Type: Bug Report For bugs that need to be fixed (For "Issues" only)
Projects
None yet
Development

No branches or pull requests

1 participant