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

"No CMAKE_C_COMPILER could be found" when building from source #4920

Closed
1 of 3 tasks
javawizard opened this issue Apr 8, 2024 · 4 comments
Closed
1 of 3 tasks

"No CMAKE_C_COMPILER could be found" when building from source #4920

javawizard opened this issue Apr 8, 2024 · 4 comments
Labels
bug Something isn't working stale

Comments

@javawizard
Copy link
Contributor

Is there an existing issue for this problem?

  • I have searched the existing issues

OrcaSlicer Version

main

Operating System (OS)

macOS

OS Version

MacOS Sonoma 14.2.1

Additional system information

No response

Printer

N/A

How to reproduce

  1. brew install cmake gettext libtool automake autoconf texinfo
  2. Install XCode
  3. sudo xcode-select --reset for good measure
  4. Clone [email protected]:SoftFever/OrcaSlicer
  5. cd OrcaSlicer && ./build_release_macos.sh

Actual results

The build dies after a few moments with:

[...]

Building slicer...
+ mkdir -p /Users/jw/projects/OrcaSlicer/build_arm64
+ cd /Users/jw/projects/OrcaSlicer/build_arm64
+ '[' 1. '!=' . ']'
+ cmake .. -G Xcode -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH=/Users/jw/projects/OrcaSlicer/deps/build_arm64/OrcaSlicer_dep_arm64/usr/local -DCMAKE_INSTALL_PREFIX=/Users/jw/projects/OrcaSlicer/build_arm64/OrcaSlicer -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH=/Users/jw/projects/OrcaSlicer/deps/build_arm64/OrcaSlicer_dep_arm64/usr/local -DCMAKE_MACOSX_BUNDLE=ON -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.3
-- CMAKE_OSX_DEPLOYMENT_TARGET: 11.3
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:11 (project):
  No CMAKE_C_COMPILER could be found.



CMake Error at CMakeLists.txt:11 (project):
  No CMAKE_CXX_COMPILER could be found.



-- Configuring incomplete, errors occurred!
Screenshot 2024-04-07 at 6 53 28 PM

Expected results

OrcaSlicer should compile successfully.

Project file & Debug log uploads

N/A

Checklist of files to include

  • Log file
  • Project file

Anything else?

Note that Bambu Studio itself builds fine on my machine following the directions here; it's just Orca that's running into this issue.

Copy link

github-actions bot commented Jul 8, 2024

Orca bot: this issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Jul 8, 2024
Copy link

Orca bot: This issue was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
@yapalexei
Copy link

This is still an issue, if it's been addressed. to reproduce I went through the same order of steps, as mentioned above.
System:
MacOS 14.4.1

If I get lucky I'll post the solution here for posterity.

@yapalexei
Copy link

I was able to get passed the above issue by doing the following:

  • delete build_arm64 directory, to start from scratch
  • install Xcode, open and (critically) agree to terms. This should install things like clang, gcc, g++ toolchain deps.
  • (maybe optional, not sure but) open build_release_macos.sh and add the following lines to the function build_slicer for the cmake command just after line 159 that says -G "${SLICER_CMAKE_GENERATOR}" \
-DCMAKE_CXX_COMPILER=/usr/bin/g++ \
-DCMAKE_C_COMPILER=/usr/bin/gcc \

It took about 10 mins to build successfully.

I suppose that Xcode is the critical piece here but, I'll admit, I don't want to burn 10 more minutes to find out that the above 2-line update in build_release_macos.sh does anything significant. I'll let the experts correct me if they so choose.

With that said, I hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants