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

[BUG]: .pch files are lost after uploading .zip project #6549

Open
petrock99 opened this issue Jun 1, 2024 · 0 comments
Open

[BUG]: .pch files are lost after uploading .zip project #6549

petrock99 opened this issue Jun 1, 2024 · 0 comments
Labels

Comments

@petrock99
Copy link

Describe the bug

I have a project that uses cmake and precompile headers (.pch). I uploaded a .zip of my project and when I try to build the compiler complains that it can't find the .pch. Sure enough prefix.pch is missing from the list of files in the Tree, but the file is definitely in the .zip. I've attached a small sample .zip. Here is the output when I try to build using gcc-14.1.0, but similar errors occur with other compilers like clang & icx:

Step cmake returned: 0
-- The C compiler identification is GNU 14.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/compiler-explorer/gcc-14.1.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /app/build
Step build returned: 2
[ 33%] Building C object CMakeFiles/test.dir/cmake_pch.h.gch
In file included from <command-line>:
/app/build/CMakeFiles/test.dir/cmake_pch.h:4:10: fatal error: /app/prefix.pch: No such file or directory
    4 | #include "/app/prefix.pch"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/test.dir/build.make:77: CMakeFiles/test.dir/cmake_pch.h.gch] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/test.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

Workaround: create a new source editor, copy/paste the contents of the .pch into it, rename it prefix.pch, and include it into the Tree.

project-2024 06 0117 35 06.zip

Steps to reproduce

  • Visit godbolt.org
  • Switch to Tree mode
  • Project Button Menu -> Choose File
  • Select the attached .zip
  • Click Upload

Expected behavior

Expected: the .pch in the .zip should be in the list of files in the Tree
Actual: the .pch in the .zip is missing from the list of files in the Tree

Reproduction link

Not applicable

Screenshots

Not applicable

Operating System

macOS 14.5

Browser version

Safari 17.5

@petrock99 petrock99 added the bug label Jun 1, 2024
@partouf partouf added the ui label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants