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

Cannot build the project due to invalid .pch file #131

Open
kittisak-phetrungnapha opened this issue Dec 14, 2020 · 7 comments
Open

Cannot build the project due to invalid .pch file #131

kittisak-phetrungnapha opened this issue Dec 14, 2020 · 7 comments

Comments

@kittisak-phetrungnapha
Copy link

kittisak-phetrungnapha commented Dec 14, 2020

Hi, I am trying to build the project but found the below errors.

error: input is not a PCH file: '/Users/kittisak/Library/Developer/Xcode/DerivedData/Mumble-dseistgcfzlkmifyiefqlrpdtbmm/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/6834873383108777343/CELT-0.7.pch.gch'

fatal error: file '/Users/kittisak/Library/Developer/Xcode/DerivedData/Mumble-dseistgcfzlkmifyiefqlrpdtbmm/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/6834873383108777343/CELT-0.7.pch.gch' is not a valid precompiled PCH file

I searched that file and this is its content.

//
// Prefix header for all source files of the 'CELT-0.7' target in the 'CELT-0.7' project
//

#ifdef __OBJC__
    #import <Foundation/Foundation.h>
#endif

I am using Xcode 13.7.

Could you suggest me how to fix them? Thank you.

@jasperblues
Copy link

@itopstack I just faced the same, and managed to get it to build by:

Open the Xcode project, Try to do the following steps, XCode->File->Workspace Settings->Build System, select the option "Legacy Build System".

^-- This is deprecated, so we'll need a better solution long term.

@Krzmbrzl
Copy link
Member

Without knowing any details about how to build the code here: usually a PCH file gets generated on-the-fly and therefore I would try to delete it before a fresh build attempt. Maybe that is enough to solve the issue 🤔

@Kissaki
Copy link
Member

Kissaki commented Mar 13, 2024

I am running into this same issue when trying to build mumblekit, which also includes a celt build, on CI (GitHub Actions).

❌  error: input is not a PCH file: '/Users/runner/work/mumblekit/mumblekit/3rdparty/celt-0.7.0-build/build/SharedPrecompiledHeaders/SharedPrecompiledHeaders/6029267988201565908/CELT-0.7.pch.gch'

@Kissaki
Copy link
Member

Kissaki commented Mar 13, 2024

xcode 13.1 with legacy build system works

xcodebuild -UseModernBuildSystem=NO

xcode 14.2 doesn't have the flag anymore

I haven't checked where it disappears specifically. (Probably 14?)

@Kissaki Kissaki self-assigned this Mar 13, 2024
@Kissaki
Copy link
Member

Kissaki commented Mar 13, 2024

@jasperblues When changing that setting, does that save to the project file as a change? (I assume Mumble.xcodeproj?)

Can you create PR for that?

@Kissaki Kissaki removed their assignment Mar 13, 2024
@Kissaki
Copy link
Member

Kissaki commented Mar 13, 2024

I added CI to this project, so there's proof it compiles with legacy build system.

But I don't have a macOS or xcode. So I can't make the project file setting change.

@jasperblues
Copy link

@Kissaki would love to help, however I don't have time to work on Mumble at the moment.

Its also possible to freshen the code so that it compiles without requiring legacy build settings and to remove ARC. I did this on a forked code-base owned by a previous client, as well as added support for stereo playback and recording. (I no longer have access to this code, but it would be easy to recreate)

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

No branches or pull requests

4 participants